[asterisk-bugs] [Asterisk 0013353]: [patch] check correct tags during REFER in pedantic mode

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Aug 27 08:52:42 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13353 
====================================================================== 
Reported By:                flefoll
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13353
Category:                   Channels/chan_sip/Transfers
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 139015 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-08-21 03:14 CDT
Last Modified:              2008-08-27 08:52 CDT
====================================================================== 
Summary:                    [patch] check correct tags during REFER in pedantic
mode
Description: 
Half of REFER request for attended transfers are rejected in pedantic mode,
depending on calls directions.
Indeed, function get_sip_pvt_byid_locked() includes a comment that says
that one should take care of call direction when checking from/to tags
against our/their tags, but nothing is done in code (neither in function,
nor in calling code) to do this.

I propose a patch that checks call direction before comparing from/to tags
(input parameters) and our/their tags (stored in pvt data structures).
The patch also fixes an error in a trace that checks SIP_OUTGOING flag
(last transaction direction) instead of SIP_PAGE2_OUTGOING_CALL (call
direction).
====================================================================== 

---------------------------------------------------------------------- 
 (0091785) flefoll (reporter) - 2008-08-27 08:52
 http://bugs.digium.com/view.php?id=13353#c91785 
---------------------------------------------------------------------- 
Frankly, I first tried to check SIP_OUTGOING first, since it was the flag
that was tested in get_sip_pvt_byid_locked() debug trace. But it did not
work.

Thus, I checked all 4 scenarios :
- incoming + outgoing + attended xfer
- outgoing + outgoing + attended xfer
- outgoing + incoming + attended xfer
- incoming + incoming + attended xfer
And it was clear that get_sip_pvt_byid_locked() receives fromtag and totag
as they were in REFER ReferTo:<...?Replaces> header, and these tags came
from initial INVITE for the call that was REFER'ed to, i.e. the right thing
to do was to check the *call* direction, in order to re-match from/to
against our/their tags that are stored in pvt structures.

I think this is consistent with RFC 3891 "The Session Initiation Protocol
(SIP) "Replaces" Header".
As far as I can understand, it also seems consistent with
draft-ietf-sipping-cc-transfer-09, 7.3. Attended Transfer. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-08-27 08:52 flefoll        Note Added: 0091785                          
======================================================================




More information about the asterisk-bugs mailing list