[asterisk-users] How to access environment variable?
Steve Edwards
asterisk.org at sedwards.com
Tue Feb 6 11:28:29 MST 2007
On Tue, 6 Feb 2007, Steve Edwards wrote:
> On Tue, 6 Feb 2007, Larry Alkoff wrote:
>
>> There must be a list in Asterisk that only allows cerain environmental
>> variables to be shown. A very unnecessary bummer.
>
> There is no list.
>
> Try executing a dialplan containing a priority like:
>
> exten = *,n,system(set >/tmp/what-asterisk-sees)
>
> to see what is actually in the Asterisk process's environment.
>
> My Asterisk startup script looks something like:
>
> env --ignore-environment\
> HOST=$HOST\
> PATH=/usr/local/bin/:/bin/\
> $ASTERISK\
> $START_OPTIONS
>
> so I control exactly what environment variables are passed.
Or, you can see Asterisk's environment using:
sudo cat /proc/`cat /var/run/asterisk.pid`/environ\
| tr "\000" "\n"
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