[Home]

Summary:ASTERISK-18675: SendFax T.38 don't work
Reporter:Daniele Gallina (gallysoft)Labels:
Date Opened:2011-10-05 10:01:44Date Closed:2011-11-21 14:12:21.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/T.38 Resources/res_fax
Versions:1.8.7.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:CentOS 5 x86_64 [root@srv res]# uname -a Linux srv 2.6.18-194.32.1.el5 #1 SMP Wed Jan 5 17:52:25 EST 2011 x86_64 x86_64 x86_64 GNU/Linux Attachments:
Description:Hi.
I am trying to use SendFax with call file.
My SIP provider supports T.38, and I have not problems with it using GS HT502 with or without Asterisk in the middle.
ReceiveFax with T.38 works.
SendFax disabling T.38 (G.711a) works too.

This is my call file:

Channel: SIP/3ps_3p_test/0415161655
MaxRetries: 1
RetryTime: 120
WaitTime: 60
Context: from_fax
Extension: s
Set: file=/tmp/fax.tif

And this is debug:

   -- Attempting call on SIP/3ps_3p_test/0415161655 for s@from_fax:1 (Retry 1)
 == Using UDPTL TOS bits 184
 == Using UDPTL CoS mark 5
 == Using SIP RTP TOS bits 184
 == Using SIP RTP CoS mark 5
Audio is at 5060
Adding codec 0x8 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 80.xx.xx.xx:5060:
INVITE sip:0415161655@voip.xxxxxxx.net SIP/2.0
Via: SIP/2.0/UDP 95.xx.xx.xx:5060;branch=z9hG4bK1daead9a
Max-Forwards: 70
From: "asterisk" <sip:3ps_3p_test@95.xx.xx.xx>;tag=as46a7c898
To: <sip:0415161655@voip.xxxxxxx.net>
Contact: <sip:3ps_3p_test@95.xx.xx.xx:5060>
Call-ID: 57ac85996833daf46b35940e6e796a30@95.xx.xx.xx:5060
CSeq: 102 INVITE
User-Agent: MyUserAgent
Date: Wed, 05 Oct 2011 14:54:23 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 263

v=0
o=root 964150561 964150561 IN IP4 95.xx.xx.xx
s=Asterisk PBX 1.8.7.0
c=IN IP4 95.xx.xx.xx
t=0 0
m=audio 12760 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

---

<--- SIP read from UDP:80.xx.xx.xx:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 95.xx.xx.xx:5060;branch=z9hG4bK1daead9a;received=95.xx.xx.xx
From: "asterisk" <sip:3ps_3p_test@95.xx.xx.xx>;tag=as46a7c898
To: <sip:0415161655@voip.xxxxxxx.net>;tag=as320c7f48
Call-ID: 57ac85996833daf46b35940e6e796a30@95.xx.xx.xx:5060
CSeq: 102 INVITE
User-Agent: HisUserAgent
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="voipbeffect.net", nonce="484342fe"
Content-Length: 0

<------------->
--- (11 headers 0 lines) ---
Transmitting (no NAT) to 80.xx.xx.xx:5060:
ACK sip:0415161655@voip.xxxxxxx.net SIP/2.0
Via: SIP/2.0/UDP 95.xx.xx.xx:5060;branch=z9hG4bK1daead9a
Max-Forwards: 70
From: "asterisk" <sip:3ps_3p_test@95.xx.xx.xx>;tag=as46a7c898
To: <sip:0415161655@voip.xxxxxxx.net>;tag=as320c7f48
Contact: <sip:3ps_3p_test@95.xx.xx.xx:5060>
Call-ID: 57ac85996833daf46b35940e6e796a30@95.xx.xx.xx:5060
CSeq: 102 ACK
User-Agent: MyUserAgent
Content-Length: 0


---
Audio is at 5060
Adding codec 0x8 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 80.xx.xx.xx:5060:
INVITE sip:0415161655@voip.xxxxxxx.net SIP/2.0
Via: SIP/2.0/UDP 95.xx.xx.xx:5060;branch=z9hG4bK4cad841d
Max-Forwards: 70
From: "asterisk" <sip:3ps_3p_test@95.xx.xx.xx>;tag=as46a7c898
To: <sip:0415161655@voip.xxxxxxx.net>
Contact: <sip:3ps_3p_test@95.xx.xx.xx:5060>
Call-ID: 57ac85996833daf46b35940e6e796a30@95.xx.xx.xx:5060
CSeq: 103 INVITE
User-Agent: MyUserAgent
Authorization: Digest username="3ps_3p_test", realm="voipbeffect.net", algorithm=MD5, uri="sip:0415161655@voip.xxxxxxx.net", nonce="484342fe", response="a29e34a01eb9bcb80b6b66fe116a0cbe"
Date: Wed, 05 Oct 2011 14:54:23 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 263

v=0
o=root 964150561 964150562 IN IP4 95.xx.xx.xx
s=Asterisk PBX 1.8.7.0
c=IN IP4 95.xx.xx.xx
t=0 0
m=audio 12760 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

---

<--- SIP read from UDP:80.xx.xx.xx:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 95.xx.xx.xx:5060;branch=z9hG4bK4cad841d;received=95.xx.xx.xx
From: "asterisk" <sip:3ps_3p_test@95.xx.xx.xx>;tag=as46a7c898
To: <sip:0415161655@voip.xxxxxxx.net>
Call-ID: 57ac85996833daf46b35940e6e796a30@95.xx.xx.xx:5060
CSeq: 103 INVITE
User-Agent: HisUserAgent
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces, timer
Contact: <sip:0415161655@80.xx.xx.xx>
Content-Length: 0

<------------->
--- (11 headers 0 lines) ---

<--- SIP read from UDP:80.xx.xx.xx:5060 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 95.xx.xx.xx:5060;branch=z9hG4bK4cad841d;received=95.xx.xx.xx
From: "asterisk" <sip:3ps_3p_test@95.xx.xx.xx>;tag=as46a7c898
To: <sip:0415161655@voip.xxxxxxx.net>;tag=as53cd48f8
Call-ID: 57ac85996833daf46b35940e6e796a30@95.xx.xx.xx:5060
CSeq: 103 INVITE
User-Agent: HisUserAgent
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces, timer
Contact: <sip:0415161655@80.xx.xx.xx>
ontent-Type: application/sdp
Content-Length: 222

v=0
o=root 58238694 58238694 IN IP4 80.xx.xx.xx
s=HisUserAgent
c=IN IP4 80.xx.xx.xx
t=0 0
m=audio 17718 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
<------------->
--- (12 headers 11 lines) ---
Found RTP audio format 8
Found RTP audio format 101
Found audio description format PCMA for ID 8
Found audio description format telephone-event for ID 101
Capabilities: us - 0x8 (alaw), peer - audio=0x8 (alaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x8 (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 80.xx.xx.xx:17718

<--- SIP read from UDP:80.xx.xx.xx:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 95.xx.xx.xx:5060;branch=z9hG4bK4cad841d;received=95.xx.xx.xx
From: "asterisk" <sip:3ps_3p_test@95.xx.xx.xx>;tag=as46a7c898
To: <sip:0415161655@voip.xxxxxxx.net>;tag=as53cd48f8
Call-ID: 57ac85996833daf46b35940e6e796a30@95.xx.xx.xx:5060
CSeq: 103 INVITE
User-Agent: HisUserAgent
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces, timer
Contact: <sip:0415161655@80.xx.xx.xx>
Content-Type: application/sdp
Content-Length: 222

v=0
o=root 58238694 58238695 IN IP4 80.xx.xx.xx
s=HisUserAgent
c=IN IP4 80.xx.xx.xx
t=0 0
m=audio 17718 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
<------------->
--- (12 headers 11 lines) ---
Found RTP audio format 8
Found RTP audio format 101
Found audio description format PCMA for ID 8
Found audio description format telephone-event for ID 101
Capabilities: us - 0x8 (alaw), peer - audio=0x8 (alaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x8 (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 80.xx.xx.xx:17718
list_route: hop: <sip:0415161655@80.xx.xx.xx>
set_destination: Parsing <sip:0415161655@80.xx.xx.xx> for address/port to send to
set_destination: set destination to 80.xx.xx.xx:5060
Transmitting (no NAT) to 80.xx.xx.xx:5060:
ACK sip:0415161655@80.xx.xx.xx SIP/2.0
Via: SIP/2.0/UDP 95.xx.xx.xx:5060;branch=z9hG4bK1c98dd1d
Max-Forwards: 70
From: "asterisk" <sip:3ps_3p_test@95.xx.xx.xx>;tag=as46a7c898
To: <sip:0415161655@voip.xxxxxxx.net>;tag=as53cd48f8
Contact: <sip:3ps_3p_test@95.xx.xx.xx:5060>
Call-ID: 57ac85996833daf46b35940e6e796a30@95.xx.xx.xx:5060
CSeq: 103 ACK
User-Agent: MyUserAgent
Content-Length: 0


---
   -- Executing [s@from_fax:1] Wait("SIP/3ps_3p_test-00000001", "2") in new stack
   -- Executing [s@from_fax:2] SendFAX("SIP/3ps_3p_test-00000001", "/tmp/fax.tif,d") in new stack
   -- Channel 'SIP/3ps_3p_test-00000001' sending FAX:
   --    /tmp/fax.tif

<--- SIP read from UDP:80.xx.xx.xx:5060 --->
INVITE sip:3ps_3p_test@95.xx.xx.xx:5060 SIP/2.0
Via: SIP/2.0/UDP 80.xx.xx.xx:5060;branch=z9hG4bK09006f71;rport
Max-Forwards: 70
From: <sip:0415161655@voip.xxxxxxx.net>;tag=as53cd48f8
To: "asterisk" <sip:3ps_3p_test@95.xx.xx.xx>;tag=as46a7c898
Contact: <sip:0415161655@80.xx.xx.xx>
Call-ID: 57ac85996833daf46b35940e6e796a30@95.xx.xx.xx:5060
CSeq: 102 INVITE
User-Agent: HisUserAgent
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 356

v=0
o=root 58238694 58238696 IN IP4 80.xx.xx.xx
s=HisUserAgent
c=IN IP4 80.xx.xx.xx
t=0 0
m=image 4979 udptl t38
a=T38FaxVersion:0
a=T38MaxBitRate:7200
a=T38FaxFillBitRemoval:0
a=T38FaxTranscodingMMR:0
a=T38FaxTranscodingJBIG:0
a=T38FaxRateManagement:transferredTCF
a=T38FaxMaxBuffer:72
a=T38FaxMaxDatagram:72
a=T38FaxUdpEC:t38UDPRedundancy
<------------->
--- (13 headers 15 lines) ---
Sending to 80.xx.xx.xx:5060 (no NAT)
Got T.38 offer in SDP in dialog 57ac85996833daf46b35940e6e796a30@95.xx.xx.xx:5060
Capabilities: us - 0x8 (alaw), peer - audio=0x0 (nothing)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x0 (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 (no NAT) to 80.xx.xx.xx:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 80.xx.xx.xx:5060;branch=z9hG4bK09006f71;received=80.xx.xx.xx;rport=5060
From: <sip:0415161655@voip.xxxxxxx.net>;tag=as53cd48f8
To: "asterisk" <sip:3ps_3p_test@95.xx.xx.xx>;tag=as46a7c898
Call-ID: 57ac85996833daf46b35940e6e796a30@95.xx.xx.xx:5060
CSeq: 102 INVITE
Server: MyUserAgent
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Contact: <sip:3ps_3p_test@95.xx.xx.xx:5060>
Content-Length: 0


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

<--- Reliably Transmitting (no NAT) to 80.xx.xx.xx:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 80.xx.xx.xx:5060;branch=z9hG4bK09006f71;received=80.xx.xx.xx;rport=5060
From: <sip:0415161655@voip.xxxxxxx.net>;tag=as53cd48f8
To: "asterisk" <sip:3ps_3p_test@95.xx.xx.xx>;tag=as46a7c898
Call-ID: 57ac85996833daf46b35940e6e796a30@95.xx.xx.xx:5060
CSeq: 102 INVITE
Server: MyUserAgent
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Contact: <sip:3ps_3p_test@95.xx.xx.xx:5060>
Content-Type: application/sdp
Content-Length: 272

v=0
o=root 964150561 964150563 IN IP4 95.xx.xx.xx
s=Asterisk PBX 1.8.7.0
c=IN IP4 95.xx.xx.xx
t=0 0
m=image 4689 udptl t38
a=T38FaxVersion:0
a=T38MaxBitRate:14400
a=T38FaxRateManagement:transferredTCF
a=T38FaxMaxDatagram:1400
a=T38FaxUdpEC:t38UDPRedundancy

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

<--- SIP read from UDP:80.xx.xx.xx:5060 --->
ACK sip:3ps_3p_test@95.xx.xx.xx:5060 SIP/2.0
Via: SIP/2.0/UDP 80.xx.xx.xx:5060;branch=z9hG4bK05521a19;rport
Max-Forwards: 70
From: <sip:0415161655@voip.xxxxxxx.net>;tag=as53cd48f8
To: "asterisk" <sip:3ps_3p_test@95.xx.xx.xx>;tag=as46a7c898
Contact: <sip:0415161655@80.xx.xx.xx>
Call-ID: 57ac85996833daf46b35940e6e796a30@95.xx.xx.xx:5060
CSeq: 102 ACK
User-Agent: HisUserAgent
Content-Length: 0

<------------->
--- (10 headers 0 lines) ---
[Oct  5 16:54:27] FAX[21040]: res_fax.c:658 ast_fax_log: FLOW T.38 Tx     0: indicator no-signal
UDPTL (SIP/0415161655): packet to 80.xx.xx.xx:4979 (type 0, seq 0, len 6)
[Oct  5 16:54:28] FAX[21040]: res_fax.c:658 ast_fax_log: FLOW T.38 Tx     1: indicator cng
UDPTL (SIP/0415161655): packet to 80.xx.xx.xx:4979 (type 0, seq 1, len 8)
Reliably Transmitting (no NAT) to 80.xx.xx.xx:5060:
OPTIONS sip:voip.xxxxxxx.net SIP/2.0
Via: SIP/2.0/UDP 95.xx.xx.xx:5060;branch=z9hG4bK523669b3
Max-Forwards: 70
From: "asterisk" <sip:asterisk@95.xx.xx.xx>;tag=as7a45e5b1
To: <sip:voip.xxxxxxx.net>
Contact: <sip:asterisk@95.xx.xx.xx:5060>
Call-ID: 2264fee40ab0919641f82a561a00ad6c@95.xx.xx.xx:5060
CSeq: 102 OPTIONS
User-Agent: MyUserAgent
Date: Wed, 05 Oct 2011 14:54:40 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


---

<--- SIP read from UDP:80.xx.xx.xx:5060 --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 95.xx.xx.xx:5060;branch=z9hG4bK523669b3;received=95.xx.xx.xx
From: "asterisk" <sip:asterisk@95.xx.xx.xx>;tag=as7a45e5b1
To: <sip:voip.xxxxxxx.net>;tag=as452e3f61
Call-ID: 2264fee40ab0919641f82a561a00ad6c@95.xx.xx.xx:5060
CSeq: 102 OPTIONS
User-Agent: HisUserAgent
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces, timer
Accept: application/sdp
Content-Length: 0

<------------->
--- (11 headers 0 lines) ---
Really destroying SIP dialog '2264fee40ab0919641f82a561a00ad6c@95.xx.xx.xx:5060' Method: OPTIONS

<--- SIP read from UDP:80.xx.xx.xx:5060 --->
BYE sip:3ps_3p_test@95.xx.xx.xx:5060 SIP/2.0
Via: SIP/2.0/UDP 80.xx.xx.xx:5060;branch=z9hG4bK0563e083;rport
Max-Forwards: 70
From: <sip:0415161655@voip.xxxxxxx.net>;tag=as53cd48f8
To: "asterisk" <sip:3ps_3p_test@95.xx.xx.xx>;tag=as46a7c898
Call-ID: 57ac85996833daf46b35940e6e796a30@95.xx.xx.xx:5060
CSeq: 103 BYE
User-Agent: HisUserAgent
Content-Length: 0

<------------->
--- (9 headers 0 lines) ---
Sending to 80.xx.xx.xx:5060 (no NAT)
Scheduling destruction of SIP dialog '57ac85996833daf46b35940e6e796a30@95.xx.xx.xx:5060' in 6400 ms (Method: BYE)

<--- Transmitting (no NAT) to 80.xx.xx.xx:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 80.xx.xx.xx:5060;branch=z9hG4bK0563e083;received=80.xx.xx.xx;rport=5060
From: <sip:0415161655@voip.xxxxxxx.net>;tag=as53cd48f8
To: "asterisk" <sip:3ps_3p_test@95.xx.xx.xx>;tag=as46a7c898
Call-ID: 57ac85996833daf46b35940e6e796a30@95.xx.xx.xx:5060
CSeq: 103 BYE
Server: MyUserAgent
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


<------------>
[Oct  5 16:55:18] FAX[21040]: res_fax.c:658 ast_fax_log: FLOW T.30 Changing from state 18 to 32
[Oct  5 16:55:18] FAX[21040]: res_fax.c:658 ast_fax_log: FLOW T.30 Changing from phase T30_PHASE_A_CNG to T30_PHASE_CALL_FINISHED
[Oct  5 16:55:18] FAX[21040]: res_fax.c:658 ast_fax_log: FLOW T.38T Set rx type 9
[Oct  5 16:55:18] FAX[21040]: res_fax.c:658 ast_fax_log: FLOW T.38T Set tx type 9
[Oct  5 16:55:18] FAX[21040]: res_fax.c:658 ast_fax_log: FLOW T.38T FAX exchange complete
 == Spawn extension (from_fax, s, 2) exited non-zero on 'SIP/3ps_3p_test-00000001'
[Oct  5 16:55:18] NOTICE[21040]: pbx_spool.c:366 attempt_thread: Call completed to SIP/3ps_3p_test/0415161655
Comments:By: Gregory Hinton Nietsky (irroot) 2011-10-10 09:42:46.990-0500

you getting a error 404 from the device and then hangup.

By: Daniele Gallina (gallysoft) 2011-10-11 07:13:27.424-0500

The 404 error seems to be the response to my OPTIONS request...

By: Matthew Nicholson (mnicholson) 2011-11-01 08:55:46.823-0500

The remote end is disconnecting the call for some reason. Please upload a pcap from a failed fax attempt.

{noformat}
tcpdump -s1500 -vv -w failed-attempt1.pcap
{noformat}

By: Leif Madsen (lmadsen) 2011-11-21 14:12:14.912-0600

Suspended due to lack of activity. Please request a bug marshal in #asterisk-bugs on the IRC network irc.freenode.net to reopen the issue should you have the additional information requested.  Further information can be found at http://www.asterisk.org/developers/bug-guidelines