> Steve Edwards wrote:
>> 
>> The dialplan snippet would look something like:
>>
>>          exten = s,n,system(/path-to-sox/sox a.wav b.wav c.wav)
>> 
>> This would copy a.wav followed by b.wav to a new file, c.wav.

On Sat, 10 Oct 2009, Barton Fisher wrote:

> hmm, no luck.  Here's what I have:
>
> exten => append,1,Noop(${PHRASEID}) ; this is the full path to original 
> message without extension .wav

I'm on a "personal mission" to stamp out the abuse of the noop() 
application since there is a more versatile application, verbose(), 
specifically for this task :)

> exten => append,n,System(sox ${PHRASEID}.wav ${TEMPMESSAGE}.wav 
> ${PHRASEID}.wav)

> -- Executing [app...@record:5] System("SIP/8001-0a0227c8", "sox 
> /var/lib/asterisk/sounds/custom/7146762004/1_17692.wav 
> /var/lib/asterisk/sounds/custom/7146762004/temp.wav 
> /var/lib/asterisk/sounds/custom/7146762004/1_17692.wav") in new stack

        sox\
                /var/lib/asterisk/sounds/custom/7146762004/1_17692.wav\
                /var/lib/asterisk/sounds/custom/7146762004/temp.wav\
                /var/lib/asterisk/sounds/custom/7146762004/1_17692.wav

The output file has the same name as one of the input files. If I execute 
"sox a.wav b.wav a.wav" I get "sox WARN wav: Premature EOF on .wav input 
file." Curiously, if I execute "sox a.wav b.wav b.wav" it works, but that 
is not what you want. In general, specifying an output file name the same 
as an input file name is a bad idea because the result is inconsistent 
from program to program.

What happens if you execute your command from a shell command line?

Is the path to sox in the environment of the process created by Asterisk?

If you append ">/tmp/stdout 2>/tmp/stderr" to your system() command line 
you may get more clues.

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwa...@sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to