Invoke Dialplan Applications

Hello everybody! I have an ARI-based application (Stasis App) and I need to trigger applications such as MixMonitor, Waiting Queues, Hunting Groups, etc. What is the most effective approach to achieve this through the Stasis itself?

There is no execution of dialplan applications directly from ARI. You can either use ‘continue’ to send a call into the dialplan, or call a Local channel that executes dialplan and bridge it with the channel in ARI.

Thanks for the clarification @jcolp ! Since ARI doesn’t support this, is there any other simpler way to trigger this applications? Using other Asterisk API (like AMI for example) can be useful in order to invoke them?

Nope. You can’t invoke dialplan applications arbitrarily in AMI either. You have to move the channel out of what it is in, then invoke it.

Thank you @jcolp. This is what my Dial Plan looks like at the moment:

exten => _[a-zA-Z0-9=].,1,Set(INVITE_TO=${PJSIP_HEADER(read,To)})
same => n,Set(INVITE_FROM=${PJSIP_HEADER(read,From)})
same => n,Set(INVITE_URI=${CHANNEL(pjsip,request_uri)})
same => n,Set(CALL_ID=${PJSIP_HEADER(read,Call-ID)})
same => n,Stasis(XApp,${INVITE_TO},${INVITE_FROM},${INVITE_URI},${CALL_ID})
exten => s,1,Stasis(XApp,${INVITE_TO},${INVITE_FROM},${INVITE_URI},${CALL_ID})
exten => h,1,Hangup

Is there a possibility within my Stasis application, where I can call an AGI script which, in turn, can execute commands on the Dial Plan to invoke an application while the Stasis is still running? If it is not possible, what other options do I have?

Calling an AGI script is calling the AGI dialplan application. The same responses I gave previously apply.

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