This is how I use a wav to mp3 script on Mixmonitor in my dialplan (Asterisk 1.8.7.0).<br>...<br>same => n,MixMonitor(${FILENAME},W(4),/var/spool/asterisk/wav2mp3 ^{FILENAME})<br>...<br>and my script is...<br><br>#!/bin/bash<br>
<br>WAV="/var/spool/asterisk/monitor/$1"<br>MP3=$(echo $1 | sed 's/\.wav$/.mp3/')<br>MP3DEST="/var/spool/asterisk/mp3/$MP3"<br>/usr/bin/lame "${WAV}" "${MP3DEST}" --silent -b 16 -s 9.6 -m m --bitwidth 8 --lowpass 9.6 --resample 8 --lowpass-width 1<br>
<br>--SATISH BAROT<br>Ahmedabad,India.<br><br><div class="gmail_quote">On Wed, Jan 25, 2012 at 8:59 PM, Faraj Khasib <span dir="ltr"><<a href="mailto:fkhasib@iconnecths.com">fkhasib@iconnecths.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Guys,<br>
I am trying to convert files that are .wac to mp3 after mixmonitor command is called but it doesnt execute the command, I tried the command in terminal it worked, any help please ... below is my dial plan<br>
exten=6500,n,Set(MIXMONITOR_EXEC=&& nice -n 19 /usr/local/bin/lame -b 8 -t -F -m m --bitwidth 8 --quiet "/var/spool/asterisk/monitor/${CALLFILENAME}.wav" "/var/spool/asterisk/monitor/${CALLFILENAME}.mp3" && rm -f "/var/spool/asterisk/monitor/${CALLFILENAME}.wav")<br>
exten=6500,n,MixMonitor(${CALLFILENAME}.wav,b)<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</font></span></blockquote></div><br>