The 'hostname' api call will return the hostname of the system. For the IP you can check the global variable 'local_ip_v4' and 'local_ip_v6' - these are the ones autodetected by FreeSWITCH as its best guess on its main IP. It's probably the address that would be used to reach the default gateway. To get any other IPs you could also use the 'sofia status' api to get any other IPs you have bound profiles to. For both security and performance and to avoid having a fork bomb, I'd avoid running system commands such as ifconfig. On 8 June 2014 16:55, Snabel Kabiya <snabel@lexifone.com> wrote:
Hi,
how can i get the server ip/hostname where freeswirch is installed?
i want to get the ip/hostname and use it in lua script.
Thanks, Snabel
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org