[asterisk-app-dev] ARI Get Channel Variable
Phil Mickelson
phil at cbasoftware.com
Wed Jan 22 18:41:31 CST 2020
We are using PJSIP. And I was able to get the call id:
PJSIP_HEADER(read,call-id).
Thank you very much! And thank you for your very fast response!
Phil M
On Wed, Jan 22, 2020 at 6:51 PM Kevin Harwell <kharwell at digium.com> wrote:
> On Wed, Jan 22, 2020 at 5:32 PM Phil Mickelson <phil at cbasoftware.com>
> wrote:
>
>> I'm trying to get the Call-ID from the SIP HEADER using getChannelVar.
>> When I pass SIP_HEADER() and anything as the variable I get Unable to read
>> provided function. If use Call-ID I get Provided variable was not found.
>>
>> This is a connected call. Is it not possible to get SIP HEADER
>> information once it's connected? Or, am I missing something?
>>
>
> Are you using chan_sip or chan_pjsip? If chan_pjsip then you need to use
> the PJSIP_HEADER function [1] instead. For instance the following returned
> the call-id for me:
>
> PJSIP_HEADER(read,Call-ID)
>
> How are you attempting to use the channel function [2]? For instance the
> following returned the call-id for me as well:
>
> CHANNEL(pjsip,call-id)
>
> [1]
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Function_PJSIP_HEADER
> [2]
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Function_CHANNEL
>
> --
> Kevin Harwell
> Senior Software Developer
> Sangoma Technologies
> Check us out at: https://sangoma.com & https://asterisk.org
> _______________________________________________
> asterisk-app-dev mailing list
> asterisk-app-dev at lists.digium.com
> http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-app-dev/attachments/20200122/98790d09/attachment.html>
More information about the asterisk-app-dev
mailing list