T38 problem

I have installed two asterisk(1.4 version) in my two office connected with private ip network. Each asterisk installed with pri E1 connected to the PBX.
I want to fax from one office to anthor. When I select codec alaw is ok,but when select codec g729 or gsm, fax failure. How to resolve the problem?

Below is part of my extensions.conf and sip.conf for reference
extensions.conf

exten => _z.,1,Dial(SIP/${EXTEN}@international)
exten => _z.,2,Hangup()


[international]
type=peer
host=192.18.121.192
context=incoming
disallow=all
;allow=g729
;allow=g723.1
allow=gsm
;allow=alaw
t38pt_udptl = yes

the remote asterisk have enabled T38 in sip.conf too.


t38pt_udptl = yes

what does ‘sip debug’ say? how about ‘udptl debug’?

udptl debug no any output and sip debug for sending end and receiving end as below:

Sending End:

list_route: hop: sip:9182@192.18.121.192
set_destination: Parsing sip:9182@192.18.121.192 for address/port to send to
set_destination: set destination to 192.18.121.192, port 5060
Transmitting (no NAT) to 192.18.121.192:5060:
ACK sip:9182@192.18.121.192 SIP/2.0
Via: SIP/2.0/UDP 192.18.121.190:5060;branch=z9hG4bK281716dd;rport
From: “Unknown” sip:Unknown@192.18.121.190;tag=as144edf55
To: sip:9182@192.18.121.192;tag=as47a05418
Contact: sip:Unknown@192.18.121.190
Call-ID: 4eeb5d9811f1069a508f64c80da5ea83@192.18.121.190
CSeq: 102 ACK
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0


<— SIP read from 192.18.121.192:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.18.121.190:5060;branch=z9hG4bK4e221679;received=192.18.121.190;rport=5060
From: “Unknown” sip:Unknown@192.18.121.190;tag=as144edf55
To: sip:9182@192.18.121.192;tag=as47a05418
Call-ID: 4eeb5d9811f1069a508f64c80da5ea83@192.18.121.190
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: sip:9182@192.18.121.192
Content-Type: application/sdp
Content-Length: 267

v=0
o=root 31072 31072 IN IP4 192.18.121.192
s=session
c=IN IP4 192.18.121.192
t=0 0
m=audio 11240 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

<------------->
— (12 headers 13 lines) —
Found RTP audio format 18
Found RTP audio format 101
Peer audio RTP is at port 192.18.121.192:11240
Found description format G729 for ID 18
Found description format telephone-event for ID 101
Capabilities: us - 0x100 (g729), peer - audio=0x100 (g729)/video=0x0 (nothing), combined - 0x100 (g729)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 192.18.121.192:11240
list_route: hop: sip:9182@192.18.121.192
set_destination: Parsing sip:9182@192.18.121.192 for address/port to send to
set_destination: set destination to 192.18.121.192, port 5060
Transmitting (no NAT) to 192.18.121.192:5060:
ACK sip:9182@192.18.121.192 SIP/2.0
Via: SIP/2.0/UDP 192.18.121.190:5060;branch=z9hG4bK281716dd;rport
From: “Unknown” sip:Unknown@192.18.121.190;tag=as144edf55
To: sip:9182@192.18.121.192;tag=as47a05418
Contact: sip:Unknown@192.18.121.190
Call-ID: 4eeb5d9811f1069a508f64c80da5ea83@192.18.121.190
CSeq: 102 ACK
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0


PE860A*CLI> Scheduling destruction of SIP dialog ‘4eeb5d9811f1069a508f64c80da5ea83@192.18.121.190’ in 32000 ms (Method: INVITE)
set_destination: Parsing sip:9182@192.18.121.192 for address/port to send to
set_destination: set destination to 192.18.121.192, port 5060
Reliably Transmitting (no NAT) to 192.18.121.192:5060:
BYE sip:9182@192.18.121.192 SIP/2.0
Via: SIP/2.0/UDP 192.18.121.190:5060;branch=z9hG4bK08331586;rport
From: “Unknown” sip:Unknown@192.18.121.190;tag=as144edf55
To: sip:9182@192.18.121.192;tag=as47a05418
Call-ID: 4eeb5d9811f1069a508f64c80da5ea83@192.18.121.190
CSeq: 103 BYE
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0


Scheduling destruction of SIP dialog ‘4eeb5d9811f1069a508f64c80da5ea83@192.18.121.190’ in 32000 ms (Method: INVITE)
set_destination: Parsing sip:9182@192.18.121.192 for address/port to send to
set_destination: set destination to 192.18.121.192, port 5060
Reliably Transmitting (no NAT) to 192.18.121.192:5060:
BYE sip:9182@192.18.121.192 SIP/2.0
Via: SIP/2.0/UDP 192.18.121.190:5060;branch=z9hG4bK08331586;rport
From: “Unknown” sip:Unknown@192.18.121.190;tag=as144edf55
To: sip:9182@192.18.121.192;tag=as47a05418
Call-ID: 4eeb5d9811f1069a508f64c80da5ea83@192.18.121.190
CSeq: 103 BYE
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0


PE860A*CLI>
<— SIP read from 192.18.121.192:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.18.121.190:5060;branch=z9hG4bK08331586;received=192.18.121.190;rport=5060
From: “Unknown” sip:Unknown@192.18.121.190;tag=as144edf55
To: sip:9182@192.18.121.192;tag=as47a05418
Call-ID: 4eeb5d9811f1069a508f64c80da5ea83@192.18.121.190
CSeq: 103 BYE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: sip:9182@192.18.121.192
Content-Length: 0

<------------->
— (11 headers 0 lines) —
Really destroying SIP dialog ‘4eeb5d9811f1069a508f64c80da5ea83@192.18.121.190’ Method: INVITE

<— SIP read from 192.18.121.192:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.18.121.190:5060;branch=z9hG4bK08331586;received=192.18.121.190;rport=5060
From: “Unknown” sip:Unknown@192.18.121.190;tag=as144edf55
To: sip:9182@192.18.121.192;tag=as47a05418
Call-ID: 4eeb5d9811f1069a508f64c80da5ea83@192.18.121.190
CSeq: 103 BYE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: sip:9182@192.18.121.192
Content-Length: 0

------------->
— (11 headers 0 lines) —
Really destroying SIP dialog ‘4eeb5d9811f1069a508f64c80da5ea83@192.18.121.190’ Method: INVITE
PE860A*CLI>

Receiving end:

TDM400*CLI>
<— SIP read from 192.18.121.190:5060 —>
INVITE sip:9182@192.18.121.192 SIP/2.0
Via: SIP/2.0/UDP 192.18.121.190:5060;branch=z9hG4bK1fb5a4af
From: “Unknown” sip:Unknown@192.18.121.190;tag=as035a8dee
To: sip:9182@192.18.121.192
Contact: sip:Unknown@192.18.121.190
Call-ID: 42fba16f3c6ee8f074680b3035ce0243@192.18.121.190
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Sun, 28 Jan 2007 07:58:04 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: 265

v=0
o=root 7005 7005 IN IP4 192.18.121.190
s=session
c=IN IP4 192.18.121.190
t=0 0
m=audio 15560 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

<------------->
— (14 headers 13 lines) —
Sending to 192.18.121.190 : 5060 (no NAT)
Using INVITE request as basis request - 42fba16f3c6ee8f074680b3035ce0243@192.18.121.190
Found no matching peer or user for '192.18.121.190:5060’
Found RTP audio format 18
Found RTP audio format 101
Peer audio RTP is at port 192.18.121.190:15560
Found description format G729 for ID 18
Found description format telephone-event for ID 101
Capabilities: us - 0x10f (g723|gsm|ulaw|alaw|g729), peer - audio=0x100 (g729)/video=0x0 (nothing), combined - 0x100 (g729)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 192.18.121.190:15560
Looking for 9182 in incoming (domain 192.18.121.192)
list_route: hop: sip:Unknown@192.18.121.190

<— Transmitting (no NAT) to 192.18.121.190:5060 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.18.121.190:5060;branch=z9hG4bK1fb5a4af;received=192.18.121.190
From: “Unknown” sip:Unknown@192.18.121.190;tag=as035a8dee
To: sip:9182@192.18.121.192
Call-ID: 42fba16f3c6ee8f074680b3035ce0243@192.18.121.190
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: sip:9182@192.18.121.192
Content-Length: 0

<------------>

<— SIP read from 192.18.121.190:5060 —>
INVITE sip:9182@192.18.121.192 SIP/2.0
Via: SIP/2.0/UDP 192.18.121.190:5060;branch=z9hG4bK1fb5a4af
From: “Unknown” sip:Unknown@192.18.121.190;tag=as035a8dee
To: sip:9182@192.18.121.192
Contact: sip:Unknown@192.18.121.190
Call-ID: 42fba16f3c6ee8f074680b3035ce0243@192.18.121.190
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Sun, 28 Jan 2007 07:58:04 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: 265

v=0
o=root 7005 7005 IN IP4 192.18.121.190
s=session
c=IN IP4 192.18.121.190
t=0 0
m=audio 15560 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

<------------->
— (14 headers 13 lines) —
Sending to 192.18.121.190 : 5060 (no NAT)
Using INVITE request as basis request - 42fba16f3c6ee8f074680b3035ce0243@192.18.121.190
Found no matching peer or user for '192.18.121.190:5060’
Found RTP audio format 18
Found RTP audio format 101
Peer audio RTP is at port 192.18.121.190:15560
Found description format G729 for ID 18
Found description format telephone-event for ID 101
Capabilities: us - 0x10f (g723|gsm|ulaw|alaw|g729), peer - audio=0x100 (g729)/video=0x0 (nothing), combined - 0x100 (g729)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 192.18.121.190:15560
Looking for 9182 in incoming (domain 192.18.121.192)
list_route: hop: sip:Unknown@192.18.121.190

<— Transmitting (no NAT) to 192.18.121.190:5060 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.18.121.190:5060;branch=z9hG4bK1fb5a4af;received=192.18.121.190
From: “Unknown” sip:Unknown@192.18.121.190;tag=as035a8dee
To: sip:9182@192.18.121.192
Call-ID: 42fba16f3c6ee8f074680b3035ce0243@192.18.121.190
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: sip:9182@192.18.121.192
Content-Length: 0

<------------>
TDM400*CLI> Audio is at 192.18.121.192 port 17578
Adding codec 0x100 (g729) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<— Reliably Transmitting (no NAT) to 192.18.121.190:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.18.121.190:5060;branch=z9hG4bK1fb5a4af;received=192.18.121.190
From: “Unknown” sip:Unknown@192.18.121.190;tag=as035a8dee
To: sip:9182@192.18.121.192;tag=as68f3e6ad
Call-ID: 42fba16f3c6ee8f074680b3035ce0243@192.18.121.190
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: sip:9182@192.18.121.192
Content-Type: application/sdp
Content-Length: 267

v=0
o=root 31072 31072 IN IP4 192.18.121.192
s=session
c=IN IP4 192.18.121.192
t=0 0
m=audio 17578 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

<------------>
Audio is at 192.18.121.192 port 17578
Adding codec 0x100 (g729) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<— Reliably Transmitting (no NAT) to 192.18.121.190:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.18.121.190:5060;branch=z9hG4bK1fb5a4af;received=192.18.121.190
From: “Unknown” sip:Unknown@192.18.121.190;tag=as035a8dee
To: sip:9182@192.18.121.192;tag=as68f3e6ad
Call-ID: 42fba16f3c6ee8f074680b3035ce0243@192.18.121.190
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: sip:9182@192.18.121.192
Content-Type: application/sdp
Content-Length: 267

v=0
o=root 31072 31072 IN IP4 192.18.121.192
s=session
c=IN IP4 192.18.121.192
t=0 0
m=audio 17578 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

<------------>
TDM400*CLI>
<— SIP read from 192.18.121.190:5060 —>
ACK sip:9182@192.18.121.192 SIP/2.0
Via: SIP/2.0/UDP 192.18.121.190:5060;branch=z9hG4bK1e259da3
From: “Unknown” sip:Unknown@192.18.121.190;tag=as035a8dee
To: sip:9182@192.18.121.192;tag=as68f3e6ad
Contact: sip:Unknown@192.18.121.190
Call-ID: 42fba16f3c6ee8f074680b3035ce0243@192.18.121.190
CSeq: 102 ACK
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0

<------------->
— (10 headers 0 lines) —

<— SIP read from 192.18.121.190:5060 —>
ACK sip:9182@192.18.121.192 SIP/2.0
Via: SIP/2.0/UDP 192.18.121.190:5060;branch=z9hG4bK1e259da3
From: “Unknown” sip:Unknown@192.18.121.190;tag=as035a8dee
To: sip:9182@192.18.121.192;tag=as68f3e6ad
Contact: sip:Unknown@192.18.121.190
Call-ID: 42fba16f3c6ee8f074680b3035ce0243@192.18.121.190
CSeq: 102 ACK
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0

<------------->
— (10 headers 0 lines) —
<— SIP read from 192.18.121.190:5060 —>
BYE sip:9182@192.18.121.192 SIP/2.0
Via: SIP/2.0/UDP 192.18.121.190:5060;branch=z9hG4bK30d099c5
From: “Unknown” sip:Unknown@192.18.121.190;tag=as035a8dee
To: sip:9182@192.18.121.192;tag=as68f3e6ad
Call-ID: 42fba16f3c6ee8f074680b3035ce0243@192.18.121.190
CSeq: 103 BYE
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0

<------------->
— (9 headers 0 lines) —
Sending to 192.18.121.190 : 5060 (no NAT)

<— Transmitting (no NAT) to 192.18.121.190:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.18.121.190:5060;branch=z9hG4bK30d099c5;received=192.18.121.190
From: “Unknown” sip:Unknown@192.18.121.190;tag=as035a8dee
To: sip:9182@192.18.121.192;tag=as68f3e6ad
Call-ID: 42fba16f3c6ee8f074680b3035ce0243@192.18.121.190
CSeq: 103 BYE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: sip:9182@192.18.121.192
Content-Length: 0

<------------>

<— SIP read from 192.18.121.190:5060 —>
BYE sip:9182@192.18.121.192 SIP/2.0
Via: SIP/2.0/UDP 192.18.121.190:5060;branch=z9hG4bK30d099c5
From: “Unknown” sip:Unknown@192.18.121.190;tag=as035a8dee
To: sip:9182@192.18.121.192;tag=as68f3e6ad
Call-ID: 42fba16f3c6ee8f074680b3035ce0243@192.18.121.190
CSeq: 103 BYE
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0

<------------->
— (9 headers 0 lines) —
Sending to 192.18.121.190 : 5060 (no NAT)

<— Transmitting (no NAT) to 192.18.121.190:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.18.121.190:5060;branch=z9hG4bK30d099c5;received=192.18.121.190
From: “Unknown” sip:Unknown@192.18.121.190;tag=as035a8dee
To: sip:9182@192.18.121.192;tag=as68f3e6ad
Call-ID: 42fba16f3c6ee8f074680b3035ce0243@192.18.121.190
CSeq: 103 BYE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: sip:9182@192.18.121.192
Content-Length: 0

<------------>
TDM400CLI> Really destroying SIP dialog ‘42fba16f3c6ee8f074680b3035ce0243@192.18.121.190’ Method: BYE
Really destroying SIP dialog ‘42fba16f3c6ee8f074680b3035ce0243@192.18.121.190’ Method: BYE
TDM400
CLI>

When I have tried faxing in the past using compressed codecs it has never really liked it. I think that FAX traffic does not like being compressed.

But i have ever used cisco AS5300 that use G729 codec can fax in my private network.

g729 will never work for fax. T38 or propritary protocols like Cisco fax-relay are best. ulaw or alaw are second best.

But what is the mean than asterisk version 1.4 support T38? If use alaw or ulaw for transfer fax, asterisk 1.2.x can do perfectly.I have ever setuped many network using cisco router. I enable T38 support in the cisco routers and can transfer fax over G729 codec perfectly. I think if asterisk 1.4 support T38, then it will can transfering fax over compress codec, such as G.729. Any one any experience? Thanks.

anyone else thinking that capturing the fax at the senders end and dumping it into a print queue at the remote end would be a better bet in this scenario ?

Faxing just wont work through low bandwidth codecs. G711a/u is your best option for fax using a voice codec at the moment.

Asterisk supports t38 pass through, this means you need to have t38 capable devices (such as Linksys SPA-2102) at either end with the fax machines connected to them. Pass through will allow this to work.

Try the G711, Can’t compress a fax packet and expect it to work… That is the same as trying to compress a modem signal :cry:

Hi,
I kinda missed this in the start, but if your fax calls are coming in from the PBX
via E1, then you want to sending out T.38 to your other Asterisk box, this will NEVER work. Reason being, Asterisk 1.4 supports T.38 passthrough only, which means both endpoints are T.38 compatible and Asterisk is just pushing out whatever it gets in. So when a fax comes from the PBX, its not T.38. U need a T.38 Gateway, which Asterisk is NOT, rather use OpenPBX.