Hi all,
I want to call a script after a call successfully ends with the number that called in ( or was called ), the extension that answered and the call duration.
I have something like the below, but it only fires if no one answers, and even them, doesn’t seem to always fire.
exten => s,1,Set(TIMEOUT(digit)=2)
exten => s,2,Set(TIMEOUT(response)=10)
exten => s,3,Dial(${EXT601}&${EXT602}&${EXT603}&${EXT604}&${EXT605}&${EXT606},20,r)
exten => s,4,Set(foo=${CALLERID(num)})
;; trying which one fires ...
exten => s,5,System(php /etc/asterisk/_api_log_call.php?call=1 ${foo})
exten => s,6,System(php _api_log_call.php?call=3 ${foo})
exten => s,7,Set(result=${SHELL(php /etc/asterisk/_api_log_call.php?call=3 ${ARG1} ${CALLERID(num)})} )
exten => s,8,Voicemail(${HOMEVOICEMAIL}@default)
exten => s,9,Hangup
Thanks