[asterisk-users] Running a script after Dial() ?

Steve Edwards asterisk.org at sedwards.com
Thu Feb 4 19:37:00 CST 2010


On Fri, 5 Feb 2010, Ben Dinnerville wrote:

(Referring to the environment variables available to the shell Asterisk 
creates to execute the command specified in the mixmonitor() application.)

>> I get a somewhat minimal set of standard shell environment variables 
>> (BASH*, HOSTNAME, PWD, TERM, etc) including the same PATH environment 
>> variable I passed to Asterisk when it was started.
>>
> That just means that you cant rely on environment variables in the 
> script that you execute and you must make sure your script is fully 
> aware of anything it needs to know about itself. IE, dont rely on a path 
> being setup and enter full paths to all commands / executables or any 
> other variables and explicitly define them in the script - no different 
> to running jobs from Cron etc that dont have a full shell environment.

I don't understand your conclusion.

The HOSTNAME is the host name, the PATH is the PATH I specifically passed 
to Asterisk -- what can't be relied upon?

Similar to the PATH environment variable you can set in your crontab -- 
it's there for a reason -- so you can use it.

-- 
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