Solved

Can I some how Pause and Unpause the Asterisk Monitor command on Asterisk 1.2

Posted on 2007-11-21
1
1,602 Views
Last Modified: 2013-11-12
I'm attempting to be able to record a call and be able to Pause and UnPause the Monitor command. I'm able to successfully record the call on a feature command of *9, but after starting the recording I'm no longer able to control it






Extensions.conf
DYNAMIC_FEATURES=>automon#apps#precord#unprecord
 
[macro-apprecord]
exten => s,1,GotoIf($["${XAD}" = "0" | "${XAD}" = ""]?startrec:stoprec)
exten => s,n(startrec),Playback(startmonitor)
exten => s,n,Set(XAD=1)
exten => s,n,Set(FILENAME=${TIMESTAMP}-OUT${CALLERID(number)}-^-${UNIQUEID})
exten => s,n,Set(MONITOR_EXEC_ARGS=&& nice -n 19 lame -b 96 -t -F -m m --bitwidth 16 --quiet "/var/spool/asterisk/monitor/${FILENAME}.wav" /var/spool/asterisk/monitor/${FILENAME}.mp3" && rm -f "/var/spool/asterisk/monitor/${FILENAME}.wav" && mutt -s "Test Email" foo@foo.net -a  "/var/spool/asterisk/monitor/${FILENAME}.mp3")
exten => s,n,Monitor(wav,${FILENAME},m)
exten => s,n,MacroExit
exten => s,n(stoprec),StopMonitor
exten => s,n,Set(XAD=0)
exten => s,n,Playback(stopmonitor)
exten => s,n,MacroExit
 
# I also add this code here, but I think it only works in 1.4 is there a way to make it work on 1.2?
 
 
[macro-pauserecord]
exten => s,1,PauseMonitor()
exten => s,n,MacroExit
 
[macro-resumerecord]
exten => s,1,UnpauseMonitor()
exten => s,n,MacroExit
 
 
 
features.conf
 
[applicationmap]
apps => *9,caller,Macro,apprecord
precord => *8,caller,Macro,pauserecord
unprecord => *7,caller,Macro,resumerecord

Open in new window

0
Comment
Question by:richardsimnett
1 Comment
 
LVL 36

Accepted Solution

by:
grblades earned 500 total points
ID: 20330203
I believe the PauseMonitor() command was introduced in Asterisk 1.4 so your version would not have it.

The only thing you can do is stop the monitoring and then start it again later. You will have to track the state of the recording and all the files which have been created and then run a script to join them all together again afterwards.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wanted to query Cisco Call Manager CDR records from MS SQL Server? Here's how! CUCM can be configured to upload a CDR file to a given FTP server every minute. This article will show you how to set this up, schedule the import of this data an…
The point of this post is to give you a copy/paste installation solution to setting up Asterisk 1.6 on Ubuntu 9.04 (or similar) server. # Setup the system apt-get install subversion apt-get install make apt-get install linux-source kernel-p…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question