On Thu, 26 Jan 2012, David Backeberg wrote:
On Thu, Jan 26, 2012 at 7:18 PM, David Backeberg <[email protected]> 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)
+1 for anything that cleans up a bunch of ugly dialplan code :)
The OP was using MIXMONITOR_EXEC (although I wonder about the '&&' syntax)
so he doesn't need to explicitly execute (via system()) his commands.
--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards [email protected] Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000
--
_____________________________________________________________________
-- 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