Re: [asterisk-users] Executing Script after MixMonitor is called

2013-07-05 Thread Gopalakrishnan N
I tried with the ^ symbol but still there is no success. And regards to the path, actually my file is in path /root, is that to be in /usr/sbin or somewhere? Basically am able to see the application executed in the CLI, like the below, Executing [4090@test:1] Set(SIP/4092-003b,

Re: [asterisk-users] Executing Script after MixMonitor is called

2013-07-05 Thread Fabio Moretti
I use this form for convert wav to mp3 and it's working: exten = s,n(record),MixMonitor(${MIXMON_DIR}${CALLFILENAME}.${MIXMON_FORMAT},,/usr/bin/lame --preset voice -v -B 64 -a /var/spool/asterisk/monitor/${CALLFILENAME}.${MIXMON_FORMAT}

Re: [asterisk-users] Executing Script after MixMonitor is called

2013-07-04 Thread Gopalakrishnan N
exten = _4X.,1,Set(START_TIME=${STRFTIME(${EPOCH},,%Y-%m-%d_%H:%M:%S)}) exten = _4X.,n,Set(MIXMONITOR_FILENAME=${EXTEN}-${START_TIME}-OUT) ;exten = _4X.,n,MixMonitor(IND_PRI/${CDR(accountcode)}/OUT/${STRFTIME(${EPOCH},,%Y-%m)}/${STRFTIME(${EPOCH},,%d)}/${MIXMONITOR_FILENAME}.wav,m,/root/flac.sh

Re: [asterisk-users] Executing Script after MixMonitor is called

2013-07-04 Thread Satish Barot
On Fri, Jul 5, 2013 at 1:45 AM, Gopalakrishnan N gopalakrishnan...@gmail.com wrote: exten = _4X.,1,Set(START_TIME=${STRFTIME(${EPOCH},,%Y-%m-%d_%H:%M:%S)}) exten = _4X.,n,Set(MIXMONITOR_FILENAME=${EXTEN}-${START_TIME}-OUT) ;exten =

Re: [asterisk-users] Executing Script after MixMonitor is called

2013-07-03 Thread Gopalakrishnan N
I tried with hangup cause but my script is not executed... also I tried the same script with mix monitor itself no sucess. The script what I have is, am converting wav file to flac format.. On 11 Jun 2013 11:17, Satish Barot satish4aster...@gmail.com wrote: And yes if you want to use System

Re: [asterisk-users] Executing Script after MixMonitor is called

2013-07-03 Thread Satish Barot
On Thu, Jul 4, 2013 at 1:30 AM, Gopalakrishnan N gopalakrishnan...@gmail.com wrote: I tried with hangup cause but my script is not executed... also I tried the same script with mix monitor itself no sucess. The script what I have is, am converting wav file to flac format.. On 11 Jun 2013

Re: [asterisk-users] Executing Script after MixMonitor is called

2013-06-10 Thread Gopalakrishnan N
Hi Satish, I tried with sox, without any parameter, just sox filename.wav to filename.mp3, in linux shell prompt... the file is been converted... Now If i want to run that command using dialplan, MixMonitor(filename.wav,m) Monitor_Exec(sox filename.wav filename.mp3) Or to use System command?

Re: [asterisk-users] Executing Script after MixMonitor is called

2013-06-10 Thread Satish Barot
Hi Gopamkrishnan, Check the 'command' argument for Mixmonitor. Mixmonitor itself has a facility to execute a command when recording is over. *In my case, 'wav2mp3' is a script which gets executed and converts recorded wav audio file to mp3. I pass ${FILENAME} as an argument to my script. * *You

Re: [asterisk-users] Executing Script after MixMonitor is called

2013-06-10 Thread Satish Barot
And yes if you want to use System application in your dialplan then have System in your h extension System(/PathToSox/sox -r 8000 -c 1 /PathToWavFile/filename.wav /PathToMp3FileToBE Stored/filename.mp3) On Tue, Jun 11, 2013 at 10:38 AM, Satish Barot satish4aster...@gmail.comwrote: Hi

Re: [asterisk-users] Executing Script after MixMonitor is called

2012-01-26 Thread David Backeberg
On Wed, Jan 25, 2012 at 10:29 AM, Faraj Khasib fkha...@iconnecths.com wrote: Hello Guys, 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

Re: [asterisk-users] Executing Script after MixMonitor is called

2012-01-26 Thread David Backeberg
On Thu, Jan 26, 2012 at 7:18 PM, David Backeberg dbackeb...@gmail.com wrote: shebang /path/to/bash PATH=$1 lame --arguments $1.wav $1.mp3 if [ -f {$1}.mp3 ] ; then  rm {$1}.wav And my silly code sample hasn't been debugged, and I can spot one glaring bug, and another less important bug.

Re: [asterisk-users] Executing Script after MixMonitor is called

2012-01-26 Thread Steve Edwards
On Thu, 26 Jan 2012, David Backeberg wrote: On Thu, Jan 26, 2012 at 7:18 PM, David Backeberg dbackeb...@gmail.com wrote: shebang /path/to/bash PATH=$1 lame --arguments $1.wav $1.mp3 if [ -f {$1}.mp3 ] ; then  rm {$1}.wav And my silly code sample hasn't been debugged, and I can spot one

Re: [asterisk-users] Executing Script after MixMonitor is called

2012-01-26 Thread David Backeberg
On Thu, Jan 26, 2012 at 7:36 PM, Steve Edwards asterisk@sedwards.com wrote: The OP was using MIXMONITOR_EXEC (although I wonder about the '' syntax) so he doesn't need to explicitly execute (via system()) his commands. Wow. Never knew that was possible. I still don't like the syntax, but

Re: [asterisk-users] Executing Script after MixMonitor is called

2012-01-26 Thread Jeremy Kister
On 1/25/2012 10:29 AM, Faraj Khasib wrote: 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 what version of asterisk are you using ?

Re: [asterisk-users] Executing Script after MixMonitor is called

2012-01-26 Thread Satish Barot
This is how I use a wav to mp3 script on Mixmonitor in my dialplan (Asterisk 1.8.7.0). ... same = n,MixMonitor(${FILENAME},W(4),/var/spool/asterisk/wav2mp3 ^{FILENAME}) ... and my script is... #!/bin/bash WAV=/var/spool/asterisk/monitor/$1 MP3=$(echo $1 | sed 's/\.wav$/.mp3/')

[asterisk-users] Executing Script after MixMonitor is called

2012-01-25 Thread Faraj Khasib
Hello Guys, 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 exten=6500,n,Set(MIXMONITOR_EXEC= nice -n 19 /usr/local/bin/lame -b 8 -t -F -m