I’m trying to figure out how to invoke the PJSIP_DIAL_CONTACTS() function from the ARI, in order to get a formatted dial string of all PJSIP endpoints registered to a single extension. Is it possible to invoke Asterisk FUNCTIONS from the dialplan - and if so how?
How have you tried doing it so far?
I have tried
- placing the variables : PJSIP_DIALPLAN_CONTACTS value 123 in the body of the /create POST
- placing the variables : PJSIP_DIALPLAN_CONTACTS value 123 in the body of the /dial POST
- post channel/{channelId}/variable with variable=PJSIP_DIALPLAN_CONTACTS and value=123
- post channel/{channelId}/variable with variable=PJSIP_DIALPLAN_CONTACTS(123) and value=“”
- get channel/{channelId}/variable with variable=PJSIP_DIALPLAN_CONTACTS(123)
And none of the above have worked. Do you know how to call a Dialplan function (in particular PJSIP_DIALPLAN_CONTACTS) from the ARI?
The dialplan function is not “PJSIP_DIALPLAN_CONTACTS”. It is PJSIP_DIAL_CONTACTS. It can be retrieved using the variable route on asterisk[1] as "PJSIP_DIAL_CONTACTS(123).
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.