Well, really sorry to warm up this old, old, thread.
Here follows my conclusion how I have fixed that, and several other T.38 related issues, - maybe this will help also others with similar problems.
Regarding the T.38 fax detection, - the best solution is simply to not use it.
If you have a phone number dedicated to faxing-only then disable fax detection on the inbound route and send the call directly to the “Fax Recipient”. For me this had worked perfectly. By the way, it is also strongly recommended to disable any jitter buffer.
Another really problematic point is the correct setting of the T.38 parameters in FreePBX 11. For example, regarding T38 Pass-Through it is only possible to enable or disable it. Both of them were wrong in my situation. If I turned it on, the parameter t38pt_udptl=yes
was established in the config files. Well, my IP phone & fax provider needs t38pt_udptl=yes,redundancy
. So I left it disabled and set the t38pt_udptl=yes,redundancy
function by hand below in “Other SIP Settings”. I also added here faxdetect=t38
and t38pt_usertpsource=yes
. However, I am not sure about the latter one if that is really necessary.
To make the confusion perfect, these parameters also exist (with different syntax) incidentally in the udptl.conf file. Do not set it there, - these are deprecated! So far I understand the udptl.conf is only used regarding any udptl settings.
Furthermore, in legacy FreePBX 11, there seems to exist (sometimes) a grave installation bug regarding the Digium fax driver. No matter how many times “Free Fax For Asterisk” was “installed” through the FreePBX GUI (in Digium Addons), it was never installed in the modules directory. The res_fax_digium.so module was simply missing there. So I had to install it by hand from the digium website http://downloads.digium.com/pub/telephony/fax/res_fax_digium/
After this, to avoid any conflict, I have disabled the Spandsp FAX Driver in modules.conf with noload => res_fax_spandsp.so
. It should be noted here that any newer FreePBX above 12 need this driver for faxing. Most have version 0.0.6 installed, - in my case this driver never worked. If someone has similar issues he should try any more recent version: https://www.soft-switch.org/downloads/spandsp/snapshots/
Finally, my current working fax trunk (FOIP) config looks so:
type=peer
secret=xxx
qualify=yes
insecure=port,invite
host=business2.voipgateway.org
fromdomain=business2.voipgateway.org
disallow=all
directmedia=yes
defaultuser=xxx
context=from-pstn-toheader
allow=alaw&ulaw
dtmfmode=rfc2833
The only unclear parameter is directmedia=yes
which is in most examples disabled, especially if NAT is used. Well, in my case (with NAT but opened UDPTL ports) it works with yes, so I let it enabled.
That’s it, - I can say without dramatizing, it took me several years to figure all this out.