From cddd115318c9277375a7ad472ff88528470831fd Mon Sep 17 00:00:00 2001 From: mcrane Date: Wed, 13 May 2009 14:20:14 -0600 Subject: FreeSWITCH package copy internal profile to lan profile, status add more lines to log view and option for toggle editor --- config/freeswitch/freeswitch.inc | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) (limited to 'config/freeswitch/freeswitch.inc') diff --git a/config/freeswitch/freeswitch.inc b/config/freeswitch/freeswitch.inc index fd962df9..2ef39a8c 100644 --- a/config/freeswitch/freeswitch.inc +++ b/config/freeswitch/freeswitch.inc @@ -1778,30 +1778,33 @@ function create_lan_sip_profile() //create the LAN profile if it doesn't exist if (!file_exists('/usr/local/freeswitch/conf/sip_profiles/lan.xml')) { $lan_ip = $config['interfaces']['lan']['ipaddr']; - - $filename = "/usr/local/freeswitch/conf/sip_profiles/lan.xml"; - $handle = fopen($filename,"rb"); - $contents = fread($handle, filesize($filename)); - fclose($handle); - - $handle = fopen($filename,"w"); - $contents = str_replace("", "", $contents); - $contents = str_replace("", "", $contents); - $contents = str_replace("", "", $contents); - $contents = str_replace("", "", $contents); - $contents = str_replace("", "", $contents); - fwrite($handle, $contents); - unset($contents); - fclose($handle); - unset($filename); + if (strlen($lan_ip) > 0) { + exec("cp /usr/local/freeswitch/conf/sip_profiles/internal.xml /usr/local/freeswitch/conf/sip_profiles/lan.xml"); + + $filename = "/usr/local/freeswitch/conf/sip_profiles/lan.xml"; + $handle = fopen($filename,"rb"); + $contents = fread($handle, filesize($filename)); + fclose($handle); + + $handle = fopen($filename,"w"); + $contents = str_replace("", "", $contents); + $contents = str_replace("", "", $contents); + $contents = str_replace("", "", $contents); + $contents = str_replace("", "", $contents); + $contents = str_replace("", "", $contents); + fwrite($handle, $contents); + unset($contents); + fclose($handle); + unset($filename); + } } - + } function freeswitch_php_install_command() { global $config; - $freeswitch_package_version = "0.8.7"; + $freeswitch_package_version = "0.8.7.1"; $freeswitch_build_version = "1.0.4 pre 6"; $freeswitch_build_revision = "13238"; -- cgit v1.2.3