[Home]

Summary:ASTERISK-27162: [patch]chan_sip: Access incoming SIP REFER headers in the dialplan
Reporter:Kirill Katsnelson (kkm)Labels:pjsip
Date Opened:2017-07-29 20:32:51Date Closed:2017-08-16 06:44:00
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/NewFeature PBX/NewFeature
Versions:GIT Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:This has been requested every so infrequently but steadily (e. g. https://community.asterisk.org/t/how-to-send-variable-information-via-sip-header/70178 for a fairly recent request). Now we are stuck without it too. An obvious hack-around that we once used is pack more data into

Feature description I am putting into the Git comment that explains it:
----
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.
----
I would appreciate comments on the feature and ways to possibly implement it better. I do not expect it to be used widely, but as is it is fairly cryptic. I posted a message asking for dev's thoughts on it (as a cross-reference): http://lists.digium.com/pipermail/asterisk-dev/2017-July/076419.html

I'll submit a patch on Gerrit later today.
Comments:By: Asterisk Team (asteriskteam) 2017-07-29 20:32:52.515-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Rusty Newton (rnewton) 2017-08-01 09:49:27.390-0500

bq.  I would appreciate comments on the feature and ways to possibly implement it better. I do not expect it to be used widely, but as is it is fairly cryptic. I posted a message asking for dev's thoughts on it (as a cross-reference): http://lists.digium.com/pipermail/asterisk-dev/2017-July/076419.html

Thanks for the patch submission. I wouldn't expect too many comments as the development focus for SIP, especially for new features is on chan_pjsip/res_pjsip. The old chan_sip module was moved from core support to extended support a long while back.

If you want to develop something similar for PJSIP you may see more commentary on it or usage of it.

Thanks again for your contribution!