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 ++++++++++++++++++--------------- config/freeswitch/freeswitch_status.tmp | 23 ++++++++++++++++--- pkg_config.7.xml | 2 +- 3 files changed, 42 insertions(+), 22 deletions(-) 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"; diff --git a/config/freeswitch/freeswitch_status.tmp b/config/freeswitch/freeswitch_status.tmp index ea08b738..ceccd89a 100644 --- a/config/freeswitch/freeswitch_status.tmp +++ b/config/freeswitch/freeswitch_status.tmp @@ -115,6 +115,23 @@ if (!pkg_is_service_running('freeswitch')) { sleep(7); } ?> + + + + @@ -305,9 +322,9 @@ echo "\n"; echo "

\n\n"; -echo "tail -n 100 /usr/local/freeswitch/log/freeswitch.log
\n"; -echo "\n"; echo "

\n\n"; diff --git a/pkg_config.7.xml b/pkg_config.7.xml index afc7101d..e88afcab 100755 --- a/pkg_config.7.xml +++ b/pkg_config.7.xml @@ -92,7 +92,7 @@ http://doc.pfsense.org/index.php/FreeSWITCH http://www.pfsense.com/packages/config/freeswitch/freeswitch.xml http://files.pfsense.org/packages/7/All/ - 0.8.7 + 0.8.7.1 Beta 1.2.1 markjcrane@gmail.com -- cgit v1.2.3