[asterisk-users] Executing Script after MixMonitor is called

David Backeberg dbackeberg at gmail.com
Thu Jan 26 18:22:30 CST 2012


On Thu, Jan 26, 2012 at 7:18 PM, David Backeberg <dbackeberg at 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. (gotta close the if with
a fi, I declare PATH and never use it, and I'm not certain that the
declare will work without a 'declare' statement)

Your dialplan sample was missing an essential step, which was

System()

that actually kicks off your command. You could also use it to kick
off the bash script, like
System(path_to_script path_argument_for_script)



More information about the asterisk-users mailing list