[Home]

Summary:ASTERISK-00128: Asterisk doesn't respond to 407 for BYE
Reporter:linxu01 (linxu01)Labels:
Date Opened:2003-08-19 16:39:37Date Closed:2004-09-25 02:40:14
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:When an incoming call from a sip proxy to an extension on *, if * hangs up first and * will send BYE to the proxy. The proxy will reply with a 407 for BYE, but * doesn't know how to handle it. Here is the register entry in  sip.conf:

register=9988:123456@sip.mydomain.net/1207

Here is the sip debug message:
(1204 on the sip proxy calling 9988, which routed to 1207 on the *. When 1207 hangs up first, * closes the sip session between * and 1207 first, then sending a BYE to proxy. proxy return a 407, causing * not handling. Finally 1204 hangs up.)

INVITE sip:1207@10.1.3.17 SIP/2.0
Via: SIP/2.0/UDP 10.1.2.15:5060;branch=1_gZ2M2HjLZ7L5HjfdWDl10Q99
Via: SIP/2.0/UDP 10.1.1.1:5060
From: "1204" <sip:1204@sip.mydomain.net>;tag=5250070017d68010a86c32-6fe0d44d
To: sip:9988@sip.mydomain.net
Call-ID: 00075052-80d62845-28b3aed2-71155263@10.1.1.1
Date:Tue, 19 Aug 2003 20:14:34 GMT
User-Agent:Cisco-SIP-IP-Phone/2
CSeq: 102 INVITE
Expires: 1500
Contact:sip:1204@10.1.1.1:5060
Content-Type:application/sdp
Content-Length: 169
Record-Route: <sip:9988@sip.mydomain.net:5060;maddr=10.1.2.15>

v=0
o=CiscoSystemsSIP-IPPhone-UserAgent 4482 20697 IN IP4 10.1.1.1
s=SIP Call
c=IN IP4 10.1.1.1
t=0 0
m=audio 23660 RTP/AVP 0 8 18
a=rtpmap:0 pcmu/8000

14 headers, 7 lines
Using latest request as basis request
Sending to 10.1.2.15 : 5060 (non-NAT)
Found audio format UNKN
Found audio format ALAW
Found audio format UNKN
Found description format pcmu
Capabilities: us - 524300, them - 268/0, combined - 12
Non-codec capabilities: us - 1, them - 0, combined - 0
DEBUG[147466]: File chan_sip.c, Line 4628 (handle_request): Check for res
DEBUG[147466]: File chan_sip.c, Line 906 (find_user):  is not a local user
Looking for 1207 in sip-incoming
DEBUG[147466]: File chan_sip.c, Line 3131 (build_route): build_route: Record-Route hop: <sip:9988@sip.mydomain.net:5060;maddr=10.1.2.15>
DEBUG[147466]: File chan_sip.c, Line 3156 (build_route): build_route: Contact hop: sip:1204@10.1.1.1:5060
list_route: hop: <sip:9988@sip.mydomain.net:5060;maddr=10.1.2.15>
list_route: hop: <sip:1204@10.1.1.1:5060>
Transmitting (no NAT):
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.1.2.15:5060;branch=1_gZ2M2HjLZ7L5HjfdWDl10Q99
Via: SIP/2.0/UDP 10.1.1.1:5060
From: "1204" <sip:1204@sip.mydomain.net>;tag=5250070017d68010a86c32-6fe0d44d
To: sip:9988@sip.mydomain.net;tag=as4c6fc279
Call-ID: 00075052-80d62845-28b3aed2-71155263@10.1.1.1
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:1207@10.1.3.17>
Content-Length: 0


to 10.1.2.15:5060
   -- Executing Dial("SIP/-081135f0", "SIP/1207|10") in new stack
DEBUG[311314]: File chan_sip.c, Line 622 (create_addr): Setting NAT on RTP to -1
We're at 10.1.3.17 port 19358
Answering with preferred capability 4
Answering with capability 8
Answering with non-codec capability 1
11 headers, 10 lines
Reliably Transmitting:
INVITE sip:1207@172.17.252.27 SIP/2.0
Via: SIP/2.0/UDP 10.1.3.17:5060;branch=z9hG4bK1310c593
From: "1204" <sip:1204@10.1.3.17>;tag=as0c7a9c14
To: <sip:1207@172.17.252.27>
Contact: <sip:1204@10.1.3.17>
Call-ID: 38028e7d6d49f8d75a12940a76aeec04@10.1.3.17
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Content-Type: application/sdp
Content-Length: 211

v=0
o=root 2368 2368 IN IP4 10.1.3.17
s=session
c=IN IP4 10.1.3.17
t=0 0
m=audio 19358 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
(NAT) to 172.17.252.27:5060
   -- Called 1207
Sip read:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.1.3.17:5060;branch=z9hG4bK1310c593
From: "1204" <sip:1204@10.1.3.17>;tag=as0c7a9c14
To: <sip:1207@172.17.252.27>;tag=468530005584d5594c7654-272b913f
Call-ID: 38028e7d6d49f8d75a12940a76aeec04@10.1.3.17
Server: Cisco-SIP-IP-Phone/2
Date: Tue, 19 Aug 2003 20:14:34 GMT
CSeq: 102 INVITE
Content-Length: 0


9 headers, 0 lines
DEBUG[147466]: File chan_sip.c, Line 515 (__sip_ack): Acked pending invite 102
DEBUG[147466]: File chan_sip.c, Line 533 (__sip_ack): Stopping retransmission on '38028e7d6d49f8d75a12940a76aeec04@10.1.3.17' of Request 102: Found
Sip read:
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.1.3.17:5060;branch=z9hG4bK1310c593
From: "1204" <sip:1204@10.1.3.17>;tag=as0c7a9c14
To: <sip:1207@172.17.252.27>;tag=468530005584d5594c7654-272b913f
Call-ID: 38028e7d6d49f8d75a12940a76aeec04@10.1.3.17
Server: Cisco-SIP-IP-Phone/2
Date: Tue, 19 Aug 2003 20:14:34 GMT
CSeq: 102 INVITE
Content-Length: 0


9 headers, 0 lines
DEBUG[147466]: File chan_sip.c, Line 533 (__sip_ack): Stopping retransmission on '38028e7d6d49f8d75a12940a76aeec04@10.1.3.17' of Request 102: Not Found
   -- SIP/1207-1ca8 is ringing
Transmitting (no NAT):
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.1.2.15:5060;branch=1_gZ2M2HjLZ7L5HjfdWDl10Q99
Via: SIP/2.0/UDP 10.1.1.1:5060
From: "1204" <sip:1204@sip.mydomain.net>;tag=5250070017d68010a86c32-6fe0d44d
To: sip:9988@sip.mydomain.net;tag=as4c6fc279
Call-ID: 00075052-80d62845-28b3aed2-71155263@10.1.1.1
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:1207@10.1.3.17>
Content-Length: 0


to 10.1.2.15:5060
Sip read:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.1.3.17:5060;branch=z9hG4bK1310c593
From: "1204" <sip:1204@10.1.3.17>;tag=as0c7a9c14
To: <sip:1207@172.17.252.27>;tag=468530005584d5594c7654-272b913f
Call-ID: 38028e7d6d49f8d75a12940a76aeec04@10.1.3.17
Server: Cisco-SIP-IP-Phone/2
Contact: sip:1207@172.17.252.27:5060
Date: Tue, 19 Aug 2003 20:14:36 GMT
CSeq: 102 INVITE
Content-Type: application/sdp
Content-Length: 219

v=0
o=CiscoSystemsSIP-IPPhone-UserAgent 7907 8427 IN IP4 172.17.252.27
s=SIP Call
c=IN IP4 172.17.252.27
t=0 0
m=audio 28606 RTP/AVP 0 101
a=rtpmap:0 pcmu/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-11

11 headers, 9 lines
DEBUG[147466]: File chan_sip.c, Line 533 (__sip_ack): Stopping retransmission on '38028e7d6d49f8d75a12940a76aeec04@10.1.3.17' of Request 102: Not Found
Found audio format UNKN
Found audio format UNKN
Found description format pcmu
Found description format telephone-event
Capabilities: us - 524300, them - 4/0, combined - 4
Non-codec capabilities: us - 1, them - 1, combined - 1
DEBUG[147466]: File chan_sip.c, Line 3156 (build_route): build_route: Contact hop: sip:1207@172.17.252.27:5060
list_route: hop: <sip:1207@172.17.252.27:5060>
set_destination: Parsing <sip:1207@172.17.252.27:5060> for address/port to send to
set_destination: set destination to 172.17.252.27, port 5060
Transmitting:
ACK sip:1207@172.17.252.27 SIP/2.0
Via: SIP/2.0/UDP 10.1.3.17:5060;branch=z9hG4bK1310c593
From: "1204" <sip:1204@10.1.3.17>;tag=as0c7a9c14
To: <sip:1207@172.17.252.27>;tag=468530005584d5594c7654-272b913f
Contact: <sip:1204@10.1.3.17>
Call-ID: 38028e7d6d49f8d75a12940a76aeec04@10.1.3.17
CSeq: 102 ACK
User-Agent: Asterisk PBX
Content-Length: 0

(NAT) to 172.17.252.27:5060
   -- SIP/1207-1ca8 answered SIP/-081135f0
We're at 10.1.3.17 port 19770
Answering with preferred capability 4
Answering with capability 8
Reliably Transmitting (no NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.1.2.15:5060;branch=1_gZ2M2HjLZ7L5HjfdWDl10Q99
Via: SIP/2.0/UDP 10.1.1.1:5060
Record-Route: <sip:9988@sip.mydomain.net:5060;maddr=10.1.2.15>
From: "1204" <sip:1204@sip.mydomain.net>;tag=5250070017d68010a86c32-6fe0d44d
To: sip:9988@sip.mydomain.net;tag=as4c6fc279
Call-ID: 00075052-80d62845-28b3aed2-71155263@10.1.1.1
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:1207@10.1.3.17>
Content-Type: application/sdp
Content-Length: 155

v=0
o=root 2368 2368 IN IP4 10.1.3.17
s=session
c=IN IP4 10.1.3.17
t=0 0
m=audio 19770 RTP/AVP 0 8
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000

to 10.1.2.15:5060
   -- Attempting native bridge of SIP/-081135f0 and SIP/1207-1ca8
Sip read:
ACK sip:1207@10.1.3.17:5060 SIP/2.0
Via: SIP/2.0/UDP 10.1.2.15:5060;branch=1_gZ2M2HjLZ7L5HjfdWDl10Q99
Via: SIP/2.0/UDP 10.1.1.1:5060
From: "1204" <sip:1204@sip.mydomain.net>;tag=5250070017d68010a86c32-6fe0d44d
To: sip:9988@sip.mydomain.net;tag=as4c6fc279
Call-ID: 00075052-80d62845-28b3aed2-71155263@10.1.1.1
Date:Tue, 19 Aug 2003 20:14:35 GMT
CSeq: 102 ACK
Content-Length: 0


9 headers, 0 lines
DEBUG[147466]: File chan_sip.c, Line 533 (__sip_ack): Stopping retransmission on '00075052-80d62845-28b3aed2-71155263@10.1.1.1' of Response 102: Found
DEBUG[311314]: File rtp.c, Line 1007 (ast_rtp_write): Ooh, format changed from UNKN to ULAW
DEBUG[311314]: File rtp.c, Line 1007 (ast_rtp_write): Ooh, format changed from UNKN to ULAW
Sip read:
BYE sip:1204@10.1.3.17:5060 SIP/2.0
Via: SIP/2.0/UDP 172.17.252.27:5060
From: <sip:1207@172.17.252.27>;tag=468530005584d5594c7654-272b913f
To: "1204" <sip:1204@10.1.3.17>;tag=as0c7a9c14
Call-ID: 38028e7d6d49f8d75a12940a76aeec04@10.1.3.17
Date: Tue, 19 Aug 2003 20:14:39 GMT
User-Agent: Cisco-SIP-IP-Phone/2
CSeq: 101 BYE
Content-Length: 0


9 headers, 0 lines
Sending to 172.17.252.27 : 5060 (NAT)
Transmitting (NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.17.252.27:5060;received=172.17.252.27
From: <sip:1207@172.17.252.27>;tag=468530005584d5594c7654-272b913f
To: "1204" <sip:1204@10.1.3.17>;tag=as0c7a9c14
Call-ID: 38028e7d6d49f8d75a12940a76aeec04@10.1.3.17
CSeq: 101 BYE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:1204@10.1.3.17>
Content-Length: 0


to 172.17.252.27:5060
DEBUG[311314]: File channel.c, Line 2176 (ast_channel_bridge): Didn't get a frame from channel: SIP/1207-1ca8
DEBUG[311314]: File channel.c, Line 2244 (ast_channel_bridge): Bridge stops bridging channels SIP/-081135f0 and SIP/1207-1ca8
DEBUG[311314]: File chan_sip.c, Line 953 (sip_hangup): find_user(1207)
 == Spawn extension (sip-incoming, 1207, 1) exited non-zero on 'SIP/-081135f0'
DEBUG[311314]: File chan_sip.c, Line 953 (sip_hangup): find_user()
DEBUG[311314]: File chan_sip.c, Line 906 (find_user):  is not a local user
set_destination: Parsing <sip:9988@sip.mydomain.net:5060;maddr=10.1.2.15> for address/port to send to
set_destination: set destination to 10.1.2.15, port 5060
Reliably Transmitting:
BYE sip:1204@sip.mydomain.net SIP/2.0
Via: SIP/2.0/UDP 10.1.3.17:5060;branch=z9hG4bK65f4060b
Route: <sip:1204@10.1.1.1:5060>
From: sip:9988@sip.mydomain.net;tag=as4c6fc279
To: "1204" <sip:1204@sip.mydomain.net>;tag=5250070017d68010a86c32-6fe0d44d
Contact: <sip:1207@10.1.3.17>
Call-ID: 00075052-80d62845-28b3aed2-71155263@10.1.1.1
CSeq: 102 BYE
User-Agent: Asterisk PBX
Content-Length: 0

(no NAT) to 10.1.2.15:5060
Sip read:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.1.3.17:5060;branch=z9hG4bK65f4060b
From: sip:9988@sip.mydomain.net;tag=as4c6fc279
To: "1204" <sip:1204@sip.mydomain.net>;tag=5250070017d68010a86c32-6fe0d44d
Call-ID: 00075052-80d62845-28b3aed2-71155263@10.1.1.1
CSeq: 102 BYE
Content-Length: 0


7 headers, 0 lines
DEBUG[147466]: File chan_sip.c, Line 533 (__sip_ack): Stopping retransmission on '00075052-80d62845-28b3aed2-71155263@10.1.1.1' of Request 102: Found
Message is BYE
DEBUG[147466]: File chan_sip.c, Line 835 (__sip_destroy): Destorying call '38028e7d6d49f8d75a12940a76aeec04@10.1.3.17'
DEBUG[147466]: File chan_sip.c, Line 835 (__sip_destroy): Destorying call '00075052-80d62845-28b3aed2-71155263@10.1.1.1'
Sip read:
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 10.1.3.17:5060;branch=z9hG4bK65f4060b
From: sip:9988@sip.mydomain.net;tag=as4c6fc279
To: "1204" <sip:1204@sip.mydomain.net>;tag=5250070017d68010a86c32-6fe0d44d
Call-ID: 00075052-80d62845-28b3aed2-71155263@10.1.1.1
CSeq: 102 BYE
Content-Length: 0
Proxy-Authenticate:  Digest realm="mydomain.net",domain="sip:1204@sip.mydomain.net",nonce="qPcMY3W+jHMdEkzj/LXmyg==",algorithm=MD5


8 headers, 0 lines
DEBUG[147466]: File chan_sip.c, Line 4550 (handle_request): That's odd...  Got a response on a call we dont know about.
DEBUG[147466]: File chan_sip.c, Line 835 (__sip_destroy): Destorying call '00075052-80d62845-28b3aed2-71155263@10.1.1.1'
Sip read:
BYE sip:1207@10.1.3.17:5060 SIP/2.0
Via: SIP/2.0/UDP 10.1.2.15:5060;branch=1_ffS0vy16062B1IuupR8p5w99
Via: SIP/2.0/UDP 10.1.1.1:5060
From: "1204" <sip:1204@sip.mydomain.net>;tag=5250070017d68010a86c32-6fe0d44d
To: sip:9988@sip.mydomain.net;tag=as4c6fc279
Call-ID: 00075052-80d62845-28b3aed2-71155263@10.1.1.1
Date:Tue, 19 Aug 2003 20:14:42 GMT
User-Agent:Cisco-SIP-IP-Phone/2
CSeq: 103 BYE
Content-Length: 0


10 headers, 0 lines
Sending to 10.1.2.15 : 5060 (non-NAT)
Transmitting (no NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.1.2.15:5060;branch=1_ffS0vy16062B1IuupR8p5w99
Via: SIP/2.0/UDP 10.1.1.1:5060
From: "1204" <sip:1204@sip.mydomain.net>;tag=5250070017d68010a86c32-6fe0d44d
To: sip:9988@sip.mydomain.net;tag=as4c6fc279
Call-ID: 00075052-80d62845-28b3aed2-71155263@10.1.1.1
CSeq: 103 BYE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact:
Content-Length: 0


to 10.1.2.15:5060
Comments: