Dear All,
I am trying to Pause and unPause monitor for a live call. below is the code which i wrote in my agi file
$AGI->exec("Monitor wav|/var/spool/asterisk/monitor/MIX/$filename");
#### these lines are aded ####
$AGI->exec('Dial',"SIP/50022");
$AGI->exec("PauseMonitor");
$AGI->exec("Wait","10");
$AGI->exec("UnPauseMonitor");
$AGI->exec("Wait","10");
the problem is that once the Dial application starts running it does not go down. and without the Dial application the code runs fine but before the landing of the call. I do not know how to do it.
Launched AGI Script /var/lib/asterisk/agi-bin/agi-DID_route-test.agi
[Dec 3 17:03:26] -- AGI Script Executing Application: (Monitor) Options: (wav,/var/spool/asterisk/monitor/MIX/20151203170326_00922137131480_03405553096)
[Dec 3 17:03:26] -- AGI Script Executing Application: (PauseMonitor) Options: ()
[Dec 3 17:03:26] -- AGI Script Executing Application: (Wait) Options: (5)
[Dec 3 17:03:31] -- AGI Script Executing Application: (UnPauseMonitor) Options: ()
[Dec 3 17:03:31] -- AGI Script Executing Application: (Wait) Options: (5)
[Dec 3 17:03:36] -- <SIP/mppl-pri-00000093>AGI Script agi-DID_route-test.agi completed, returning 0
[Dec 3 17:03:36] -- Executing [50022@default:1] Dial("SIP/mppl-pri-00000093", "SIP/50022,60,") in new stack
newbie. Appreciate a response.