[Asterisk-code-review] chan sip: Access incoming REFER headers in dialplan (asterisk[master])

Richard Mudgett asteriskteam at digium.com
Wed Aug 2 19:17:31 CDT 2017


Richard Mudgett has uploaded a new patch set (#6) to the change originally created by Kirill Katsnelson. ( https://gerrit.asterisk.org/6118 )

Change subject: chan_sip: Access incoming REFER headers in dialplan
......................................................................

chan_sip: Access incoming REFER headers in dialplan

This adds a way to access information passed along with SIP headers in
a REFER message that initiates a transfer. Headers matching a dialplan
variable GET_TRANSFERRER_DATA in the transferrer channel are added to
a HASH object TRANSFER_DATA to be accessed with functions HASHKEY and HASH.

The variable GET_TRANSFERRER_DATA is interpreted to be a prefix for
headers that should be put into the hash. If not set, no headers are
included. If set to a string (perhaps 'X-' in a typical case), all headers
starting this string are added. Empty string matches all headers.

If there are multiple of the same header, only the latest occurrence in
the REFER message is available in the hash.

Obviously, the variable GET_TRANSFERRER_DATA must be inherited by the
referrer channel, and should be set with the '_' or '__' prefix.

I avoided a specific reference to SIP or REFER, as in my mind the mechanism
can be generalized to other channel techs.

ASTERISK-27162

Change-Id: I73d7a1e95981693bc59aa0d5093c074b555f708e
---
M CHANGES
M channels/chan_sip.c
2 files changed, 56 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/18/6118/6
-- 
To view, visit https://gerrit.asterisk.org/6118
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I73d7a1e95981693bc59aa0d5093c074b555f708e
Gerrit-Change-Number: 6118
Gerrit-PatchSet: 6
Gerrit-Owner: Kirill Katsnelson <kkm at smartaction.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Kirill Katsnelson <kkm at smartaction.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170802/fa9e02c6/attachment.html>


More information about the asterisk-code-review mailing list