[Home]

Summary:ASTERISK-16099: [patch] SIP Directed pickup can result in dead channel.
Reporter:Steve Davies (one47)Labels:
Date Opened:2010-05-14 06:47:46Date Closed:2010-05-26 13:37:12
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) sip_magic_pickup2
Description:I have a scenario where a SIP Invite/Replaces is generated through the
press of a directed-pickup button on a phone, but the SIP pickup code
do_magic_pickup() cannot find the call in question (it is in the wrong
context).

In this case I would expect the Invite/Replaces call to be
hung-up. It is not.


****** ADDITIONAL INFORMATION ******

A hangup is attempted, as per the example below (line 13) but no packet is sent to cancel/hangup the call.

pabx*CLI> sip show history 3c2671cbaa85-4c7i5s86qb7v
* SIP Call
1. Rx              INVITE / 1 INVITE / sip:201@10.0.0.1
2. AuthChal        Auth challenge sent for  - nc 0
3. TxRespRel       SIP/2.0 / 1 INVITE - 401 Unauthorized
4. SchedDestroy    6400 ms
5. Rx              ACK / 1 ACK / sip:201@10.0.0.1
6. Rx              INVITE / 2 INVITE / sip:201@10.0.0.1
7. CancelDestroy
8. Invite          New call: 3c2671cbaa85-4c7i5s86qb7v
9. AuthOK          Auth challenge succesful for snom360
10. NewChan         Channel SIP/snom360-0000000f - from
3c2671cbaa85-4c7i5s86qb7v
11. Xfer            INVITE/Replace received
12. TxResp          SIP/2.0 / 2 INVITE - 100 Trying
13. Hangup          Cause Unknown
14. SchedDestroy    6400 ms
15. CancelDestroy

I would expect to see a "Cancel" being sent at line 13 - In fact it should be a "603 Unauthorised" or similar. The code is there, but p->invitestate is not set correctly so a Hangup() is attempted on a call that is not yet up, which is a NoOp.

Comments:By: Steve Davies (one47) 2010-05-14 08:27:08

Patch attached - It IMHO correctly sets p->invitestate when a "100 Trying..." is sent by chan_sip, and solves the channel not hungup correctly issue.

By: Steve Davies (one47) 2010-05-14 08:28:46

Please delete the first file "sip_magic_pickup" it is a dupe.

By: David Vossel (dvossel) 2010-05-26 13:27:41

I tested this, this fixes the problem.

By: Digium Subversion (svnbot) 2010-05-26 13:32:52

Repository: asterisk
Revision: 266006

U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r266006 | dvossel | 2010-05-26 13:32:51 -0500 (Wed, 26 May 2010) | 8 lines

fixes failed SIP Directed pickup resulting in dead channel

(closes issue ASTERISK-16099)
Reported by: one47
Patches:
     sip_magic_pickup2 uploaded by one47 (license 23)
Tested by: one47, dvossel

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=266006

By: Digium Subversion (svnbot) 2010-05-26 13:37:11

Repository: asterisk
Revision: 266007

_U  branches/1.6.2/
U   branches/1.6.2/channels/chan_sip.c

------------------------------------------------------------------------
r266007 | dvossel | 2010-05-26 13:37:11 -0500 (Wed, 26 May 2010) | 15 lines

Merged revisions 266006 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r266006 | dvossel | 2010-05-26 13:32:51 -0500 (Wed, 26 May 2010) | 8 lines
 
 fixes failed SIP Directed pickup resulting in dead channel
 
 (closes issue ASTERISK-16099)
 Reported by: one47
 Patches:
       sip_magic_pickup2 uploaded by one47 (license 23)
 Tested by: one47, dvossel
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=266007