[asterisk-users] using the System() command to call a script

Steve Edwards asterisk.org at sedwards.com
Sun Mar 16 17:57:13 CDT 2008


On Sun, 16 Mar 2008, Jerry Geis wrote:

> I am wanting to call a shell script in System() command and it does not
> seem to work.
>
> If I put a direct linux command it does work.
> My script is owned by root and is executable.
>
> Is this possible? What might I be missing?

A path?

Try specifying the absolute path to your script.

Try executing "system(set >/tmp/asterisks-environment) to see all the 
cruft.

(For extra points, try changing your Asterisk startup script to use "env 
--ignore-environment" to eliminate most of the cruft :)

Thanks in advance,
------------------------------------------------------------------------
Steve Edwards      sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                             Fax: +1-760-731-3000



More information about the asterisk-users mailing list