<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
I am not real familiar with the size of MixMonitor parameters, but
just looking at the output, I would suggest you change the logic to
call a script with a single argument.<br>
something like this,<br>
<br>
MixMonitor(${FILENAME},bW(2),/usr/local/bin/convert_to_mp3
^{FILENAME})<br>
<br>
--- /usr/local/bin/convert_to_mp3 --<br>
#!/bin/bash<br>
<br>
WAV=$1<br>
MP3=$(echo $1 | sed 's/\.wav$/.mp3/')<br>
<span style="font-family: "Courier New";">/usr/bin/lame
"${WAV}" "${MP3}" </span><span style="font-family: "Courier
New";">-b 16 -s 9.6 -m m --bitwidth 8 --lowpass 9.6
--resample 8 --lowpass-width 1 && rm -f "${WAV}"<br>
<br>
--- end of script ---<br>
Set the permissions so it is executable by the asterisk owner.<br>
<br>
Note: This has not been tested and is intended as a starting
point.<br>
<br>
<br>
</span>Dale<br>
<br>
<br>
On 09/20/2011 07:53 PM, Ikka - Mitra Kreasindo wrote:
<blockquote
cite="mid:009b01cc77f8$d860a970$8921fc50$@mitrakreasindo.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Is
anyone can help me with this ? I’m really desperate…<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Thx
in ad.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<div>
<div style="border-right: medium none; border-width: 1pt
medium medium; border-style: solid none none; border-color:
rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color;
padding: 3pt 0in 0in;">
<p class="MsoNormal"><b><span style="font-size: 10pt;
font-family:
"Tahoma","sans-serif";">From:</span></b><span
style="font-size: 10pt; font-family:
"Tahoma","sans-serif";">
<a class="moz-txt-link-abbreviated" href="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</a>
[<a class="moz-txt-link-freetext" href="mailto:asterisk-users-bounces@lists.digium.com">mailto:asterisk-users-bounces@lists.digium.com</a>] <b>On
Behalf Of </b>Ikka - Mitra Kreasindo<br>
<b>Sent:</b> Wednesday, September 14, 2011 5:02 PM<br>
<b>To:</b> 'Asterisk Users Mailing List - Non-Commercial
Discussion'<br>
<b>Subject:</b> [asterisk-users] Mixmonitor command
parameter problem on Asterisk 1.8.4<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Dear all…<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m using MixMonitor command in my
dialplan, and I used the “command” parameter to execute some
thing after recording the file.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I used the command parameter to convert the
wav file that created earlier to MP3 and than deleted the WAV
file.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">It worked fine with asterisk 1.4.21.2. and
1.6x<o:p></o:p></p>
<p class="MsoNormal">But than I have a new asterisk server with
asterisk 1.8.4. The command parameter doesn’t work. It’s
trimed for about 297 character only. The rest was gone. <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This is part of the log with Asterisk
1.4.21.2<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-family: "Courier
New";"> -- Executing [08129981925@speedy:7]
MixMonitor("SIP/10001-b7d71bd0",
"/var/spool/asterisk/recording/speedy/2011/09/14/-08129981925-Ikka_Testing-10001-20110914-163803.wav|bW(2)|/usr/bin/lame
"/var/spool/asterisk/recording/speedy/2011/09/14/-08129981925-Ikka_Testing-10001-20110914-163803.wav"
"/var/spool/asterisk/recording/speedy/2011/09/14/-08129981925-Ikka_Testing-10001-20110914-163803.mp3"
-b 16 -s 9.6 -m m --bitwidth 8 --lowpass 9.6 --resample 8
--lowpass-width 1 && rm -f
"/var/spool/asterisk/recording/speedy/2011/09/14/-08129981925-Ikka_Testing-10001-20110914-163803.wav"")
in new stack<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This is part of the log with Asterisk 1.8.4<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-family: "Courier
New";"> -- Executing [08129981925@speedy:7]
MixMonitor("SIP/10001-0000001a",
"/var/spool/asterisk/recording/speedy/2011/09/14/ACCOUNT-08129981925-Admin_IT-10001-20110914-165248.wav,bW(2),/usr/bin/lame
"/var/spool/asterisk/recording/speedy/2011/09/14/ACCOUNT-08129981925-Admin_IT-10001-20110914-165248.wav"
"/var/spool/asterisk") in new stack<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">As you can see, with 1.8.4 the command
paramater is trimed… <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Is there some changes / bug with MixMonitor
in Asterisk 1.8.4 ? Is there a quick workaround for this
problem ? <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<br>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
"The truth speaks for itself. I'm just the messenger."
Lyta Alexander - Babylon 5
</pre>
</body>
</html>