Pause/UnPauseMonitor

Discussions about development of VICIDIAL and astGUIclient

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Pause/UnPauseMonitor

Postby wonderwall » Thu Dec 03, 2015 7:29 am

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.
installation of Goautodial 3.0 from Yum on CentOS release 5.10.1 (Final)
Installation method.
go autodial wiki 64 bit

Quad Processor 10 Core Westmere EX 4850 - 2.00GHz - 4 x 24MB cache
512 GB DDR3 Registered 1066
4TB x3 SATA III in RAID 5
wonderwall
 
Posts: 27
Joined: Sun Feb 09, 2014 2:54 pm

Re: Pause/UnPauseMonitor

Postby mflorell » Thu Dec 03, 2015 8:23 am

When executing a Dial, as long as the call is up it will stay in the Dial state.

You need to use the Manager API to do things to a call in the Dial state.
mflorell
Site Admin
 
Posts: 18383
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Pause/UnPauseMonitor

Postby wonderwall » Thu Dec 03, 2015 8:32 am

thanks, I have found this

go*CLI> manager show command PauseMonitor
[Syntax]
Action: PauseMonitor
[ActionID:] <value>
Channel: <value>

but have no idea where to write this code and how to activate that code. Could you point me to a direction or may be share an intro with a small example.
thanks in advance.
installation of Goautodial 3.0 from Yum on CentOS release 5.10.1 (Final)
Installation method.
go autodial wiki 64 bit

Quad Processor 10 Core Westmere EX 4850 - 2.00GHz - 4 x 24MB cache
512 GB DDR3 Registered 1066
4TB x3 SATA III in RAID 5
wonderwall
 
Posts: 27
Joined: Sun Feb 09, 2014 2:54 pm

Re: Pause/UnPauseMonitor

Postby mflorell » Thu Dec 03, 2015 12:12 pm

If you're using Vicidial all you have to do is insert a record into the vicidial_manager table and it will be processed.

Otherwise, you have to connect to port 5038 and send commands that way,
http://www.voip-info.org/wiki/view/Asterisk+manager+API
mflorell
Site Admin
 
Posts: 18383
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida


Return to Development

Who is online

Users browsing this forum: No registered users and 29 guests