Fax over asterisk, problem? TIFF FORMAT!

I am trying since a looot of time to send faxes from asterisk, but I have a lot of problems, actually ONE problem, i cannot find the correct compression of the tiff file

i always receive wrong formatted fax, can you tell me how you solved the problem?

NOT email to fax… but from a file… i need to do that from FILE not from EMAIL.

maybe something wrong in the .call file??

my call file looks like

Channel: Zap/g1/XXXXXXXXw,30
MaxRetries: 0
WaitTime: 10
Application: txfax
Data: xxxxxxxxxxxxxxxx.tif|caller

this is the tiffinfo of the file i try to send…

TIFF Directory at offset 0x8 (8)
  Image Width: 1728 Image Length: 2287
  Resolution: 204, 196 pixels/inch
  Bits/Sample: 1
  Compression Scheme: CCITT Group 3
  Photometric Interpretation: min-is-white
  FillOrder: msb-to-lsb
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 2287
  Planar Configuration: single image plane
  Group 3 Options: (0 = 0x0)
  Fax Data: clean (0 = 0x0)

thank you…

The faxing is very specific on what tiff format it will accept. I had to convert many tiff files till I got the right one. My idea would be to have an incoming fax and then send it out. See if that works. If it does you know the exact tiff format that you need.

it doesnt work that way… already tried… anyway…

i updated my libtiff and now seems to work for the first page… but the problem is that… for multipage fax the second page is all messed up

I guess the problem is spandsp… still 2pre26… today i will try an update :neutral_face:

I had the same issue with multiple pages. Never worked on solving it since the project went on hold.

that’s encouraging :smiley:

anyway i just recompiled spandsp to devel 4 … and now I am having trouble with txfax… compiling!..

so I will keep you updated!

Let us know. It will save me a lot of gray hairs :wink: . Time for some one else to grow them :wink:

ok… an update

fax*CLI> core show version
Asterisk 1.4.20.1 built by root @ fax.xxx.eu on a i386 running FreeBSD on 2008-07-31 23:02:36 UTC

i updated with pain my asterisk on the operative machine… and…

[root@fax 18:01:33 /usr/local/etc/rc.d]# pkg_info
asterisk-1.4.20.1_1 An Open Source PBX and telephony toolkit
asterisk-addons-1.4.6_2 GPL modules for the Asterisk Open Source PBX
asterisk-agx-1.4.2 AGX Extra Addons for Asterisk
spandsp-devel-0.0.4.p15 A DSP library and software FAX machine
libpri-1.4.1 A C implementation of the Primary Rate ISDN specification
libpri-bristuff-1.2.3 A C implementation of the Primary Rate ISDN specification
tiff-3.8.1 Tools and library routines for working with TIFF images

XXXXXX.call

Channel: Zap/g1/XXXXXXXXXw,30
CallerID: Matteo <02-XXXXXXX>
MaxRetries: 3
WaitTime: 10
retryTime: 5
SetVar: LOCALHEADERINFO=Asterisk Testing by Teo
Application: txfax
Data: xxxxxxxxxxxx.tif|caller|debug|ecm

I sent my first fax that actually worked… and then i tried again and again… and it worked! :smile: with 2 3 4 and more pages… no more messed up

the only problem is when i sent a fax to a friend of mine from asterisk to some other service fax to mail… he got a trunkated fax… and the same fax (same tif origin) once 1,5 pages (instead of 4) and second time 2,5 pages… mmmm very strange

actually there is still a problem with the TxFax
[Aug 1 01:38:42] WARNING[74902]: /usr/ports/net/asterisk-agx/work/agx-ast-addons/app_txfax.c:438 txfax_exec: Transmission loop error
just that it closes the connection (at the end of sending) and it hangs more seconds because it starts a loop… I maybe need to recompile the package and check the source… but this doesnt seem to affect the real process!!

I can send faxes fine from received TIFF files, but can’t make generated tiff files that will send - this is the tiffinfo from the rxfax that will send
tiffinfo fax1.tif
TIFF Directory at offset 0xb2ae (45742)
Image Width: 1728 Image Length: 1075
Resolution: 204, 98 pixels/inch
Bits/Sample: 1
Compression Scheme: CCITT Group 3
Photometric Interpretation: min-is-white
FillOrder: lsb-to-msb
Orientation: row 0 top, col 0 lhs
Samples/Pixel: 1
Rows/Strip: (infinite)
Planar Configuration: single image plane
Page Number: 0-1
ImageDescription: 2143242455
Software: spandsp
DateTime: 2008/11/05 15:08:55
HostComputer: debsastpbx
Group 3 Options: 2-d encoding+EOL padding (5 = 0x5)
Fax Data: receiver regenerated (1 = 0x1)
Bad Fax Lines: 1
Consecutive Bad Fax Lines: 1
Fax Receive Time: 28 secs
Fax DCS: 00 45 1E

This is the tiffinfo from the one that wont - generated with command
convert -compress fax -monochrome -units pixelsperinch -resample 204x98 filea.pdf filea4.tif

tiffinfo filea4.tif
TIFF Directory at offset 0x1e0b02 (1968898)
Image Width: 2709 Image Length: 1685
Resolution: 204, 98 pixels/inch
Bits/Sample: 16
Compression Scheme: PackBits
Photometric Interpretation: min-is-black
FillOrder: msb-to-lsb
Orientation: row 0 top, col 0 lhs
Samples/Pixel: 1
Rows/Strip: 1
Planar Configuration: single image plane
DocumentName: filea4.tif
Software: ImageMagick 6.4.0 06/07/08 Q16 imagemagick.org

Still playing with convert switches to try to come up with solution