[asterisk-users] Can't read environment variable

Tzafrir Cohen
2008-01-30T12:57:50Z

On Wed, Jan 30, 2008 at 01:38:48PM +0100, Joost Kuif | Mobillion
wrote:
> Hi,
>
> I can't read a environment variable in a asterisk dialplan.
> When logged in as user root on the system an 'echo $HOSTNAME' gives
the
> hostame of the machine.
> Asterisk (1.4) is started from the same console.
>
> I try to read it like this:
> exten => s,n,NoOp(host=${ENV(HOSTNAME)})
>
> Does anyone know what i am missing?

Is that variable set?

  cat /proc/PID_OF_ASTERISK/environ | tr '\0' '\n' | grep
^HOSTNAME
--
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir