[macro-checkdvo] exten => s,1,Noop(Check for DVO) same => n,Gotoif($["x${rec_call_fn}" = "x"]?exit) same => n,Monitor(wav,/var/spool/asterisk/tmp/${rec_call_fn},bm) same => n(exit),MacroExit [macro-execagi] exten => s,1,Set(ERR=1) same => n,AGI(${ARG1},${ARG2}) same => n,Noop(ERR is '${ERR}') same => n,GotoIf($["x${ERR}" = "x1"]?error) same => n,GotoIf($["x${ERR}" = "x2"]?endcall) same => n,MacroExit same => n(error),Playback(error) same => n(endcall),Hangup [macro-processing-calls] exten => s,1,Macro(execagi,processing_calls.php,connect) same => n,MacroExit [processing-calls] exten => _X.,1,Noop(Start call from '${CALLERID(num)}' to '${EXTEN}') same => n,System(/usr/local/scripts/asterisk/check_for_lost_call.php connect "${CHANNEL}" "${CALLERID(num)}-${EXTEN}" &) same => n,Set(CALLERID(dnid)=${EXTEN}) same => n,Macro(execagi,processing_calls.php,startup) same => n(newcall),Macro(execagi,processing_calls.php,request) same => n,GotoIf($["x${route}" = "xend"]?end) same => n,GotoIf($["x${route}" = "xaam"]?aam) same => n,GotoIf($["x${route}" = "xredir"]?redir) same => n,GotoIf($["x${route}" = "xnewcall"]?newcall) same => n,GotoIf($["x${route}" = "xtechsupport"]?techsupport) same => n,GotoIf($["x${route}" = "xsubscsupport"]?subscsupport) same => n,GotoIf($["x${route}" = "xforward"]?forward) same => n,Macro(checkdvo) same => n,GotoIf($["x${route}" = "xvirtualpbx"]?virtualpbx,s,1) same => n,Set(old_route=${route}) same => n,Dial(${route},${timeout},giM(processing-calls)L(${maxduration})${options}) same => n,Macro(execagi,processing_calls.php,disconnect) same => n,Goto(newcall) same => n(redir),Macro(execagi,processing_calls.php,redirect) same => n,Goto(newcall) same => n(forward),Macro(execagi,processing_calls.php,forwarding) same => n,Goto(newcall) same => n(end),Macro(execagi,processing_calls.php,check-redirect) same => n,GotoIf($["x${route}" = "xnewcall"]?newcall) same => n,Hangup exten => h,1,Noop(Before hangup execute some actions) same => n,Macro(execagi,processing_calls.php,stop) same => n,System(/usr/local/scripts/asterisk/check_for_lost_call.php stopspychannel "${CHANNEL}" "${CALLERID(num)}-${EXTEN}" &) same => n(bye),Noop(End call from '${CALLERID(num)}' to '${CALLERID(dnid)}')