Asterisk with T.38 Gateway (not pass through) setup


I have had some issues getting a T.38 gateway working reliably. I want to start from scratch but before i do i want to see if anyone else has set this up similarly to what my setup will be. I have used a fair few guides out there but most are not very helpful.

The following is not the exact setup as there is a few more hops but the requirement on the T.38 gateway remains the same. The connections using G.711a are interconnects or direct Ethernet connections between PBX’s. The G.711a SIP trunk from Asterisk 11 to Asterisk 1.8 is a requirement and can’t be changed (the fax must go over G.711a on this trunk and T.38 is obviously not on this part of the call).

The connection between Asterisk 11 and the Cisco ATA will be either over a DSL, ethernet, NBN or other connection type, hence the requirement for T.38.

(ISDN)<---->(Asterisk 1.8) <— G.711a ----> (Asterisk 11 with T.38 Gateway) <---- T.38 ----> (Cisco SPA3102 ATA) <----> (Fax Machine)

Asterisk version on T.38 Gateway : 11.16.0
SpanDSP version: spandsp-0.0.6
Spandsp FAX Driver: 20110122 075024

Sip options

Outbound Dialplan
exten = _EXAMPLE,1,Set(FAXOPT(gateway)=yes)
exten = _EXAMPLE,n,Macro(dialout-trunk,1,${EXTEN},) ; SIP trunk using G.711a

Inbound Dialplan
exten = EXAMPLE,1,Set(FAXOPT(gateway)=yes)
exten = EXAMPLE,n,Dial(SIP/EXAMPLE,20) ; Cisco ATA

I’m using FreePBX but in my testing i will just run my own dialplan (including dialing the trunk even though it is in the outbound dialplan).

Please let me know your thoughts or configurations for T.38 as a gateway, i did get T.38 working on either outbound or inbound (forget which). I’m not after someone to troubleshoot what i have done already, i need to build a test environment anyway so i’m just after some information before i do so. I just want to know if someone has done what i’m after and if so what versions and config they used etc.