[asterisk-users] How to access environment variable?

Larry Alkoff labradley at mindspring.com
Mon Feb 5 21:34:55 MST 2007


How can I access an environmental variable in Asterisk 1.2.5?

It should be possible according to:
http://www.voip-info.org/wiki/view/Asterisk+variables
which says:

Environment Variables
You may access unix environment variables using the syntax:
    ${ENV(foo)}
${ENV(ASTERISK_PROMPT)}: the current Asterisk CLI prompt.
${ENV(RECORDED_FILE)}: the filename of the last file saved by the Record 
command


I have an environmental variable MYIP which contains my current IP 
address but when I execute exten _4XX the following line only says
'myip is  ' and the rest is blank instead of showing
'myip is   www.xxx.yyy.zzz'

exten => _4XX,n,VERBOSE("myip is  ${ENV(MYIP)}")

Why doesn't it work?

Larry


-- 
Larry Alkoff N2LA - Austin TX
Using Thunderbird on Linux


More information about the asterisk-users mailing list