How to cURL POST/GET action after hangup

How to cURL action after the call hanged up as send SMS or Send number to another system ,
Regards

You can run post hangup dialplan using a channel hangup-handler. From there you can either run a script/bash (using system or shell) or use the asterisk CURL function

You can hook your custom dialplan to push the hangup-handler using the before-connecting-call-hook (executed as a b dial option) or the before-bridging-call-hook (executed as a U dial option) context

Note: The pre call hooks are only executed if there was actually a dial during the call (meaning the call rang an extension/trunk), if you need the hangup-handler to be processed even if there was no dial during the call (i.e. routed directly to voicemail), you can use a custom context.

4 Likes

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