[asterisk-bugs] [Asterisk 0015800]: [patch] Fetching SIP headers from BYE sent by callee
Asterisk Bug Tracker
noreply at bugs.digium.com
Thu Mar 18 12:36:26 CDT 2010
The following issue has been UPDATED.
======================================================================
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: confirmed
Asterisk Version: SVN
JIRA:
Regression: No
Reviewboard Link:
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: 2010-03-18 12:36 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.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2010-03-18 12:36 lmadsen Description Updated
======================================================================
More information about the asterisk-bugs
mailing list