[Asterisk-Users] Problems with cmd monitor
Jason Lixfeld
jason+lists.asterisk at lixfeld.ca
Mon Aug 8 18:34:48 MST 2005
Was using this monitor line to get soxmix to mix test-in.wav and test-
out.wav into test.wav.
exten => 1200,1,Monitor(wav|/tmp/test|m)
When I start the conference, the * console shows this:
monitor executing ( nice -n 19 soxmix "//tmp/test-in.wav" "//tmp/test-
out.wav" "//tmp/test.wav" && rm -f "//tmp/test-"* ) &
/tmp shows test-in.wav, test-out.wav and test.wav. From what I can
see above, it appears as though the last command the m option runs
seems to be wrong which is why the in and out aren't being deleted.
I changed it to this:
exten => 1200,1,SetVar(MONITOR_EXEC=/bin/nice -n 19 /usr/bin/soxmix)
exten => 1200,2,SetVar(MONITOR_EXEC_ARGS=&& /bin/rm /tmp/test-*)
exten => 1200,3,Monitor(wav|/tmp/test|m)
exten => 1200,4,MeetMe(37455,APM)
This is what * console looks like:
-- Executing SetVar("IAX2/300 at 300/3", "MONITOR_EXEC=/usr/bin/
soxmix") in new stack
-- Executing SetVar("IAX2/300 at 300/3", "MONITOR_EXEC_ARGS=&& /bin/
rm /tmp/test-*") in new stack
-- Executing Monitor("IAX2/300 at 300/3", "wav|/tmp/test|m") in new
stack
-- Executing MeetMe("IAX2/300 at 300/3", "37455|APM") in new stack
== Parsing '/etc/asterisk/meetme.conf': Found
-- Created MeetMe conference 1023 for conference '37455'
-- Playing 'conf-getpin' (language 'en')
-- Playing 'conf-onlyperson' (language 'en')
-- Started music on hold, class 'default', on IAX2/300 at 300/3
Aug 8 21:20:32 WARNING[19742]: app_meetme.c:962 conf_run: Unable to
write frame to channel: Resource temporarily unavailable
-- Stopped music on hold on IAX2/300 at 300/3
-- Hungup 'Zap/pseudo-1886765963'
== Spawn extension (drillsquad-conf, 1200, 4) exited non-zero on
'IAX2/300 at 300/3'
-- Hungup 'IAX2/300 at 300/3'
monitor executing /usr/bin/soxmix "//tmp/test-in.wav" "//tmp/test-
out.wav" "//tmp/test.wav" && /bin/rm /tmp/test-* &
ricky*CLI>
It looks like it ran soxmix fine, but it didn't remove the -in and -
out files.
Anyone had any luck with this?
More information about the asterisk-users
mailing list