<div dir="ltr">The &#39;hostname&#39; api call will return the hostname of the system.<div><br></div><div>For the IP you can check the global variable &#39;local_ip_v4&#39; and &#39;local_ip_v6&#39; - these are the ones autodetected by FreeSWITCH as its best guess on its main IP. It&#39;s probably the address that would be used to reach the default gateway.</div>

<div><br></div><div>To get any other IPs you could also use the &#39;sofia status&#39; api to get any other IPs you have bound profiles to.</div><div><br></div><div>For both security and performance and to avoid having a fork bomb, I&#39;d avoid running system commands such as ifconfig.</div>

<div class="gmail_extra"><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 8 June 2014 16:55, Snabel Kabiya <span dir="ltr">&lt;<a href="mailto:snabel@lexifone.com" target="_blank">snabel@lexifone.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><span style="color:rgb(34,34,34);font-family:arial;font-size:small;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important;background-color:rgb(255,255,255)">Hi,</span><div style="color:rgb(34,34,34);font-family:arial;font-size:small;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">



<br></div><div style="color:rgb(34,34,34);font-family:arial;font-size:small;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">



how can i get the server<span> </span><span style="background:none 0% 0% repeat scroll yellow">ip</span>/<span style="background:none 0% 0% repeat scroll yellow">hostname</span><span> </span>where<span> </span><span style="background:none 0% 0% repeat scroll yellow">freeswirch</span><span> </span>is installed?</div>



<div style="color:rgb(34,34,34);font-family:arial;font-size:small;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">



<br></div><div style="color:rgb(34,34,34);font-family:arial;font-size:small;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">



i want to get the<span> </span><span style="background:none 0% 0% repeat scroll yellow">ip</span>/<span style="background:none 0% 0% repeat scroll yellow">hostname</span><span> </span>and use it in<span> </span><span style="background:none 0% 0% repeat scroll yellow">lua</span><span> </span>script.</div>



<div style="color:rgb(34,34,34);font-family:arial;font-size:small;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">



<br></div><div style="color:rgb(34,34,34);font-family:arial;font-size:small;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">



Thanks,</div><div style="color:rgb(34,34,34);font-family:arial;font-size:small;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">



<span style="background:none 0% 0% repeat scroll yellow">Snabel</span></div></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div></div>