[asterisk-bugs] [Asterisk 0012101]: SIP channel hung due to CANCEL ReliableXmit (ReTX)

noreply at bugs.digium.com noreply at bugs.digium.com
Fri May 30 15:07:34 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=12101 
====================================================================== 
Reported By:                MVF
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   12101
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     confirmed
Asterisk Version:           1.4.18 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             02-28-2008 13:23 CST
Last Modified:              05-30-2008 15:07 CDT
====================================================================== 
Summary:                    SIP channel hung due to CANCEL ReliableXmit (ReTX)
Description: 
I've detected a problem that make asterisk keep sip channels up forever
even when the call has been disconnected, the problem keep UDP ports and
memory taken making asterisk to drop new calls when the sip channels hung
increase.

Reviewing the "sip show history" of one of these hung channels I see that
the call is cancel by calling party while is on ringing state, after that
asterisk send CANCEL to the peer but it didn't get an answer (maybe because
of network problems). After I get some bad responses from peer, maybe also
due to network problems that asterisk reply with an ACK but the history
shows a new ReliableXmit timeout message every 30 seconds.

(originating peer)
  * SIP Call
1. TxReqRel        INVITE / 102 INVITE - -UNKNOWN-
2. Rx              SIP/2.0 / 102 INVITE / 100 Trying
3. Rx              SIP/2.0 / 102 INVITE / 100 Trying
4. Rx              SIP/2.0 / 102 INVITE / 180 Ringing
5. Rx              SIP/2.0 / 102 INVITE / 180 Ringing
6. Cancel          Cause Normal Clearing
7. SchedDestroy    32000 ms
8. TxReqRel        CANCEL / 102 CANCEL - -UNKNOWN-
9. SchedDestroy    32000 ms
10. ReTx            1000 CANCEL sip:17898702397 at 20.20.20.25 SIP/2.0
11. ReTx            2000 CANCEL sip:17898702397 at 20.20.20.25 SIP/2.0
12. Rx              SIP/2.0 / 102 CANCEL / 100 Trying
13. ReliableXmit    timeout
14. Rx              SIP/2.0 / 102 INVITE / 180 Ringing
15. Rx              SIP/2.0 / 102 INVITE / 486 Busy Here
16. TxReq           ACK / 102 ACK - -UNKNOWN-
17. ReliableXmit    timeout
18. ReliableXmit    timeout
19. ReliableXmit    timeout
20. ReliableXmit    timeout
21. ReliableXmit    timeout
22. ReliableXmit    timeout
23. ReliableXmit    timeout
24. ReliableXmit    timeout
25. ReliableXmit    timeout
26. ReliableXmit    timeout
27. ReliableXmit    timeout
28. ReliableXmit    timeout
29. ReliableXmit    timeout
30. ReliableXmit    timeout
31. ReliableXmit    timeout
32. ReliableXmit    timeout
33. ReliableXmit    timeout
34. ReliableXmit    timeout
35. ReliableXmit    timeout
36. ReliableXmit    timeout
37. ReliableXmit    timeout
38. ReliableXmit    timeout
39. ReliableXmit    timeout
40. ReliableXmit    timeout
41. ReliableXmit    timeout
42. ReliableXmit    timeout
43. ReliableXmit    timeout
44. ReliableXmit    timeout
45. ReliableXmit    timeout
46. ReliableXmit    timeout
47. ReliableXmit    timeout
48. ReliableXmit    timeout
49. ReliableXmit    timeout
50. ReliableXmit    timeout

I got a capture for the sip transaction messages that generate these hung
sip channels, please take a look at it in the attached file including two
captures (20080227_sip_channel_hung_at_cancel_ReTX.txt), note that there is
no sip messages sent after the last ACK, the "ReliableXmit timeout"
messages appear in the history of the call filling the 50 slot buffer and
even deleting the old history messages. The "sip show channels" command
shows the channel hung forever.

20.20.20.25   1789870239  185d051b629  00102/00000  0x0 (nothing)    No 
(d)  Tx: ACK
====================================================================== 

---------------------------------------------------------------------- 
 dd1916 - 05-30-08 15:07  
---------------------------------------------------------------------- 
I tried the patch on our 1.4.17 but I still have several stuck channels

here is the sip show channel

* SIP Call
  Curr. trans. direction:  Outgoing
  Call-ID:               
94b138f0-a06000e-13c4-45026-11f95f-536b76fa-11f95f
  Owner channel ID:       <none>
  Our Codec Capability:   4
  Non-Codec Capability (DTMF):   1
  Their Codec Capability:   4
  Joint Codec Capability:   4
  Format:                 0x0 (nothing)
  MaxCallBR:              384 kbps
  Theoretical Address:    10.6.0.14:5060
  Received Address:       10.6.0.14:5060
  SIP Transfer mode:      open
  NAT Support:            No
  Audio IP:               172.16.100.101 (local)
  Our Tag:                as32f92656
  Their Tag:             
94b16bc8-a06000e-13c4-45026-11f95f-723aba38-11f95f
  SIP User agent:         ARRIS-TM402P release v.05.02.0X SN/0013113FC54F
  Username:               4185558698
  Peername:               4185558698
  Original uri:           sip:4185558698 at 10.6.0.14:5060
  Caller-ID:              4185558698
  Need Destroy:           2
  Last Message:           Rx: BYE
  Promiscuous Redir:      No
  Route:                  sip:4185558698 at 10.6.0.14:5060
  DTMF Mode:              rfc2833
  SIP Options:            replaces replace 100rel timer join 

here is the sip show history

1. Rx              INVITE / 1 INVITE / sip:5550927 at here.com:5060
2. AuthChal        Auth challenge sent for  - nc 0
3. TxRespRel       SIP/2.0 / 1 INVITE - 407 Proxy Authentication Required
4. SchedDestroy    32000 ms
5. Rx              ACK / 1 ACK / sip:5550927 at here.com:5060
6. Rx              INVITE / 2 INVITE / sip:5550927 at royaume.com:5060
7. CancelDestroy   
8. Invite          New call:
94b138f0-a06000e-13c4-45026-11f95f-536b76fa-11f95f
9. AuthOK          Auth challenge succesful for 4185558698
10. NewChan         Channel SIP/4185558698-0194b850 - from
94b138f0-a06000e-13c4-45
11. TxResp          SIP/2.0 / 2 INVITE - 100 Trying
12. TxResp          SIP/2.0 / 2 INVITE - 180 Ringing
13. TxRespRel       SIP/2.0 / 2 INVITE - 200 OK
14. Rx              ACK / 2 ACK / sip:5550927 at 172.16.100.101
15. ReInv           Re-invite sent
16. TxReqRel        INVITE / 102 INVITE - -UNKNOWN-
17. Rx              SIP/2.0 / 102 INVITE / 100 Trying
18. Rx              SIP/2.0 / 102 INVITE / 200 OK
19. TxReq           ACK / 102 ACK - -UNKNOWN-
20. ReInv           Re-invite sent
21. TxReqRel        INVITE / 103 INVITE - -UNKNOWN-
22. Rx              SIP/2.0 / 103 INVITE / 100 Trying
23. Rx              BYE / 3 BYE / sip:5550927 at 172.16.100.101
24. RTCPaudio      
Quality:ssrc=1371236592;themssrc=25523736;lp=0;rxjitter=0.01273
25. TxResp          SIP/2.0 / 3 BYE - 200 OK
26. Hangup          Cause Normal Clearing 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
05-30-08 15:07  dd1916         Note Added: 0087574                          
======================================================================




More information about the asterisk-bugs mailing list