Setting custom SIP headers with ARI when originating a channel (PJSIP)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello list,

I am trying to set two headers (P-Asserted-Id and Privacy) when originating a channel from a Stasis app that uses ARI and PJSIP with no success so far. 

What I’ve done so far:

- Found this issue (https://issues.asterisk.org/jira/browse/ASTERISK-26178) on Asterisk's JIRA with someone that had the same problem and he provided a patch but the issue was closed cause apparently this is already supported by ARI. There is no proposed solution there and I already tried leaving a comment there.

- Setting the "variables” array when doing the ChannelOriginateWithId (https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Channels+REST+API#Asterisk14ChannelsRESTAPI-originate) like so:
{"variables":{ "PJSIP_HEADER(add,P-Asserted-Id)": "1234567890 <sip:1234567890@x.x.x.x>" }}  - Is this the chan_pjsip way to do so? ARI responds with 200 and properly does the call but without the header set.

- Setting the “variables” array when doing the ChannelOriginateWithId like so:
{"variables":{ “SIPADDHEADER01": “P-Asstered-Id: 1234567890 <sip:1234567890@x.x.x.x>" }}  - This is not working cause is supported only from chan_sip.


The documentation for setting headers with PJSIP is only for the dial plan function (https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Function_PJSIP_HEADER) but there are no documentation or example how this will work when someone wants to use ARI

Can someone provide me a working example on how to set sip headers with ARI's ChannelOriginateWithId? I’m using Asterisk 14.0.4
Thank you in advance.

Sotiris Ganouris.
_______________________________________________
asterisk-app-dev mailing list
asterisk-app-dev@xxxxxxxxxxxxxxxx
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev

[Index of Archives]     [Asterisk SS7]     [Asterisk Announcements]     [Asterisk Users]     [PJ SIP]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Linux API]

  Powered by Linux