Solved

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

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Cannot call in with full number 1 66
Hosted Lync 2013 disconnection issues 4 72
DID to CTI Route Point 4 36
T1 Modules 1 50
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…
As companies replace their old PBX phone systems with Unified IP Communications, many are finding out that legacy applications such as fax do not work well with VoIP. Fortunately, Cloud Faxing provides a cost-effective alternative that works over an…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 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

16 Experts available now in Live!

Get 1:1 Help Now