FreePBX | Register | Issues | Wiki | Portal | Support

t38 Fax detection


#1

Hi All,

I have an asterisk 10 and freepbx 12 with the Digium Fax library (res_fax_digium.so). The documentation says that faxdetect should be set to yes in sip.conf. However it is set to no even though I set t38 passthrough to yes in advanced settings.

I am using an Australian VSP that supports t.38. What is happening is that unless the VSP send t38 in the invite message the session does not switch to t.38. The documentation also suggests that when t38 is enabled the receipt of a CNG tone should get asterisk to initiate a t38 session.

How do we change the detectfax setting to yes or t38 through the freepbx manager.

Thanks,

Ian


(Gtc Networking) #2

Hi Ian
I am using fax detect in Australia but i found you do not have to enable t38 pass through.

I am using Asterisk 11 on FPBX 11 and all i had to do was:-

  • create a virtual extension as the fax recipient, enable fax and add email address
  • add faxdetect=yes in SIP settings (FPBX GUI)
  • leave t38 pass through off.
  • enable fax detect on the inbound route, via SIP and send to FAX RECIPIENT (then select extension created above)

restart on server (apply settings did not work for me)


#3

Hi,

The setup I want to use is ISDN PRI - Patton Gateway - t38modem - Hylafax
The step I cannot find is how to get modemhem to register with Asterisk. The setup is completely different to iaxmodem as each t38 modem does not appear to have a separate config file to link the t38 modems to Asterisk. I have been fighting this for 2 days and cannot seem to find a clear explanation of how set it up.

Can you help?


#4

If you want to use hylafax the old iaxmodem cannot do t38 just g711, you could add t38modem’s instead, which hylafax can use (just like iaxmodems) and Asterisk t38 pass-through (you don’t need res_fax or any of that stuff, so don’t try to register them directly against asterisk, just the underlying SIP/h323 extension, that would be unnecessarily painful to both your head and your pocket . . . , let hylafax handle the low level stuff) , it works fine, I have been using it for years and it’s free and rock solid :slight_smile:

t38modem -tt -o /var/log/t38modem0.log --no-h323 -u T38modem --route “modem:.=sip:@127.0.0.1:38000"
–route "sip:.
=modem:” --sip-listen udp$127.0.0.1:38000 --ptty +/dev/ttyT0 --sip-register 3800@127.0.0.1,yourpassword > /dev/null 2>&1 &

repeat or modify as necessary. . .


#5

Thank you for your detailed response. My client has 14 fax destination atm. each iaxmodem can register to an iax extension and calls can be routed via incoming routes and faxes can be dispatched via the fax dispatch file based on the ttyIAX modem used.

Can I register each instance of t38 modem to a separate extension i.e. ttyt38-1 extn 201 ttyt38-2 exten 202 etc.

If so, how can I do it?

Ian


#6

Absolutely:

incrementing the logname, port, ptty and registered extension from my base 0 as appropriate until you reach 13. (Please RTFM for what it is :wink: )

If you want (unnecessarily) one to one routing, also change that, that’s a hylafax thing, you would have a “fax modem pool” just like your old iaxmodems and can add outbound CID and inbound routing as appropriate, look at adding Avantfax to your mix to make it easier.


#7

Well, really sorry to warm up this old, old, thread. :wink:

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. :hushed: 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. :smile::wink:


T38 Faxing and T38pt_udptl= values and devices #2
(Tom Ray) #8

Is any of this based on current releases of FreePBX? The T38 options are configurable in the Asterisk SIP Settings.

So advising people that you added this in the Chan_SIP settings in the Extra Settings fields is wrong as there is already a spot in the GUI for these settings.

Also keep in mind that any version below FreePBX 13 is dead and EOL’d. No one is advised to stay on them and they should upgrade. At this point everyone should be upgrading to v14, it’s been out for 22 months now and by the end of the summer (I’m guessing) v13 will start down the path of being EOL’d.

Finally, Chan_SIP is not long in the tooth. It is set to be start being no-loaded (compiled but not activated) in upcoming new versions of Asterisk and will be removed completely at some point. So you should be learning how to do all this T38 stuff on Chan_PJSIP as that is the currently developed and supported SIP driver for Asterisk. Hopefully it doesn’t take you years to figure out now.


#9

Thanks Tom Ray for that information. I have corrected the T38 option aspect in my answer more precisely to FreePBX 11 (it may be also true for FreePBX 12).

Well, will see when I find the time to upgrade to any new FreePBX version. Maybe I will do that when my VoIP provider will require it… (Never touch a really really good running system.) :wink: