[Asterisk-Users] System cmd usage

Bill Michaelson bill at cosi.com
Fri Feb 20 10:48:36 MST 2004


Using John Todd's example for recording, from his cleanup/conversion 
macro...

; Turn the two in/out .wav files into a single .wav file with both channels
exten => s,3,System(/usr/local/bin/wmix 
${MONITORDIR}/${CALLFILENAME}-in.wav ${\
MONITORDIR}/${CALLFILENAME}-out.wav > ${MONITORDIR}/${CALLFILENAME})
;
; Remove the old .wav files - we don't need them anymore.
exten => s,4,System(/bin/rm ${MONITORDIR}/${CALLFILENAME}-in.wav 
${MONITORDIR}/\
${CALLFILENAME}-out.wav)
;
; This part of the routine compresses the .wav files into a .gsm file for
;  better storage (about 1/5 the size of a .wav file).  Use "untoast" to 
restor\
e
;  to normal wav file format. (toast and untoast are fairly standard on 
Linux s\
ystems)
;
exten => s,5,System(/usr/bin/toast -F ${MONITORDIR}/${CALLFILENAME})

The wmix runs successfully (it produces the mixed file), and running "by 
hand" from the shell indicates that it returns 0 to the shell.  But the 
* console log seems to think it failed...

    -- Executing System("SIP/248379-fe6e", "/usr/local/bin/wmix 
/var/spool/asterisk/monitor/20040220-121235-111-916095326873-in.wav 
/var/spool/asterisk/monitor/20040220-121235-111-916095326873-out.wav > 
/var/spool/asterisk/monitor/20040220-121235-111-916095326873") in new stack
Feb 20 12:12:56 WARNING[1209214528]: app_system.c:57 system_exec: Unable 
to execute '/usr/local/bin/wmix 
/var/spool/asterisk/monitor/20040220-121235-111-916095326873-in.wav 
/var/spool/asterisk/monitor/20040220-121235-111-916095326873-out.wav > 
/var/spool/asterisk/monitor/20040220-121235-111-916095326873'
  == Spawn extension (macro-record-cleanup, s, 3) exited non-zero on 
'SIP/248379-fe6e' in macro 'record-cleanup'
  == Spawn extension (intern-post, s, 1) exited non-zero on 
'SIP/248379-fe6e'

Any ideas why?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20040220/c1bfeedd/attachment.htm


More information about the asterisk-users mailing list