[asterisk-bugs] [Asterisk 0014584]: [patch] Asterisk does not stop retransmission

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Jun 18 09:33:30 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=14584 
====================================================================== 
Reported By:                klaus3000
Assigned To:                mmichelson
====================================================================== 
Project:                    Asterisk
Issue ID:                   14584
Category:                   Channels/chan_sip/Interoperability
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     ready for testing
Target Version:             1.4.27
Asterisk Version:           1.4.23 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-03-02 09:22 CST
Last Modified:              2009-06-18 09:33 CDT
====================================================================== 
Summary:                    [patch] Asterisk does not stop retransmission
Description: 
Scenario:

<pre>
client                Asterisk
  ------INV,407,ACK-------->
  ------INV---------------->
                            -----INV---->
                            <---183------
  <-------183---------------
                            <---180------
  <-------180---------------
  --------CANCEL----------->
    X----487, 200-(loss)----

  ---CANCEL retransmission->
  <----487, 200-------------
  ---ACK------------------->

  <----487------------------
  <----487------------------
  <----487------------------
  <----487------------------
  <----487------------------
</pre>
====================================================================== 

---------------------------------------------------------------------- 
 (0106626) klaus3000 (reporter) - 2009-06-18 09:33
 https://issues.asterisk.org/view.php?id=14584#c106626 
---------------------------------------------------------------------- 
Hi!

With this patch Asterisk 1.4.24 crashes on reception of the retransmitted
CANCEL:

<--- Transmitting (no NAT) to 83.136.32.132:5061 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP
83.136.32.132:5061;branch=z9hG4bK-10506-1-4;received=83.136.32.132
From: <sip:klaus at 83.136.32.165>;tag=1
To: <sip:01505641636 at 83.136.32.165:5060>;tag=as5434e245
Call-ID: 1-10506 at 83.136.32.132
CSeq: 2 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:01505641636 at 83.136.32.165>
Content-Length: 0


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

<--- SIP read from 83.136.32.132:5061 --->
CANCEL sip:01505641636 at 83.136.32.165:5060 SIP/2.0
Via: SIP/2.0/UDP 83.136.32.132:5061;branch=z9hG4bK-10506-1-8
From: <sip:klaus at 83.136.32.165>;tag=1
To: <sip:01505641636 at 83.136.32.165:5060>
Call-ID: 1-10506 at 83.136.32.132
CSeq: 2 CANCEL
Max-Forwards: 70

<------------->
--- (7 headers 0 lines) ---
Sending to 83.136.32.132 : 5061 (no NAT)

<--- Reliably Transmitting (no NAT) to 83.136.32.132:5061 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP
83.136.32.132:5061;branch=z9hG4bK-10506-1-4;received=83.136.32.132
From: <sip:klaus at 83.136.32.165>;tag=1
To: <sip:01505641636 at 83.136.32.165:5060>;tag=as5434e245
Call-ID: 1-10506 at 83.136.32.132
CSeq: 2 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0


<------------>
[Jun 18 16:32:23] NOTICE[23306]: chan_sip.c:2067 __sip_reliable_xmit: Hey,
I just set the response code for this packet to 487

<--- Transmitting (no NAT) to 83.136.32.132:5061 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP
83.136.32.132:5061;branch=z9hG4bK-10506-1-8;received=83.136.32.132
From: <sip:klaus at 83.136.32.165>;tag=1
To: <sip:01505641636 at 83.136.32.165:5060>;tag=as5434e245
Call-ID: 1-10506 at 83.136.32.132
CSeq: 2 CANCEL
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0


<------------>
    -- Hungup 'DAHDI/1-1'
  == Spawn extension (direct, 01505641636, 9) exited non-zero on
'SIP/klaus-08fb17f8'

<--- SIP read from 83.136.32.132:5061 --->
CANCEL sip:01505641636 at 83.136.32.165:5060 SIP/2.0
Via: SIP/2.0/UDP 83.136.32.132:5061;branch=z9hG4bK-10506-1-12
From: <sip:klaus at 83.136.32.165>;tag=1
To: <sip:01505641636 at 83.136.32.165:5060>
Call-ID: 1-10506 at 83.136.32.132
CSeq: 2 CANCEL
Max-Forwards: 70

<------------->
--- (7 headers 0 lines) ---
Sending to 83.136.32.132 : 5061 (no NAT)
Scheduling destruction of SIP dialog '1-10506 at 83.136.32.132' in 32000 ms
(Method: CANCEL)
Segmentation fault (core dumped)



https://issues.asterisk.org/view.php?id=0  0xb61b7cde in handle_request_cancel
(p=0x8fb17f8, req=0xb6170050) at
chan_sip.c:15366
15366                                   prev_pkt->next = pkt->next;
(gdb) bt
https://issues.asterisk.org/view.php?id=0  0xb61b7cde in handle_request_cancel
(p=0x8fb17f8, req=0xb6170050) at
chan_sip.c:15366
https://issues.asterisk.org/view.php?id=1  0xb61bb2e2 in handle_request
(p=0x8fb17f8, req=0xb6170050,
sin=0xb6170040, recount=0xb6170034, nounlock=0xb6170038) at
chan_sip.c:16050
https://issues.asterisk.org/view.php?id=2  0xb61bc10f in sipsock_read
(id=0x8f7d7a0, fd=47, events=1, ignore=0x0)
at chan_sip.c:16293
https://issues.asterisk.org/view.php?id=3  0x080b0b54 in ast_io_wait
(ioc=0x8f70d00, howlong=999) at io.c:279
https://issues.asterisk.org/view.php?id=4  0xb61bcadc in do_monitor (data=0x0)
at chan_sip.c:16512
https://issues.asterisk.org/view.php?id=5  0x0810588d in dummy_start
(data=0x8f7d690) at utils.c:856
https://issues.asterisk.org/view.php?id=6  0xb7f1e4c0 in start_thread () from
/lib/i686/cmov/libpthread.so.0
https://issues.asterisk.org/view.php?id=7  0xb7e306de in clone () from
/lib/i686/cmov/libc.so.6 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-06-18 09:33 klaus3000      Note Added: 0106626                          
======================================================================




More information about the asterisk-bugs mailing list