<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jul 4, 2013 at 1:30 AM, Gopalakrishnan N <span dir="ltr">&lt;<a href="mailto:gopalakrishnan.an@gmail.com" target="_blank">gopalakrishnan.an@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">I tried with hangup cause but my script is not executed... also I tried the same script with mix monitor itself no sucess.</p>

<p dir="ltr">The script what I have is, am converting wav file to flac format..</p><div class="HOEnZb"><div class="h5">
<div class="gmail_quote">On 11 Jun 2013 11:17, &quot;Satish Barot&quot; &lt;<a href="mailto:satish4asterisk@gmail.com" target="_blank">satish4asterisk@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="gmail_extra">And yes if you want to use System application in your dialplan then have System in your h extension<br><pre style="line-height:normal;text-indent:0px;letter-spacing:normal;text-align:start;font-variant:normal;text-transform:none;font-style:normal;font-weight:normal;word-spacing:0px">
</pre><pre style="line-height:normal;text-indent:0px;letter-spacing:normal;text-align:start;font-variant:normal;text-transform:none;font-style:normal;font-weight:normal;word-spacing:0px">System(/PathToSox/sox -r 8000 -c 1 /PathToWavFile/filename.wav /PathToMp3FileToBE Stored/filename.mp3)<br>
</pre><div class="gmail_quote">On Tue, Jun 11, 2013 at 10:38 AM, Satish Barot <span dir="ltr">&lt;<a href="mailto:satish4asterisk@gmail.com" target="_blank">satish4asterisk@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><div>Hi Gopamkrishnan,<br><br></div>Check the &#39;command&#39; argument for Mixmonitor. Mixmonitor itself has a facility to execute a command when recording is over. <br>


<pre style="line-height:normal;text-indent:0px;letter-spacing:normal;text-align:start;font-variant:normal;text-transform:none;font-style:normal;font-weight:normal;word-spacing:0px"><i>In my case, &#39;wav2mp3&#39; is a script which gets executed and converts recorded wav audio file to mp3. I pass ${FILENAME} as an argument to my script.
</i></pre><pre style="line-height:normal;text-indent:0px;letter-spacing:normal;text-align:start;font-variant:normal;text-transform:none;font-style:normal;font-weight:normal;word-spacing:0px"><i>You should have something like </i>MixMonitor(filename.wav,m,/PathToYourScript/YourScriptName^filename.wav) in your dialplan.<br>
<br></pre><pre style="line-height:normal;text-indent:0px;letter-spacing:normal;text-align:start;font-variant:normal;text-transform:none;font-style:normal;font-weight:normal;word-spacing:0px">Hope this helps.<br><br></pre>


<pre style="line-height:normal;text-indent:0px;letter-spacing:normal;text-align:start;font-variant:normal;text-transform:none;font-style:normal;font-weight:normal;word-spacing:0px">--Satish Barot<br></pre><pre style="line-height:normal;text-indent:0px;letter-spacing:normal;text-align:start;font-variant:normal;text-transform:none;font-style:normal;font-weight:normal;word-spacing:0px">
Ahmedabad, India<br></pre><br><div class="gmail_quote">On Tue, Jun 11, 2013 at 9:31 AM, Gopalakrishnan N <span dir="ltr">&lt;<a href="mailto:gopalakrishnan.an@gmail.com" target="_blank">gopalakrishnan.an@gmail.com</a>&gt;</span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Satish,<div><br></div><div>I tried with sox, without any parameter, just sox filename.wav to filename.mp3, in linux shell prompt... the file is been converted... </div>



<div><br></div><div>

Now If i want to run that command using dialplan, </div><div><br></div><div>MixMonitor(filename.wav,m)</div><div>Monitor_Exec(sox filename.wav filename.mp3) </div><div><br></div><div>Or to use System command?</div>

<div><br></div><div>Regards.. </div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jan 27, 2012 at 11:29 AM, Satish Barot <span dir="ltr">&lt;<a href="mailto:satish4asterisk@gmail.com" target="_blank">satish4asterisk@gmail.com</a>&gt;</span> wrote:<br>





<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This is how I use a wav to mp3 script on Mixmonitor in my dialplan (Asterisk 1.8.7.0).<br>...<br>same =&gt; n,MixMonitor(${FILENAME},W(4),/var/spool/asterisk/wav2mp3 ^{FILENAME})<br>





...<br>and my script is...<br><br>#!/bin/bash<br>
<br>WAV=&quot;/var/spool/asterisk/monitor/$1&quot;<br>MP3=$(echo $1 | sed &#39;s/\.wav$/.mp3/&#39;)<br>MP3DEST=&quot;/var/spool/asterisk/mp3/$MP3&quot;<br>/usr/bin/lame &quot;${WAV}&quot; &quot;${MP3DEST}&quot; --silent -b 16 -s 9.6 -m m --bitwidth 8 --lowpass 9.6 --resample 8 --lowpass-width 1<span><font color="#888888"><br>






<br>--SATISH BAROT<br>Ahmedabad,India.</font></span><div><div><br><br><div class="gmail_quote">On Wed, Jan 25, 2012 at 8:59 PM, Faraj Khasib <span dir="ltr">&lt;<a href="mailto:fkhasib@iconnecths.com" target="_blank">fkhasib@iconnecths.com</a>&gt;</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=&amp;&amp; nice -n 19 /usr/local/bin/lame -b 8 -t -F -m m --bitwidth 8 --quiet &quot;/var/spool/asterisk/monitor/${CALLFILENAME}.wav&quot; &quot;/var/spool/asterisk/monitor/${CALLFILENAME}.mp3&quot; &amp;&amp; rm -f &quot;/var/spool/asterisk/monitor/${CALLFILENAME}.wav&quot;)<br>







exten=6500,n,MixMonitor(${CALLFILENAME}.wav,b)<br>
<span><font color="#888888"></font></span><br></blockquote></div></div></div></blockquote></div></div></div></div></blockquote></div></div></blockquote></div></div></blockquote></div></div></div><br></blockquote></div><br>
</div><div class="gmail_extra">Show your latest dialplan and script.<br><br></div><div class="gmail_extra">--Satish Barot<br></div><div class="gmail_extra">Ahmedabad, India<br></div></div>