[asterisk-users] Get SIP Call-ID from ARI

Joshua C. Colp jcolp at sangoma.com
Sat Jun 17 19:02:51 CDT 2023


On Sat, Jun 17, 2023 at 8:41 PM TTT <lists at telium.io> wrote:

> I tried
>
> GET /channels/{channelid}/variable?variable=CHANNEL(pjsip,call-id)
>
>
>
> But it responds with
>
> "message": "Channel not in Stasis application"
>
>
>
> Since I want to get the call-id for a channel not in stasis I guess that
> won’t work.  Similarly, I can’t force the channel through my own code in
> the dialplan, so the PJSIP_HEADER function won’t work.  So it looks like
> I’ll have to upgrade my Asterisk test system to get the Call-ID from the
> ARI event.  It looks like it was added in Ast 16.
>
>
>
> Out of curiosity, I see that call-id is returned in the “protocol_id”
> field of channel data structure.  However, since all channels in the same
> call must have the same Call-ID, how can this data be associated with a
> channel?  Wouldn’t it have to be associated with a bridge?  The Call-ID
> should not be available until two legs are bridged (I think).
>

All channels in a call do not have the same Call-ID. Each channel has its
own SIP Call-ID (if it is a PJSIP channel) as they are individual call legs
and individual SIP dialogs.

-- 
Joshua C. Colp
Asterisk Project Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20230617/696f95b4/attachment.html>


More information about the asterisk-users mailing list