Re: Setting PJSIP header from AMI

"Joshua C. Colp" <[email protected]>
Newsgroups gmane.comp.telephony.pbx.asterisk.user
Message-ID <CAM0A2Z0URhzUk9QUcO8bgZ4BJaag1_KYKXJ4un6oXjrC9hU5ow@mail.gmail.com>
On Mon, Apr 10, 2023 at 8:25 PM Alex Zarubin <[email protected]> wrote:

> Hello,
>
>
>
> We are moving from an older asterisk/SIP to a newer (18+) asterisk/PJSIP
> and trying to figure out how to add [identity] header when originating a
> call from AMI/PAMI.
>
> In the older version we would just set a variable like this:
>
>
>
> $action = new OriginateAction("SIP/….”);
>
> $action->setVariable('__SIPADDHEADER51',"Identity:
> $identity");              // $identity contains generated by 3rd party
> header
>
>
>
> Is there anything similar for
>
>
>
> $action = new OriginateAction("PJSIP/….”);
>
> ???
>
>
>
> that would work for PJSIP?
>

Yes, the PJSIP_HEADER dialplan function[1].

[1]
https://wiki.asterisk.org/wiki/display/AST/Asterisk+20+Function_PJSIP_HEADER

-- 
Joshua C. Colp
Asterisk Project Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
      https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.