Fax reliability

Firstly thanks to the FreePBX community for a truly amazing product, very versatile & reliable.
I was wondering if anyone could shed some light on an issue I am having …
All I need is the incoming PSTN fax => Mail gateway working reliably, the code all seems to compile/install ok and presents no real issues. However maybe 2 of 10 faxes are received properly. The rest are pages cut short, squashed images or 8 byte broken TIF files in /var/spool/asterisk
Occaisionally I have issues with faxdetect not recognising a fax, but not often.

No issues are reported in the logs and faxes appear to be received without error (I can post if required)

I am about to try compiling and patching by hand but would rather stick with the agx-addons to simplify upgrades.

here is the setup

2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 i686 i386 GNU/Linux
Asterisk 1.4.17
libpri-1.4.3
zaptel-1.4.7.1
agx-ast-addons-1.4.3
spandsp-0.0.4 Pre15
libtiff-3.8.2-1.fc5

TE110P PRI card in a Dual CPU Dell

Zaptel.conf
span=1,1,0,ccs,hdb3,crc4
bchan=1-15,17-31
dchan=16

zapata.conf

hidecallerid=no
canpark=yes
cancallforward=yes
callreturn=yes
faxdetect=incoming
jitterbuffers=4
switchtype=euroisdn
signalling=pri_cpe
group=1
pridialplan=unknown
context=from-pstn
channel=>1-15,17-31

Any assistance would be greatly appreciated.

Thanks

Althrough this question is not related to the Freepbx at all, I may be able to give you some hints since I had (and having) a loong quest for fax transmission reliability…

  1. Looks like you’re in Europe so your pri connection uses the alaw. app_rxfax and spandsp are using ulaw by default. There are some flags when you compile spandsp where you can set the alaw as default (sorry, don’t remember exactly)…
  2. Play with jitterbuffer/rxgain in zapata.conf and jbenable/jbforce in sip.conf. Try to disable echo cancelation in zaptel.
  3. set use_internal_timing=yes and transcode_via_sln = no in asterisk.conf (don’t forget to uncomment [options] line), set use_generic_plc=no in codecs.conf
    These tweaks will not give you a 100% reliability but probably will increase the succes rate up to 95% (there are some hp fax machines out there that don’t like to work with asterisk)…

Please post your results…