Solved

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

Posted on 2007-11-21
1
1,585 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

How To Create Custom / Distinctive Ring Tones on Polycom Phones Purpose and Overview When creating a custom ring tone, you have simple aspirations: to make your phone cooler than everyone else's. Perhaps you need a louder ringer. Perhaps you w…
Implementing Avaya's One-X portal is pretty painless, until you want to deploy this to the Android and iPhone clients when these clients are outside of your network. The clients will also work within your local network. Here is our experience and so…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

932 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now