ARI getting SIP headers

is it possible to get SIP headers and/or INVITE body in ARI application?

SIP headers can be retrieved in ARI the same way as they are done in the dialplan, using the dialplan variable get functionality. You can only retrieve headers from the initial INVITE. There is no ability to get the INVITE itself.

thanks for anwer, but do you mean get, for example, function ${PJSIP_HEADER(read,From)} in dialplan and send result to stasis as argument?

or is it possible to get this fuction result with getChannelVar: GET /channels/{channelId}/variable
(Get the value of a channel variable or function.)

You can use GET /channels/{channelId}/variable to retrieve dialplan functions, which includes using PJSIP_HEADER.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.