I have been trying to get t38 gateway mode to work on freepbx for a while now. On my first setup I was able to get get it to work, now even on a new install I can not get it to gateway.
Let me start off with my setup.
Hylafax client -> Hylafax -> Iaxmodem -> Freepbx -> Carrier.
Inside freepbx I have added the follow trigger for gateway mode. into extension_custom.conf
[macro-dialout-trunk-predial-hook]
exten => s,1,NoOp(Enabling FAX Gateway Mode)
exten => s,n,Set(FAXOPT(gateway)=yes)
exten => s,n,MacroExit()
I then add to my outbound trunk peer
faxdetect=both
directmedia=no
t38pt_udptl=yes,redundancy,maxdatagram=400
jbenable=no
The problem that I am facing is the the call is setup and the invite is sent to my peers as G711 and then the carrier sends an invite back to to free pbx to setup T38. Freepbx responds with the 200 Ok, but my carrier says it does not send the correct info back
They say the max datagram is wrong, in turn the fax fails with no carrier detected after the invite. If I turn off the t38 module, faxes complete. Below is a sip debug
I would like to have asterisk gateway and send the invite out rather than wait for the reinvite. I had this working in the past for a bit but cant seem to get back to it.
Audio is at 11934
Adding codec 100003 (ulaw) to SDP
Adding codec 100004 (alaw) to SDP
Adding codec 100002 (gsm) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to x.x.x.125:5060:
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP x.x.x.76:5060;branch=z9hG4bK44239bb3;rport
Max-Forwards: 70
From: “MOI” sip:[email protected];tag=as7a8740f2
To: sip:[email protected]
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 102 INVITE
User-Agent: FPBX-2.11.0(11.7.0)
Date: Tue, 31 Dec 2013 14:34:34 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 284
v=0
o=root 2010543355 2010543355 IN IP4 x.x.x.76
s=Asterisk PBX 11.7.0
c=IN IP4 x.x.x.76
t=0 0
m=audio 11934 RTP/AVP 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
<— SIP read from UDP:x.x.x.125:5060 —>
SIP/2.0 100 Trying
Call-ID: [email protected]:5060
CSeq: 102 INVITE
From: “MOI” sip:[email protected];tag=as7a8740f2
To: sip:[email protected];tag=sip+1+7d46000a+7d5e303b
Via: SIP/2.0/UDP x.x.x.76:5060;received=x.x.x.76;rport=5060;branch=z9hG4bK44239bb3
Server: SIP/2.0
Content-Length: 0
<------------->
— (8 headers 0 lines) —
<— SIP read from UDP:x.x.x.125:5060 —>
SIP/2.0 200 OK
Call-ID: [email protected]:5060
CSeq: 102 INVITE
From: “MOI” sip:[email protected];tag=as7a8740f2
To: sip:[email protected];tag=sip+1+7d46000a+7d5e303b
Via: SIP/2.0/UDP x.x.x.76:5060;received=x.x.x.76;rport=5060;branch=z9hG4bK44239bb3
Server: SIP/2.0
Content-Length: 237
Contact: sip:[email protected]:5060
Content-Type: application/sdp
Accept: application/sdp, application/isup, application/dtmf,multipart/mixed
Allow: INVITE,ACK,CANCEL,BYE,PRACK,UPDATE
v=0
o=Sonus_UAC 61784250123813 61784250123813 IN IP4 x.x.x.125
s=-
c=IN IP4 x.x.x.125
t=0 0
m=audio 58136 RTP/AVP 0 101
a=sendrecv
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=maxptime:20
<------------->
— (12 headers 11 lines) —
Found RTP audio format 0
Found RTP audio format 101
Found audio description format PCMU for ID 0
Found audio description format telephone-event for ID 101
Capabilities: us - (gsm|ulaw|alaw), peer - audio=(ulaw)/video=(nothing)/text=(nothing), combined - (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port x.x.x.125:58136
list_route: hop: sip:[email protected]:5060
set_destination: Parsing sip:[email protected]:5060 for address/port to send to
set_destination: set destination to x.x.x.125:5060
Transmitting (NAT) to x.x.x.125:5060:
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP x.x.x.76:5060;branch=z9hG4bK2c5d1b3c;rport
Max-Forwards: 70
From: “MOI” sip:[email protected];tag=as7a8740f2
To: sip:[email protected];tag=sip+1+7d46000a+7d5e303b
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 102 ACK
User-Agent: FPBX-2.11.0(11.7.0)
Content-Length: 0
[2013-12-31 08:34:36] NOTICE[15504][C-00000012]: res_fax.c:3404 fax_detect_framehook: FAX CNG detected but no fax extension in context (from-internal)
[2013-12-31 08:34:36] WARNING[15504][C-00000012]: res_rtp_asterisk.c:1982 ast_rtp_dtmf_begin: Don’t know how to represent ‘f’
[2013-12-31 08:34:36] WARNING[15504][C-00000012]: res_rtp_asterisk.c:2109 ast_rtp_dtmf_end_with_duration: Don’t know how to represent ‘f’
<— SIP read from UDP:x.x.x.125:5060 —>
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP x.x.x.125:5060;branch=z9hG4bK+d6e33784c12d0287d75236a2c80765111+sip+1+a6ad3ed0
Call-ID: [email protected]:5060
From: sip:[email protected];tag=sip+1+7d46000a+7d5e303b
To: “MOI” sip:[email protected];tag=as7a8740f2
CSeq: 1020362154 INVITE
Expires: 180
Content-Length: 305
Contact: sip:[email protected]:5060
Content-Type: application/sdp
Max-Forwards: 69
Allow: INVITE,ACK,CANCEL,BYE,PRACK,UPDATE
Accept: application/sdp, application/isup, application/dtmf,multipart/mixed
v=0
o=Sonus_UAC 61784250123813 61784250123814 IN IP4 x.x.x.125
s=-
c=IN IP4 x.x.x.125
t=0 0
m=image 58136 udptl t38
a=sendrecv
a=T38FaxVersion:0
a=T38MaxBitRate:14400
a=T38FaxRateManagement:transferredTCF
a=T38FaxMaxBuffer:262
a=T38FaxMaxDatagram:176
a=T38FaxUdpEC:t38UDPRedundancy
<------------->
— (13 headers 13 lines) —
Sending to x.x.x.125:5060 (NAT)
Got T.38 offer in SDP in dialog [email protected]:5060
Capabilities: us - (gsm|ulaw|alaw), peer - audio=(nothing)/video=(nothing)/text=(nothing), combined - (nothing)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x0 (nothing), combined - 0x0 (nothing)
Got T.38 Re-invite without audio. Keeping RTP active during T.38 session.
<— Transmitting (NAT) to x.x.x.125:5060 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP x.x.x.125:5060;branch=z9hG4bK+d6e33784c12d0287d75236a2c80765111+sip+1+a6ad3ed0;received=x.x.x.125;rport=5060
From: sip:[email protected];tag=sip+1+7d46000a+7d5e303b
To: “MOI” sip:[email protected];tag=as7a8740f2
Call-ID: [email protected]:5060
CSeq: 1020362154 INVITE
Server: FPBX-2.11.0(11.7.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Contact: sip:[email protected]:5060
Content-Length: 0
<------------>
<— Reliably Transmitting (NAT) to x.x.x.125:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP x.x.x.125:5060;branch=z9hG4bK+d6e33784c12d0287d75236a2c80765111+sip+1+a6ad3ed0;received=x.x.x.125;rport=5060
From: sip:[email protected];tag=sip+1+7d46000a+7d5e303b
To: “MOI” sip:[email protected];tag=as7a8740f2
Call-ID: [email protected]:5060
CSeq: 1020362154 INVITE
Server: FPBX-2.11.0(11.7.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Contact: sip:[email protected]:5060
Content-Type: application/sdp
Content-Length: 297
v=0
o=root 2010543355 2010543356 IN IP4 x.x.x.76
s=Asterisk PBX 11.7.0
c=IN IP4 x.x.x.76
t=0 0
m=image 4847 udptl t38
c=IN IP4 x.x.x.76
a=T38FaxVersion:0
a=T38MaxBitRate:14400
a=T38FaxRateManagement:transferredTCF
a=T38FaxMaxDatagram:1400
a=T38FaxUdpEC:t38UDPRedundancy
<------------>
<— SIP read from UDP:x.x.x.125:5060 —>
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP x.x.x.125:5060;branch=z9hG4bK+211d01b0da62dd1eedcec555ef94c9101+sip+1+a6ad3ed1
Call-ID: [email protected]:5060
From: sip:[email protected];tag=sip+1+7d46000a+7d5e303b
To: “MOI” sip:[email protected];tag=as7a8740f2
CSeq: 1020362154 ACK
Contact: sip:[email protected]:5060
Content-Length: 0
Max-Forwards: 69