how can i get the server ip/hostname where freeswirch is installed?
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
to run the lua script from the same system as the freeswitch you can use 127.0.0.1. To know the ip of freeswitch you need to go to the system where freeswitch is installed and type ifconfig(for linux) or ipconfig(for windows). The port for the event socket is default 8021, password ClueCon. see this: https://wiki.freeswitch.org/wiki/Mod_event_socket On Sun, Jun 8, 2014 at 6:55 PM, 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
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
participants (3)
-
Shlomi Agiv
-
Snabel Kabiya
-
Steven Ayre