[asterisk-bugs] [Asterisk 0015800]: [patch] Fetching SIP headers from BYE sent by callee

Asterisk Bug Tracker noreply at bugs.digium.com
Fri May 6 16:23:30 CDT 2011


The following issue has been CLOSED 
====================================================================== 
https://issues.asterisk.org/view.php?id=15800 
====================================================================== 
Reported By:                sergee
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   15800
Category:                   Channels/chan_sip/NewFeature
Reproducibility:            have not tried
Severity:                   feature
Priority:                   normal
Status:                     closed
Asterisk Version:           SVN 
JIRA:                       SWP-1111 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 214898 
Request Review:              
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             2009-08-31 08:04 CDT
Last Modified:              2011-05-06 16:23 CDT
====================================================================== 
Summary:                    [patch] Fetching SIP headers from BYE sent by callee
Description: 
We have simple situation:

exten => _X.,1,DIAL(SIP/mypeer/${EXTEN})
exten => h,1,AGI(billing)

There is no way to get headers from BYE message sent by callee. But a lot
of harware provide usefull headers in BYE message, for example Linksys
provide header P-RTP-Stat which contain packet counters, jitter, delay
etc..:

P-RTP-Stat:
PS=256,OS=40960,PR=244,OR=39040,PL=29920,JI=5,LA=0,DU=4,EN=G711a,DE=G711a

Cisco provides another usefull header 'Reason' which contain ISDN hangup
cause code:

Reason: Q.850;cause=16


This patch allows user to fetch any header from BYE sent by callee. It
introduces special variable SIPREMOTEBYEHEADER. This variable should
contain 2 coma separated values. 1st value - a sip header that should be
fetched, 2nd value - name of variable to put sip header in.

So to fetch Header 'Reason' sent by cisco, you simply need to set
variable:

exten => _X.,1,SET(SIPREMOTEBYEHEADER=Reason,MYVAR)
exten => _X.,2,DIAL(SIP/mypeer/${EXTEN})
exten => h,1,AGI(billing)

Right after mypeer sends a BYE, you will have variable MYVAR defined on
your channel.

Patches against branch 1.6.0 and trunk provided.
====================================================================== 

---------------------------------------------------------------------- 
 (0134614) lmadsen (administrator) - 2011-05-06 16:23
 https://issues.asterisk.org/view.php?id=15800#c134614 
---------------------------------------------------------------------- 
Closing this issue as suspended. If the original reporter wishes to make
improvements per the discussion posted by oej, that would be great. Thanks! 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-05-06 16:23 lmadsen        Note Added: 0134614                          
2011-05-06 16:23 lmadsen        Status                   confirmed => closed 
======================================================================




More information about the asterisk-bugs mailing list