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.
something like this,
MixMonitor(${FILENAME},bW(2),/usr/local/bin/convert_to_mp3 ^{FILENAME})
--- /usr/local/bin/convert_to_mp3 --
#!/bin/bash
WAV=$1
MP3=$(echo $1 | sed 's/\.wav$/.mp3/')
/usr/bin/lame "${WAV}" "${MP3}" -b 16 -s 9.6 -m m --bitwidth 8 --lowpass
9.6 --resample 8 --lowpass-width 1 && rm -f "${WAV}"
--- end of script ---
Set the permissions so it is executable by the asterisk owner.
Note: This has not been tested and is intended as a starting point.
Dale
On 09/20/2011 07:53 PM, Ikka - Mitra Kreasindo wrote:
Is anyone can help me with this ? I'm really desperate...
Thx in ad.
*From:*[email protected]
[mailto:[email protected]] *On Behalf Of *Ikka -
Mitra Kreasindo
*Sent:* Wednesday, September 14, 2011 5:02 PM
*To:* 'Asterisk Users Mailing List - Non-Commercial Discussion'
*Subject:* [asterisk-users] Mixmonitor command parameter problem on
Asterisk 1.8.4
Dear all...
I'm using MixMonitor command in my dialplan, and I used the "command"
parameter to execute some thing after recording the file.
I used the command parameter to convert the wav file that created
earlier to MP3 and than deleted the WAV file.
It worked fine with asterisk 1.4.21.2. and 1.6x
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.
This is part of the log with Asterisk 1.4.21.2
-- 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
This is part of the log with Asterisk 1.8.4
-- 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
As you can see, with 1.8.4 the command paramater is trimed...
Is there some changes / bug with MixMonitor in Asterisk 1.8.4 ? Is
there a quick workaround for this problem ?
--
"The truth speaks for itself. I'm just the messenger."
Lyta Alexander - Babylon 5
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users