Execute agi file after the end of the call (Queues)

Job ID: 36443141

Budget: €8 – €30 EUR

Execute agi file after the end of the call

Looking to execute agi file after the end of the call (to send only sms by script after pickup call ends)

Context below works, and sends SMS after hangup. Problem are queses when skip to next agent, hangler send sms again and again and again....

Solution is: Execute agi file after the end of the call

[macro-dialout-one-predial-hook]
exten => s,1,Noop(Entering extensions_custom.conf to add sms calls hangup handler)
exten => s,n,Set(CHANNEL(hangup_handler_push)=sms-after-call,s,1)
exten => s,n,MacroExit()


[sms-after-call]
exten => s,1,NoOp(Sending SMS Thank you to ${CALLERID(number)})
exten => s,n,DongleSendSMS(dongle0,${CALLERID(number)},Thanks for calling,,true)
exten => s,n,Return
Related categories: PHP Asterisk PBX VoIP