From 87af9fbf3bc1abed07190fe7240fc8193a5f972d Mon Sep 17 00:00:00 2001 From: mcrane Date: Sat, 13 Jun 2009 23:29:14 -0600 Subject: FreeSWITCH package clean up blank recordings, add dialplan default.xml, add dialplan public.xml, adjust wording on setup, and extension pages, create lan profile directory if it doesn't exist, status page add rescan and restart. --- config/freeswitch/freeswitch.inc | 23 +++++++++++++++++++++-- config/freeswitch/freeswitch.xml | 4 ++-- config/freeswitch/freeswitch_extensions_edit.tmp | 2 +- config/freeswitch/freeswitch_recordings.tmp | 10 +++++++++- config/freeswitch/freeswitch_status.tmp | 8 +++++++- pkg_config.7.xml | 2 +- 6 files changed, 41 insertions(+), 8 deletions(-) diff --git a/config/freeswitch/freeswitch.inc b/config/freeswitch/freeswitch.inc index 6930c31f..a4df2be1 100644 --- a/config/freeswitch/freeswitch.inc +++ b/config/freeswitch/freeswitch.inc @@ -264,6 +264,12 @@ function byte_convert( $bytes ) { function lan_sip_profile() { global $config; + + //if the lan directory does not exist then create it + if (!is_dir('/usr/local/freeswitch/conf/sip_profiles/lan')) { + exec("mkdir /usr/local/freeswitch/conf/sip_profiles/lan/"); + } + //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']; @@ -2569,7 +2575,7 @@ function sync_package_freeswitch() function freeswitch_php_install_command() { global $config; - $freeswitch_package_version = "0.9.1.1"; + $freeswitch_package_version = "0.9.2"; $freeswitch_build_version = "1.0.4 pre 6"; $freeswitch_build_revision = "13238"; @@ -2611,7 +2617,18 @@ function freeswitch_php_install_command() exec("mkdir /usr/local/freeswitch/storage/fax/receive/"); } - //make a backup copy of the default config + //download the dialplan default.xml + exec("cd /tmp/;fetch http://www.pfsense.com/packages/config/freeswitch/dialplan.default.xml"); + exec("cp /tmp/dialplan.default.xml /usr/local/freeswitch/conf/dialplan/default.xml"); + unlink_if_exists("/tmp/dialplan.default.xml"); + + //download the dialplan public.xml + exec("cd /tmp/;fetch http://www.pfsense.com/packages/config/freeswitch/dialplan.public.xml"); + exec("cp /tmp/dialplan.public.xml /usr/local/freeswitch/conf/dialplan/public.xml"); + unlink_if_exists("/tmp/dialplan.public.xml"); + + + //make a backup copy of the default config used with the 'Restore Default' buttons on the text areas. exec("cp -R /usr/local/freeswitch/conf /usr/local/freeswitch/conf.orig"); //remove some default config files that are not needed @@ -2625,7 +2642,9 @@ function freeswitch_php_install_command() if (!is_dir('/usr/local/freeswitch/sounds/custom/8000/')) { exec("mkdir /usr/local/freeswitch/sounds/custom/8000/"); } + + //copy audio files exec("cd /usr/local/freeswitch/sounds/custom/8000/;fetch http://www.pfsense.com/packages/config/freeswitch/please_enter_your_pin_number.wav"); exec("cd /usr/local/freeswitch/sounds/custom/8000/;fetch http://www.pfsense.com/packages/config/freeswitch/please_enter_the_pin_number.wav"); diff --git a/config/freeswitch/freeswitch.xml b/config/freeswitch/freeswitch.xml index 9b4f2d2d..c786a41b 100644 --- a/config/freeswitch/freeswitch.xml +++ b/config/freeswitch/freeswitch.xml @@ -44,7 +44,7 @@ Describe your package requirements here Currently there are no FAQ items provided. FreeSWITCH Settings - 0.9.1.1 + 0.9.2 FreeSWITCH: Settings /usr/local/pkg/freeswitch.inc @@ -120,7 +120,7 @@ Default Gateway default_gateway - Enter the default gateway name here. example: asterlink.com + Enter the default gateway name here. input diff --git a/config/freeswitch/freeswitch_extensions_edit.tmp b/config/freeswitch/freeswitch_extensions_edit.tmp index 5cedd96d..636a548f 100644 --- a/config/freeswitch/freeswitch_extensions_edit.tmp +++ b/config/freeswitch/freeswitch_extensions_edit.tmp @@ -159,7 +159,7 @@ display_top_tabs(build_menu()); Extension -
Enter the extension here. The default configuration expects extension numbers between 1000 -1019. To use 3 digit extensions adjust the dialplan 'default.xml' under name="Local_Extension" change the regular expression="^(10[01][0-9])$" to expression="^(\d{3})$".
+
Enter the extension here. The default configuration 3 or 4 digit extensions.
diff --git a/config/freeswitch/freeswitch_recordings.tmp b/config/freeswitch/freeswitch_recordings.tmp index 15f3be5e..7d504d15 100644 --- a/config/freeswitch/freeswitch_recordings.tmp +++ b/config/freeswitch/freeswitch_recordings.tmp @@ -320,6 +320,7 @@ if ($config_change == 1) { $i = 0; if (count($a_recordings) > 0) { foreach ($a_recordings as $recordingent) { + if (strlen($recordingent['filename']) > 0) { ?> @@ -345,7 +346,14 @@ if ($config_change == 1) { diff --git a/config/freeswitch/freeswitch_status.tmp b/config/freeswitch/freeswitch_status.tmp index 413fbbbd..4fa4181a 100644 --- a/config/freeswitch/freeswitch_status.tmp +++ b/config/freeswitch/freeswitch_status.tmp @@ -195,7 +195,13 @@ foreach (ListFiles('/usr/local/freeswitch/conf/sip_profiles') as $key=>$sip_prof echo "\n"; echo " \n"; echo " \n"; - echo " \n"; + echo " \n"; + if ($sip_profile_name == "external") { + echo " \n"; + } + else { + echo " \n"; + } echo "\n"; echo "\n"; echo "\n"; diff --git a/pkg_config.7.xml b/pkg_config.7.xml index b3be8c33..a6265113 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.9.1.1 + 0.9.2 Beta 1.2.1 markjcrane@gmail.com -- cgit v1.2.3