Asterisk hangs up on outbound call when voicemail answers

I have a PIAF setup running behind a NAT FW. I use several VoIP providers including voip.ms, sipgate, vitelity and Google Voice. I do not have any issues with any of those providers. I am looking to use flowroute for some outbound traffic. I tested them out with my PAP2 and they worked great. They worked fine with just a softphone as well.

I have looked a numerous SIP and packet capture logs with flowroute support. For some reason it looks like the PBX is sending the BYE command to flowroute causing them to disconnect the remote party.

What I discovered is that this only happens if the call goes to voicemail. if somebody picks up the phone we can have a normal 2 way conversation. I have tested this with my work phone and my cell phone and the behavior is the same. If the call is allowed to go to voicemail the pbx will disconnect the remote party the moment that voicemail answers. My local softphone will stay offhook for a short period until it times out and hangs up.

I am using PIAF 1.6 with Asterisk 1.6.1.10.

Any help on resolving this issue would be appreciated.

Thanks,
HC

Perhaps you can post the output of the Asterisk CLI when this happens?

This occurs when the call is first dialed…all looks normal here:
– Called flowroute/1XXXXXX8144
– SIP/flowroute-0000000f is making progress passing it to SIP/702-0000000e

Then voicemail answers on the remote end…now all I hear is silence (and I know the other party hears a beep and gets disconnected at this point).
– SIP/flowroute-0000000f answered SIP/702-0000000e
– Packet2Packet bridging SIP/702-0000000e and SIP/flowroute-0000000f

After just sitting there with silence (and knowing that the remote party was already disconnected) my local phone hangs up because there is nobody on the other end:
– Executing [h@macro-dialout-trunk:1] Macro(“SIP/702-00000010”, “hangupcall,”) in new stack
– Executing [s@macro-hangupcall:1] ResetCDR(“SIP/702-00000010”, “vw”) in new stack
– Executing [s@macro-hangupcall:2] NoCDR(“SIP/702-00000010”, “”) in new stack
– Executing [s@macro-hangupcall:3] GotoIf(“SIP/702-00000010”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,6)
– Executing [s@macro-hangupcall:6] GotoIf(“SIP/702-00000010”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [s@macro-hangupcall:9] GotoIf(“SIP/702-00000010”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,11)
– Executing [s@macro-hangupcall:11] Hangup(“SIP/702-00000010”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on ‘SIP/702-00000010’ in macro ‘hangupcall’
== Spawn extension (macro-dialout-trunk, h, 1) exited non-zero on ‘SIP/702-00000010’
== Spawn extension (macro-dialout-trunk, s, 19) exited non-zero on ‘SIP/702-00000010’ in macro ‘dialout-trunk’
== Spawn extension (from-internal, 1XXXXXX8144, 4) exited non-zero on 'SIP/702-00000010

Here are a few more data points on this issue. I have several piaf installs. All of the installs where I am using Asterisk 1.6.1.10 are experiencing this disconnect issue with flowroute. I do not experience the issue if I am using Asterisk 1.4.21.2. I really want to stick with 1.6 because I am working on some TCP SIP trunks to Exchange server.

Below is a packet capture which shows Asterisk sending an ACK then a BYE to flowroute following a Status 200 OK message from flowroute after the call connects.

Please let me know if there is any additional information I can provide to assist in troubleshooting this issue.

HC

SIP packet capture:
No. Time Source Destination Protocol Info
6 0.191054 172.31.1.15 70.167.153.130 SIP/SDP Request: INVITE sip:1XXXXXX8144@sip.flowroute.com, with session description

Frame 6 (894 bytes on wire, 894 bytes captured)
Ethernet II, Src: D-Link_08:a5:37 (00:24:01:08:XX:XX), Dst: 3com_1e:3e:20 (00:01:03:1e:3e:20)
Internet Protocol, Src: 172.31.1.15 (172.31.1.15), Dst: 70.167.153.130 (70.167.153.130)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
Request-Line: INVITE sip:1XXXXXX8144@sip.flowroute.com SIP/2.0
Method: INVITE
Request-URI: sip:1XXXXXX8144@sip.flowroute.com
[Resent Packet: False]
Message Header
Via: SIP/2.0/UDP 172.31.1.15:5060;branch=z9hG4bK34a3e94a;rport
Max-Forwards: 70
From: “702” sip:702@sip.flowroute.com;tag=as61de4c3f
To: sip:1XXXXXX8144@sip.flowroute.com
Contact: sip:702@172.31.1.15
Call-ID: 0322ec7d73ac28192e97b784381610da@sip.flowroute.com
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.1.10
Date: Tue, 19 Jan 2010 05:33:34 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 284
Message Body

No. Time Source Destination Protocol Info
7 0.278852 70.167.153.130 172.31.1.15 SIP Status: 100 Trying

Frame 7 (328 bytes on wire, 328 bytes captured)
Ethernet II, Src: 3com_1e:3e:20 (00:01:03:1e:3e:20), Dst: D-Link_08:a5:37 (00:24:01:08:XX:XX)
Internet Protocol, Src: 70.167.153.130 (70.167.153.130), Dst: 172.31.1.15 (172.31.1.15)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
Status-Line: SIP/2.0 100 Trying
Status-Code: 100
[Resent Packet: False]
[Request Frame: 6]
[Response Time (ms): 88]
Message Header
Via: SIP/2.0/UDP 172.31.1.15:5060;branch=z9hG4bK34a3e94a;rport=5060
From: “702” sip:702@sip.flowroute.com;tag=as61de4c3f
To: sip:1XXXXXX8144@sip.flowroute.com
Call-ID: 0322ec7d73ac28192e97b784381610da@sip.flowroute.com
CSeq: 102 INVITE
Content-Length: 0

No. Time Source Destination Protocol Info
8 0.288287 70.167.153.130 172.31.1.15 SIP Status: 407 Proxy Authentication Required

Frame 8 (538 bytes on wire, 538 bytes captured)
Ethernet II, Src: 3com_1e:3e:20 (00:01:03:1e:3e:20), Dst: D-Link_08:a5:37 (00:24:01:08:XX:XX)
Internet Protocol, Src: 70.167.153.130 (70.167.153.130), Dst: 172.31.1.15 (172.31.1.15)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
Status-Line: SIP/2.0 407 Proxy Authentication Required
Status-Code: 407
[Resent Packet: False]
[Request Frame: 6]
[Response Time (ms): 98]
Message Header
Via: SIP/2.0/UDP 172.31.1.15:5060;received=75.73.XX.XX;branch=z9hG4bK34a3e94a;rport=5060
From: “702” sip:702@sip.flowroute.com;tag=as61de4c3f
To: sip:1XXXXXX8144@sip.flowroute.com;tag=b119c633111171d5a41b4118046e5815.a800
Call-ID: 0322ec7d73ac28192e97b784381610da@sip.flowroute.com
CSeq: 102 INVITE
Proxy-Authenticate: Digest realm=“sip.flowroute.com”, nonce=“4b55444d000014e5c1b7fb1122d68a0e4fad102a3b5ca333”, qop="auth"
Content-Length: 0

No. Time Source Destination Protocol Info
9 0.288379 172.31.1.15 70.167.153.130 SIP Request: ACK sip:1XXXXXX8144@sip.flowroute.com

Frame 9 (474 bytes on wire, 474 bytes captured)
Ethernet II, Src: D-Link_08:a5:37 (00:24:01:08:XX:XX), Dst: 3com_1e:3e:20 (00:01:03:1e:3e:20)
Internet Protocol, Src: 172.31.1.15 (172.31.1.15), Dst: 70.167.153.130 (70.167.153.130)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
Request-Line: ACK sip:1XXXXXX8144@sip.flowroute.com SIP/2.0
Method: ACK
Request-URI: sip:1XXXXXX8144@sip.flowroute.com
[Resent Packet: False]
[Request Frame: 6]
[Response Time (ms): 98]
Message Header
Via: SIP/2.0/UDP 172.31.1.15:5060;branch=z9hG4bK34a3e94a;rport
Max-Forwards: 70
From: “702” sip:702@sip.flowroute.com;tag=as61de4c3f
To: sip:1XXXXXX8144@sip.flowroute.com;tag=b119c633111171d5a41b4118046e5815.a800
Contact: sip:702@172.31.1.15
Call-ID: 0322ec7d73ac28192e97b784381610da@sip.flowroute.com
CSeq: 102 ACK
User-Agent: Asterisk PBX 1.6.1.10
Content-Length: 0

No. Time Source Destination Protocol Info
10 0.288590 172.31.1.15 70.167.153.130 SIP/SDP Request: INVITE sip:1XXXXXX8144@sip.flowroute.com, with session description

Frame 10 (1171 bytes on wire, 1171 bytes captured)
Ethernet II, Src: D-Link_08:a5:37 (00:24:01:08:XX:XX), Dst: 3com_1e:3e:20 (00:01:03:1e:3e:20)
Internet Protocol, Src: 172.31.1.15 (172.31.1.15), Dst: 70.167.153.130 (70.167.153.130)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
Request-Line: INVITE sip:1XXXXXX8144@sip.flowroute.com SIP/2.0
Method: INVITE
Request-URI: sip:1XXXXXX8144@sip.flowroute.com
[Resent Packet: False]
Message Header
Via: SIP/2.0/UDP 172.31.1.15:5060;branch=z9hG4bK770d1fdc;rport
Max-Forwards: 70
From: “702” sip:702@sip.flowroute.com;tag=as61de4c3f
To: sip:1XXXXXX8144@sip.flowroute.com
Contact: sip:702@172.31.1.15
Call-ID: 0322ec7d73ac28192e97b784381610da@sip.flowroute.com
CSeq: 103 INVITE
User-Agent: Asterisk PBX 1.6.1.10
[truncated] Proxy-Authorization: Digest username=“80470636”, realm=“sip.flowroute.com”, algorithm=MD5, uri="sip:1XXXXXX8144@sip.flowroute.com",

nonce=“4b55444d000014e5c1b7fb1122d68a0e4fad102a3b5ca333”, response="c61e2104599cdbf50fd7e9040df
Date: Tue, 19 Jan 2010 05:33:35 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 284
Message Body

No. Time Source Destination Protocol Info
11 0.376517 70.167.153.130 172.31.1.15 SIP Status: 100 Trying

Frame 11 (328 bytes on wire, 328 bytes captured)
Ethernet II, Src: 3com_1e:3e:20 (00:01:03:1e:3e:20), Dst: D-Link_08:a5:37 (00:24:01:08:XX:XX)
Internet Protocol, Src: 70.167.153.130 (70.167.153.130), Dst: 172.31.1.15 (172.31.1.15)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
Status-Line: SIP/2.0 100 Trying
Status-Code: 100
[Resent Packet: False]
[Request Frame: 10]
[Response Time (ms): 87]
Message Header
Via: SIP/2.0/UDP 172.31.1.15:5060;branch=z9hG4bK770d1fdc;rport=5060
From: “702” sip:702@sip.flowroute.com;tag=as61de4c3f
To: sip:1XXXXXX8144@sip.flowroute.com
Call-ID: 0322ec7d73ac28192e97b784381610da@sip.flowroute.com
CSeq: 103 INVITE
Content-Length: 0

No. Time Source Destination Protocol Info
12 3.553401 70.167.153.130 172.31.1.15 SIP/SDP Status: 183 Session Progress, with session description

Frame 12 (756 bytes on wire, 756 bytes captured)
Ethernet II, Src: 3com_1e:3e:20 (00:01:03:1e:3e:20), Dst: D-Link_08:a5:37 (00:24:01:08:XX:XX)
Internet Protocol, Src: 70.167.153.130 (70.167.153.130), Dst: 172.31.1.15 (172.31.1.15)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
Status-Line: SIP/2.0 183 Session Progress
Status-Code: 183
[Resent Packet: False]
[Request Frame: 10]
[Response Time (ms): 3264]
Message Header
Via: SIP/2.0/UDP 172.31.1.15:5060;received=75.73.XX.XX;branch=z9hG4bK770d1fdc;rport=5060
From: sip:702@flowroute.com;tag=as61de4c3f
To: sip:+1XXXXXX8144@flowroute.com;tag=14702
Call-ID: 0322ec7d73ac28192e97b784381610da@sip.flowroute.com
CSeq: 103 INVITE
Content-Type: application/sdp
Contact: sip:1XXXXXX8144@64.194.139.61:5060;user=phone;transport=udp
Supported: timer,100rel
Content-Length: 192
Record-Route: sip:216.115.69.133;lr
Record-Route: sip:70.167.153.130;lr
Message Body

No. Time Source Destination Protocol Info
14 3.940426 70.167.153.130 172.31.1.15 SIP Request: OPTIONS sip:75.73.XX.XX:5060

Frame 14 (489 bytes on wire, 489 bytes captured)
Ethernet II, Src: 3com_1e:3e:20 (00:01:03:1e:3e:20), Dst: D-Link_08:a5:37 (00:24:01:08:XX:XX)
Internet Protocol, Src: 70.167.153.130 (70.167.153.130), Dst: 172.31.1.15 (172.31.1.15)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
Request-Line: OPTIONS sip:75.73.XX.XX:5060 SIP/2.0
Method: OPTIONS
Request-URI: sip:75.73.XX.XX:5060
[Resent Packet: False]
Message Header
Max-Forwards: 10
Record-Route: sip:70.167.153.130;lr
Via: SIP/2.0/UDP 70.167.153.130:5060;branch=z9hG4bK93a4.d2b2b4104ef9dadbcb1c244c5640a786.0
Via: SIP/2.0/UDP 216.115.69.131:5060;branch=0
Route: sip:70.167.153.130;lr;received="sip:75.73.XX.XX:5060"
From: sip:ping@invalid;tag=dff6d8f6
To: sip:75.73.XX.XX:5060
Call-ID: a51e63d1-fd9080f3-7211@216.115.69.131
CSeq: 1 OPTIONS
Content-Length: 0

No. Time Source Destination Protocol Info
15 3.940609 172.31.1.15 70.167.153.130 SIP Status: 200 OK

Frame 15 (610 bytes on wire, 610 bytes captured)
Ethernet II, Src: D-Link_08:a5:37 (00:24:01:08:XX:XX), Dst: 3com_1e:3e:20 (00:01:03:1e:3e:20)
Internet Protocol, Src: 172.31.1.15 (172.31.1.15), Dst: 70.167.153.130 (70.167.153.130)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
Status-Line: SIP/2.0 200 OK
Status-Code: 200
[Resent Packet: False]
[Request Frame: 14]
[Response Time (ms): 0]
Message Header
Via: SIP/2.0/UDP 70.167.153.130:5060;branch=z9hG4bK93a4.d2b2b4104ef9dadbcb1c244c5640a786.0;received=70.167.153.130
Via: SIP/2.0/UDP 216.115.69.131:5060;branch=0
Record-Route: sip:70.167.153.130;lr
From: sip:ping@invalid;tag=dff6d8f6
To: sip:75.73.XX.XX:5060;tag=as1bfe7e8e
Call-ID: a51e63d1-fd9080f3-7211@216.115.69.131
CSeq: 1 OPTIONS
Server: Asterisk PBX 1.6.1.10
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: sip:172.31.1.15
Accept: application/sdp
Content-Length: 0

No. Time Source Destination Protocol Info
2177 25.553689 70.167.153.130 172.31.1.15 SIP/SDP Status: 200 OK, with session description

Frame 2177 (742 bytes on wire, 742 bytes captured)
Ethernet II, Src: 3com_1e:3e:20 (00:01:03:1e:3e:20), Dst: D-Link_08:a5:37 (00:24:01:08:XX:XX)
Internet Protocol, Src: 70.167.153.130 (70.167.153.130), Dst: 172.31.1.15 (172.31.1.15)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
Status-Line: SIP/2.0 200 OK
Status-Code: 200
[Resent Packet: False]
[Request Frame: 10]
[Response Time (ms): 25265]
Message Header
Via: SIP/2.0/UDP 172.31.1.15:5060;received=75.73.XX.XX;branch=z9hG4bK770d1fdc;rport=5060
From: sip:702@flowroute.com;tag=as61de4c3f
To: sip:+1XXXXXX8144@flowroute.com;tag=14702
Call-ID: 0322ec7d73ac28192e97b784381610da@sip.flowroute.com
CSeq: 103 INVITE
Content-Type: application/sdp
Contact: sip:1XXXXXX8144@64.194.139.61:5060;user=phone;transport=udp
Supported: timer,100rel
Content-Length: 192
Record-Route: sip:216.115.69.133;lr
Record-Route: sip:70.167.153.130;lr
Message Body

No. Time Source Destination Protocol Info
2178 25.553920 172.31.1.15 70.167.153.130 SIP Request: ACK sip:1XXXXXX8144@64.194.139.61:5060;user=phone;transport=udp

Frame 2178 (524 bytes on wire, 524 bytes captured)
Ethernet II, Src: D-Link_08:a5:37 (00:24:01:08:XX:XX), Dst: 3com_1e:3e:20 (00:01:03:1e:3e:20)
Internet Protocol, Src: 172.31.1.15 (172.31.1.15), Dst: 70.167.153.130 (70.167.153.130)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
Request-Line: ACK sip:1XXXXXX8144@64.194.139.61:5060;user=phone;transport=udp SIP/2.0
Method: ACK
Request-URI: sip:1XXXXXX8144@64.194.139.61:5060;user=phone;transport=udp
[Resent Packet: False]
[Request Frame: 10]
[Response Time (ms): 25265]
Message Header
Via: SIP/2.0/UDP 172.31.1.15:5060;branch=z9hG4bK4b4eb481;rport
Route: sip:70.167.153.130;lr,sip:216.115.69.133;lr
Max-Forwards: 70
From: “702” sip:702@sip.flowroute.com;tag=as61de4c3f
To: sip:1XXXXXX8144@sip.flowroute.com;tag=14702
Contact: sip:702@172.31.1.15
Call-ID: 0322ec7d73ac28192e97b784381610da@sip.flowroute.com
CSeq: 103 ACK
User-Agent: Asterisk PBX 1.6.1.10
Content-Length: 0

No. Time Source Destination Protocol Info
2179 25.554006 172.31.1.15 70.167.153.130 SIP Request: BYE sip:1XXXXXX8144@64.194.139.61:5060;user=phone;transport=udp

Frame 2179 (834 bytes on wire, 834 bytes captured)
Ethernet II, Src: D-Link_08:a5:37 (00:24:01:08:XX:XX), Dst: 3com_1e:3e:20 (00:01:03:1e:3e:20)
Internet Protocol, Src: 172.31.1.15 (172.31.1.15), Dst: 70.167.153.130 (70.167.153.130)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
Request-Line: BYE sip:1XXXXXX8144@64.194.139.61:5060;user=phone;transport=udp SIP/2.0
Method: BYE
Request-URI: sip:1XXXXXX8144@64.194.139.61:5060;user=phone;transport=udp
[Resent Packet: False]
Message Header
Via: SIP/2.0/UDP 172.31.1.15:5060;branch=z9hG4bK370a58be;rport
Route: sip:70.167.153.130;lr,sip:216.115.69.133;lr
Max-Forwards: 70
From: “702” sip:702@sip.flowroute.com;tag=as61de4c3f
To: sip:1XXXXXX8144@sip.flowroute.com;tag=14702
Call-ID: 0322ec7d73ac28192e97b784381610da@sip.flowroute.com
CSeq: 104 BYE
User-Agent: Asterisk PBX 1.6.1.10
[truncated] Proxy-Authorization: Digest username=“80470636”, realm=“sip.flowroute.com”, algorithm=MD5, uri=“sip:1XXXXXX8144@64.194.139.61:5060”,

nonce=“4b55444d000014e5c1b7fb1122d68a0e4fad102a3b5ca333”, response="3112da0a7de002687f514337fe
X-Asterisk-HangupCause: Unknown
X-Asterisk-HangupCauseCode: 0
Content-Length: 0

No. Time Source Destination Protocol Info
2208 25.723210 70.167.153.130 172.31.1.15 SIP Status: 200 OK

Frame 2208 (422 bytes on wire, 422 bytes captured)
Ethernet II, Src: 3com_1e:3e:20 (00:01:03:1e:3e:20), Dst: D-Link_08:a5:37 (00:24:01:08:XX:XX)
Internet Protocol, Src: 70.167.153.130 (70.167.153.130), Dst: 172.31.1.15 (172.31.1.15)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
Status-Line: SIP/2.0 200 OK
Status-Code: 200
[Resent Packet: False]
[Request Frame: 2179]
[Response Time (ms): 169]
[Release Time (ms): 169]
Message Header
Via: SIP/2.0/UDP 172.31.1.15:5060;received=75.73.XX.XX;branch=z9hG4bK370a58be;rport=5060
From: sip:702@flowroute.com;tag=as61de4c3f
To: sip:+1XXXXXX8144@flowroute.com;tag=14702
Call-ID: 0322ec7d73ac28192e97b784381610da@sip.flowroute.com
CSeq: 104 BYE
Contact: sip:1XXXXXX8144@64.194.139.61:5060;user=phone
Supported: timer,100rel
Content-Length: 0

No. Time Source Destination Protocol Info
5408 57.556925 172.31.1.15 70.167.153.130 SIP Request: BYE sip:1XXXXXX8144@64.194.139.61:5060;user=phone;transport=udp

Frame 5408 (843 bytes on wire, 843 bytes captured)
Ethernet II, Src: D-Link_08:a5:37 (00:24:01:08:XX:XX), Dst: 3com_1e:3e:20 (00:01:03:1e:3e:20)
Internet Protocol, Src: 172.31.1.15 (172.31.1.15), Dst: 70.167.153.130 (70.167.153.130)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
Request-Line: BYE sip:1XXXXXX8144@64.194.139.61:5060;user=phone;transport=udp SIP/2.0
Method: BYE
Request-URI: sip:1XXXXXX8144@64.194.139.61:5060;user=phone;transport=udp
[Resent Packet: False]
Message Header
Via: SIP/2.0/UDP 172.31.1.15:5060;branch=z9hG4bK721b2e79;rport
Route: sip:70.167.153.130;lr,sip:216.115.69.133;lr
Max-Forwards: 70
From: “702” sip:702@sip.flowroute.com;tag=as61de4c3f
To: sip:1XXXXXX8144@sip.flowroute.com;tag=14702
Call-ID: 0322ec7d73ac28192e97b784381610da@sip.flowroute.com
CSeq: 105 BYE
User-Agent: Asterisk PBX 1.6.1.10
[truncated] Proxy-Authorization: Digest username=“80470636”, realm=“sip.flowroute.com”, algorithm=MD5, uri=“sip:1XXXXXX8144@64.194.139.61:5060”,

nonce=“4b55444d000014e5c1b7fb1122d68a0e4fad102a3b5ca333”, response="0d595182797853917c3995bd54
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0

No. Time Source Destination Protocol Info
5412 57.692712 70.167.153.130 172.31.1.15 SIP Status: 481 Unknown Dialog

Frame 5412 (350 bytes on wire, 350 bytes captured)
Ethernet II, Src: 3com_1e:3e:20 (00:01:03:1e:3e:20), Dst: D-Link_08:a5:37 (00:24:01:08:XX:XX)
Internet Protocol, Src: 70.167.153.130 (70.167.153.130), Dst: 172.31.1.15 (172.31.1.15)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
Status-Line: SIP/2.0 481 Unknown Dialog
Status-Code: 481
[Resent Packet: False]
[Request Frame: 5408]
[Response Time (ms): 135]
[Release Time (ms): 135]
Message Header
Via: SIP/2.0/UDP 172.31.1.15:5060;received=75.73.XX.XX;branch=z9hG4bK721b2e79;rport=5060
From: sip:702@flowroute.com;tag=as61de4c3f
To: sip:1XXXXXX8144@flowroute.com;tag=14702
Call-ID: 0322ec7d73ac28192e97b784381610da@sip.flowroute.com
CSeq: 105 BYE
Content-Length: 0

No. Time Source Destination Protocol Info
5413 60.025441 70.167.153.130 172.31.1.15 SIP Request: OPTIONS sip:75.73.XX.XX:5060

Frame 5413 (489 bytes on wire, 489 bytes captured)
Ethernet II, Src: 3com_1e:3e:20 (00:01:03:1e:3e:20), Dst: D-Link_08:a5:37 (00:24:01:08:XX:XX)
Internet Protocol, Src: 70.167.153.130 (70.167.153.130), Dst: 172.31.1.15 (172.31.1.15)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
Request-Line: OPTIONS sip:75.73.XX.XX:5060 SIP/2.0
Method: OPTIONS
Request-URI: sip:75.73.XX.XX:5060
[Resent Packet: False]
Message Header
Max-Forwards: 10
Record-Route: sip:70.167.153.130;lr
Via: SIP/2.0/UDP 70.167.153.130:5060;branch=z9hG4bK30e4.8010986af29e411313a215998243ed06.0
Via: SIP/2.0/UDP 216.115.69.131:5060;branch=0
Route: sip:70.167.153.130;lr;received="sip:75.73.XX.XX:5060"
From: sip:ping@invalid;tag=9447d8f6
To: sip:75.73.XX.XX:5060
Call-ID: a51e63d1-b2e080f3-e511@216.115.69.131
CSeq: 1 OPTIONS
Content-Length: 0

No. Time Source Destination Protocol Info
5414 60.025659 172.31.1.15 70.167.153.130 SIP Status: 200 OK

Frame 5414 (610 bytes on wire, 610 bytes captured)
Ethernet II, Src: D-Link_08:a5:37 (00:24:01:08:XX:XX), Dst: 3com_1e:3e:20 (00:01:03:1e:3e:20)
Internet Protocol, Src: 172.31.1.15 (172.31.1.15), Dst: 70.167.153.130 (70.167.153.130)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
Status-Line: SIP/2.0 200 OK
Status-Code: 200
[Resent Packet: False]
[Request Frame: 5413]
[Response Time (ms): 0]
Message Header
Via: SIP/2.0/UDP 70.167.153.130:5060;branch=z9hG4bK30e4.8010986af29e411313a215998243ed06.0;received=70.167.153.130
Via: SIP/2.0/UDP 216.115.69.131:5060;branch=0
Record-Route: sip:70.167.153.130;lr
From: sip:ping@invalid;tag=9447d8f6
To: sip:75.73.XX.XX:5060;tag=as1cd687a3
Call-ID: a51e63d1-b2e080f3-e511@216.115.69.131
CSeq: 1 OPTIONS
Server: Asterisk PBX 1.6.1.10
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: sip:172.31.1.15
Accept: application/sdp
Content-Length: 0

hchucky,

Did you ever get this resolved? I saw your post to http://forums.digium.com/viewtopic.php?f=1&t=72428 about the (sorta) same issue also.

I have this problem with all outbound calls to a particular provider.

Issue was version specific. The Asterisk package in Debian/stable (as of 2010-12-20) contains a bug where specific upstream term providers cause Asterisk to send a premature SIP BYE packet. I migrated the entire system over to Debian/testing and the problem resolved itself. Further debugging facilities would have been needed to be added to chan_sip.c to fully diagnose the issue.