On 09 Mar 2015, at 08:54, Nir Simionovich <nir.simionov...@gmail.com> wrote:

> Cool, too bad it isn't documented. I'll add it into PHPARI as well.
> 


I believe that this was one of the reasons we created the support for _VARIABLE 
and __VARIABLE
in Asterisk. The ability to reach over to the new channel from the old channel 
was required
for a number of things we wanted to do.

The code is very old and at the time it was seem as a bad hack to use the 
channel
variables for this.  The decision was not to expose this part while trying to 
figure out a better
way to do it. It's still around, about ten years later. :-)

I have mentioned this a number of times on various mailing lists, so it should 
be known,
even though it is not documented.

Make sure that if you add variables not using the dialplan function,  you must 
use high numbers and 
decrement so the risk of a collision is lower.

/O


> On Mar 8, 2015 6:18 PM, "Matthew Jordan" <mjor...@digium.com> wrote:
> 
> On Sun, Mar 8, 2015 at 10:51 AM, Nir Simionovich <nir.simionov...@gmail.com> 
> wrote:
> Ok, I'll have a look into that one.
> 
> On Sun, Mar 8, 2015 at 1:03 PM, Olle E. Johansson <o...@edvina.net> wrote:
> 
> On 08 Mar 2015, at 09:52, Nir Simionovich <nir.simionov...@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
> 
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> 
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
> -- 
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> 
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-dev

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to