[asterisk-dev] ARI - Add Support for custom SIP Headers with Originate

Matthew Jordan mjordan at digium.com
Sun Mar 8 11:17:55 CDT 2015


On Sun, Mar 8, 2015 at 10:51 AM, Nir Simionovich <nir.simionovich at gmail.com>
wrote:

> Ok, I'll have a look into that one.
>
> On Sun, Mar 8, 2015 at 1:03 PM, Olle E. Johansson <oej at edvina.net> wrote:
>
>>
>> On 08 Mar 2015, at 09:52, Nir Simionovich <nir.simionovich at gmail.com>
>> wrote:
>>
>> > Hi All,
>> >
>> >   So, I've been banging my head against an issue with ARI. While
>> Channel Originate enables
>> > you to originate channels, you can't really do a "SIPAddHeader" type
>> functionality in there.
>> >
>> >   Originally, I was under impression that endpoints/message should be
>> able to give me the functionality I wanted, but it didn't.
>> >
>> >   So, I realized that the functionality I'm looking for doesn't really
>> exist.
>> >
>> >   Question, are we missing a feature here? or is there an alternative
>> method of achieving the
>> > same functionality?
>> If you can add channel variables, you can add SIP headers.
>> Look at a dump of the channel after you executed SIPaddheader to figure
>> out how it works.
>> Add two headers, and run dumpchan().
>>
>
You should be able to do it with just the channel variable "SIPADDHEADER",
that is:

SIPADDHEADER=X-CustomHeader-1: foo
SIPADDHEADER=X-CustomHeader-2: bar

These can be specified in the /channels operation's JSON body.

WIth chan_pjsip, headers are manipulated using a dialplan function, so
there shouldn't be any issue there.

-- 
Matthew Jordan
Digium, Inc. | Director of Technology
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150308/60094c98/attachment.html>


More information about the asterisk-dev mailing list