[asterisk-bugs] [Asterisk 0015800]: Fetching SIP headers from BYE sent by callee
Asterisk Bug Tracker
noreply at bugs.digium.com
Mon Aug 31 08:04:36 CDT 2009
The following issue has been SUBMITTED.
======================================================================
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: minor
Priority: normal
Status: new
Asterisk Version: SVN
Regression: No
SVN Branch (only for SVN checkouts, not tarball releases): trunk
SVN Revision (number only!): 214898
Request Review:
======================================================================
Date Submitted: 2009-08-31 08:04 CDT
Last Modified: 2009-08-31 08:04 CDT
======================================================================
Summary: 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.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2009-08-31 08:04 sergee New Issue
2009-08-31 08:04 sergee Asterisk Version => SVN
2009-08-31 08:04 sergee Regression => No
2009-08-31 08:04 sergee SVN Branch (only for SVN checkouts, not tarball
releases) => trunk
2009-08-31 08:04 sergee SVN Revision (number only!) => 214898
======================================================================
More information about the asterisk-bugs
mailing list