On Thu, 21 Apr 2011, RAJNIKANT VANZA wrote:

Can't get hostname environment variable on asterisk dialplan.

1) Is HOSTNAME in the Asterisk process's environment? What does executing:

        tr '\000' '\n' < /proc/$(cat /var/run/asterisk.pid)/environ

show on the shell console?

2) What does executing:

        exten = *,n,                    verbose(1,${ENV(HOSTNAME)})

show on the Asterisk console?

I start my Asterisk with a minimal environment using the following snippet:

        nice --adjustment=-20\
                env --ignore-environment\
                        HOSTNAME=${HOSTNAME}\
                        PATH=${PATH}\
                                $ASTERISK $START_OPTIONS

--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       [email protected]      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
              http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to