[asterisk-users] [asterisk-user] Can't get hostname on asterisk dialplan by ENV()

RAJNIKANT VANZA rajnivanza at gmail.com
Thu Apr 21 06:20:01 CDT 2011


Hi Friend,

Can't get hostname environment variable on asterisk dialplan.

Help me about how to get hostname environment variable on asterisk dialplan.

I have written "export HOSTNAME" in /root/.bash_profile and when i execute
"echo $HOSTNAME" then get right hostname but not success through asterisk
dialplan.

Get environment variable path right value through below statement.
exten => XXX,n,NoOp(----------- ${ENV(PATH)})

*I have tried like this:*

exten => XXX,n,Set(CDR(hostname)=${System(echo $HOSTNAME)})
exten => XXX,n,Set(CDR(hostname)=${ENV(HOSTNAME)})

Thanks in advance.

-- 
Best Regards,

Rajnikant Vanza
Call : +91-9737456583
Software Engineer
-------------------------------------------------------
Working On Linux,C/C++,Asterisk Technology
Gandhinagar - Gujarat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110421/d6c25c33/attachment.htm>


More information about the asterisk-users mailing list