Link to home
Start Free TrialLog in
Avatar of richardsimnett
richardsimnett

asked on

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

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

ASKER CERTIFIED SOLUTION
Avatar of grblades
grblades
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial