<div>Hi Friend,<br clear="all"></div><div><br></div><div>Can't get hostname environment variable on asterisk dialplan.</div><div><br></div><div>Help me about how to get hostname environment variable on asterisk dialplan.</div>
<div><br></div><div>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.</div><div><br></div><div>
Get environment variable path right value through below statement.</div><div>exten => XXX,n,NoOp(----------- ${ENV(PATH)})</div><div><br></div><div>
<strong>I have tried like this:</strong></div><div><br></div><div>exten => XXX,n,Set(CDR(hostname)=${System(echo $HOSTNAME)})<br></div><div>exten => XXX,n,Set(CDR(hostname)=${ENV(HOSTNAME)})<br></div><div><br></div>
<div>Thanks in advance.</div><br>-- <br>Best Regards,<br><br>Rajnikant Vanza<br>Call : +91-9737456583<br>Software Engineer<br>-------------------------------------------------------<br>Working On Linux,C/C++,Asterisk Technology<br>
Gandhinagar - Gujarat<br>