[asterisk-bugs] [Asterisk 0014592]: [patch] export the SIP peer username of the transferer

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Sep 21 12:53:42 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=14592 
====================================================================== 
Reported By:                klaus3000
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   14592
Category:                   Channels/chan_sip/NewFeature
Reproducibility:            have not tried
Severity:                   feature
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           SVN 
JIRA:                        
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-03-03 09:42 CST
Last Modified:              2009-09-21 12:53 CDT
====================================================================== 
Summary:                    [patch] export the SIP peer username of the
transferer
Description: 
Hi!

When a blind transfer is initiated from a SIP, often the name of the
transferer is needed (e.g. billing, applying restrictions ...). Currently
there is a variable called SIPTRANSFER_REFERER which contains the value of
the Refered-By header - but this variable is not trustworthy, as the SIP
client can put anything into this variable.

Attached patch adds the variables SIPTRANSFERER_PEERNAME and
SIPTRANSFERER_USERNAME which contain the respective SIP username (peer or
user)
====================================================================== 

---------------------------------------------------------------------- 
 (0111092) kaii (reporter) - 2009-09-21 12:53
 https://issues.asterisk.org/view.php?id=14592#c111092 
---------------------------------------------------------------------- 
In the discussion on IRC with oej and others, we made clear that there is a
difference between "call transfer" and "call forward".  

TRANSFER requests are (at least in channel SIP) handled inside the sip
channel module. a variable BLINDTRANSFER is already being set when a SIP
REPLACE occurs.
this is not the case for attended transfers, but i think scenarios are
rare where the dialplan needs information about who did an attended
transfer _after_ a call is completed. (thus rendering an "ATTENDEDTRANSFER"
variable unneccessary)

FORWARD requests are raised from chan_sip into the core and the forward is
actually processed in app_dial. in this case, no variable is set to
indicate who actually transfered the call -- a valuable information in some
scenarios. 

i started the discussion on IRC asking if it was a bug that
"BLINDTRANSFER" was not set when a call forward occured. it is set on
REPLACE, but not on REDIR events..
i was then told the difference between TRANSFER and FORWARD and we
discussed about other solutions to retrieve this information from the
dialplan.
oej came up with a few ideas to solve this in dialplan, but none worked
for me.. 

i totally agree on the need of such a variable. i patched this in 1.2 and
1.4 for our own needs. 

i just want to add a few points to think about in the discussion:

* a call can be forwarded multiple times:  SIP/10 -> SIP/20 -> SIP/30 ...
i suspect that in your solution, as in mine too, the dialplan only
recognizes a forward from SIP/20 to SIP/30, but not that SIP/10 was
initially forwarding.

* as forward requests are raised through the core and are handled inside
the app itself (dial), i see this feature independent of channels.  i
implemented it inside app_dial and it works like a charm.  (and i suspect
it will work with other channels than chan_sip, too) 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-09-21 12:53 kaii           Note Added: 0111092                          
======================================================================




More information about the asterisk-bugs mailing list