T.38 Passthrough and UDPTL and NAT on both ends faxing between extensions on same FreePBX server

Hello,

I am running FreePBX 2.10.0.4 and Asterisk 1.8.11.0

I have enabled T38 pass through in the FreePBX gui.

My sip_custom_post.conf file is:

54852
udptlstart=4000
udptlend=4999
T38FaxUdpEC=t38UDPRedundancy
T38FaxMaxDatagram=400
t38pt_usertpsource=yes ;Tried this with and without
udptlfecentries=1
udptlfecspan=3

54853
udptlstart=4000
udptlend=4999
T38FaxUdpEC=t38UDPRedundancy
T38FaxMaxDatagram=400
t38pt_usertpsource=yes ;Tried this with and without
udptlfecentries=1
udptlfecspan=3

Both of these extensions, 54852 and 54853 are behind a NAT firewall and the FreePBX is behind its own NAT firewall.

I am simply trying to fax between the two extensions with a SPA112 Linksys/Cisco and two fax machines.

I get a timeout every time.

I have tried with and without, having UDP ports 4000-4999 forwarded at the FREEPBX end and at the remote end where the SPA112’s are.

I have also tried many options such as sendrpid, trustrpid, symmetric NAT on the SPA112.

Voice calls between the two extensions work great.

Voice calls from either extension out my Cisco as5350 with my PRI attached work great.

Faxes between extensions timeout in T38 mode, but work marginally in g.711u pass through mode.

Does anyone know how or if its possible to make this work?

Like this for the calling extension:

FaxMachine–SPA112–NAT Firewall–Internet–NAT Firewall–FreePBX

Then of course the reverse direction for the called extension.

I also tried it with Grandstream HT502’s.

Fax calls like this also fail with a timeout using T.38:

FaxMachine–SPA112–NAT Firewall–Internet–NAT Firewall–FreePBX–SIPTrunk–Cisco as5350–PRI–PSTN–FaxMachine

I also tried it like this:

FaxMachine–Cisco iad2430–NAT Firewall–Internet–NAT Firewall–FreePBX–NAT Firewall–Internet–NAT Firewall–SPA112/HT502–FaxMachine

Ive also tried ECM off/on, redundancy off/on.

Most of the settings you have there should be in udptl.conf, not sip.conf.

I haven’t tried that same configuration yet, but will be testing in office faxing for a client. Don’t ask…

you may want to make sure that the end points have canreinvite=nonat on the extensions. This will allow the reinvite between the endpoints if local, but not if they’re traversing nat.