[Question] What happens to call flow with a return code -1


#1

I need to know what happens when you get a return code -1 in a macro.

What I am trying to do is execute a linux scrip after a call if finnished. The script works good if the called party hangs up first or if I get a busy. But if I hang up first, it caused a “return code of -1” and my script does not run. Can someone suggest how I can change my macro (shown below) so that, if my return status is a -1, my linux script will run?

[macro-to_internet]
;${ARG1} - Telephone number to dail
exten => s,1,system(/etc/init.d/some_deamon stop > /dev/null)
exten => s,2,Dial(SIP/${ARG1}@proxy01.sipphone.com,60,g)
exten => s,3,Goto(s-CLEANEXIT,1)
exten => s,104,Busy
exten => s,105,Goto(s-CLEANEXIT,1)
exten => s-CLEANEXIT,1,system(/etc/init.d/some_deamon start > /dev/null)
exten => s-CLEANEXIT,2,Hangup

thank you
donald