From 7d9f813cf6164487e7668efc6e3db89aabb9e771 Mon Sep 17 00:00:00 2001 From: mcrane Date: Thu, 30 Apr 2009 15:43:00 -0600 Subject: FreeSWITCH fix path to delete enum because its now in the directly in the dialplan. More changes to usort so no errors occur when the array is empty. --- config/freeswitch/freeswitch.inc | 26 ++- config/freeswitch/freeswitch.xml | 2 +- config/freeswitch/freeswitch_dialplan_includes.tmp | 2 +- config/freeswitch/freeswitch_extensions.tmp | 2 +- config/freeswitch/freeswitch_extensions.xml | 225 --------------------- config/freeswitch/freeswitch_gateways.tmp | 2 +- config/freeswitch/freeswitch_public_includes.tmp | 3 +- 7 files changed, 20 insertions(+), 242 deletions(-) delete mode 100755 config/freeswitch/freeswitch_extensions.xml (limited to 'config/freeswitch') diff --git a/config/freeswitch/freeswitch.inc b/config/freeswitch/freeswitch.inc index 034e37be..f3d432f0 100644 --- a/config/freeswitch/freeswitch.inc +++ b/config/freeswitch/freeswitch.inc @@ -1695,15 +1695,19 @@ function sync_package_freeswitch() function freeswitch_php_install_command() { global $config; - $freeswitch_package_version = "0.8.5.1"; + $freeswitch_package_version = "0.8.5.3"; $freeswitch_build_version = "1.0.3"; $freeswitch_build_revision = "12545"; + + //set script execution time limit to 24 hours + set_time_limit (86400); + ini_set(max_execution_time,86400); + + //hide errors + ini_set('display_errors', '0'); conf_mount_rw(); config_lock(); - - //needed for mod_fax support - system('pkg_add -r spandsp'); if (!is_dir('/usr/local/www/packages/')) { exec("mkdir /usr/local/www/packages/"); @@ -2289,36 +2293,36 @@ function freeswitch_php_install_command() unset($filename); } - + write_rcfile(array( "file" => "freeswitch.sh", "start" => "/usr/local/freeswitch/bin/./freeswitch -nc", "stop" => "/usr/local/freeswitch/bin/./freeswitch -stop" ) ); - + exec("rm -R /freeswitch"); exec("cp /usr/local/freeswitch/conf/directory/default/brian.xml /usr/local/freeswitch/conf/directory/default/brian.xml.noload"); unlink_if_exists("/usr/local/freeswitch/conf/directory/default/brian.xml"); unlink_if_exists("/usr/local/freeswitch/conf/directory/default/example.com.xml"); - unlink_if_exists("/usr/local/freeswitch/conf/directory/default/99999_enum.xml"); - + unlink_if_exists("/usr/local/freeswitch/conf/dialplan/default/99999_enum.xml"); + write_rcfile(array( "file" => "freeswitch.sh", "start" => "/usr/local/freeswitch/bin/./freeswitch -nc", "stop" => "/usr/local/freeswitch/bin/./freeswitch -stop" ) ); - + sync_package_freeswitch(); $handle = popen("/usr/local/etc/rc.d/freeswitch.sh start", "r"); pclose($handle); - + if (pkg_is_service_running('freeswitch')) { sync_package_freeswitch_ivr(); } - + $config['installedpackages']['freeswitchsettings']['config'][0]['freeswitch_version'] = $freeswitch_build_version." revision ".$freeswitch_build_revision."."; $config['installedpackages']['freeswitchsettings']['config'][0]['freeswitch_package_version'] = $freeswitch_package_version; diff --git a/config/freeswitch/freeswitch.xml b/config/freeswitch/freeswitch.xml index eddcd9d5..af395a9e 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.8.5.2 + 0.8.5.3 FreeSWITCH: Settings /usr/local/pkg/freeswitch.inc diff --git a/config/freeswitch/freeswitch_dialplan_includes.tmp b/config/freeswitch/freeswitch_dialplan_includes.tmp index 2aad818e..a38489a2 100644 --- a/config/freeswitch/freeswitch_dialplan_includes.tmp +++ b/config/freeswitch/freeswitch_dialplan_includes.tmp @@ -216,7 +216,7 @@ include("head.inc"); return 0; } } - usort($a_dialplan_includes, "cmp_number"); + if (count($a_public_includes) > 0) { usort($a_dialplan_includes, "cmp_number"); } $i = 0; if (count($a_dialplan_includes) > 0) { diff --git a/config/freeswitch/freeswitch_extensions.tmp b/config/freeswitch/freeswitch_extensions.tmp index df9f398f..ea0aec84 100644 --- a/config/freeswitch/freeswitch_extensions.tmp +++ b/config/freeswitch/freeswitch_extensions.tmp @@ -146,7 +146,7 @@ if ($config_change == 1) { return 0; } } - usort($a_extensions, "cmp_number"); + if (count($a_extensions) > 0) { usort($a_extensions, "cmp_number"); } $i = 0; if (count($a_extensions) > 0) { diff --git a/config/freeswitch/freeswitch_extensions.xml b/config/freeswitch/freeswitch_extensions.xml deleted file mode 100755 index ab9a4bb7..00000000 --- a/config/freeswitch/freeswitch_extensions.xml +++ /dev/null @@ -1,225 +0,0 @@ - - - - - . - All rights reserved. - */ -/* ========================================================================== */ -/* - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - */ -/* ========================================================================== */ - ]]> - - FreeSWITCH is an open source telephony platform designed to facilitate the creation of voice and chat driven products scaling from a soft-phone up to a soft-switch. It can be used as a simple switching engine, a PBX, a media gateway or a media server to host IVR applications using simple scripts or XML to control the callflow. - Describe your package requirements here - Currently there are no FAQ items provided. - freeswitchextensions - 0.1 - FreeSWITCH: Extensions - /usr/local/pkg/freeswitch.inc - - - Settings - /pkg_edit.php?xml=freeswitch.xml&id=0 - - - Dialplan - /packages/freeswitch/freeswitch_dialplan_includes.php - - - Extensions - /packages/freeswitch/freeswitch_extensions.php - - - - External - /pkg_edit.php?xml=freeswitch_external.xml&id=0 - - - Gateways - /packages/freeswitch/freeswitch_gateways.php - - - Internal - /pkg_edit.php?xml=freeswitch_internal.xml&id=0 - - - IVR - /packages/freeswitch/freeswitch_ivr.php - - - Modules - /pkg_edit.php?xml=freeswitch_modules.xml&id=0 - - - Public - /packages/freeswitch/freeswitch_public_includes.php - - - Rec - /packages/freeswitch/freeswitch_recordings.php - - - Status - /packages/freeswitch/freeswitch_status.php - - - Vars - /pkg_edit.php?xml=freeswitch_vars.xml&id=0 - - - installedpackages->package->$packagename->configuration->extensions - - - Extension - extension - - - Mailbox - mailbox - - - Description - description - - - - - Extension - extension - Enter the extension here. The default configuration expects extension numbers between 1001 -1019. To use additional numbers for the extensions by adjusting the dialplan. In the in the dialplan under name="Local_Extension" adjust the regular expression="^(10[01][0-9])$". - input - - - Password - password - Enter the password here. - input - - - Mailbox - mailbox - Enter the mailbox here. Example: extension 1001 then mailbox 1001 - input - - - Voicemail Password - vm-password - Enter the voicemail password here. - input - - - Account Code - accountcode - Enter the account code here. Example: extension 1001 then accountcode 1001 - input - - - Effective Caller ID Name - effective_caller_id_name - Enter the effective caller id name here. - input - - - Effective Caller ID Number - effective_caller_id_number - Enter the effective caller id number here. - input - - - Outbound Caller ID Name - outbound_caller_id_name - Enter the outbound caller id name here. - input - - - Outbound Caller ID Number - outbound_caller_id_number - Enter the outbound caller id number here. - input - - - Voicemail Mail To - vm-mailto - Optional: Enter the email address to send voicemail to. - input - - - Voicemail Attach File - vm-attach-file - Choose whether to attach the file to the email. - select - - - - - - - - User Context - user_context - Enter the user context here. Example: default - input - - - Extension Description - description - Enter the description of the extension here. - input - - - - - - sync_package_freeswitch_extensions(); - - - sync_package_freeswitch_extensions(); - - - - \ No newline at end of file diff --git a/config/freeswitch/freeswitch_gateways.tmp b/config/freeswitch/freeswitch_gateways.tmp index 0a93212c..f2036415 100644 --- a/config/freeswitch/freeswitch_gateways.tmp +++ b/config/freeswitch/freeswitch_gateways.tmp @@ -140,7 +140,7 @@ if ($config_change == 1) { function cmp_string($a, $b) { return strcmp($a["gateway"], $b["gateway"]); } - usort($a_gateways, "cmp_string"); + if (count($a_gateways) > 0) { usort($a_gateways, "cmp_string"); } $i = 0; if (count($a_gateways) > 0) { diff --git a/config/freeswitch/freeswitch_public_includes.tmp b/config/freeswitch/freeswitch_public_includes.tmp index 401e3f30..5157ebbd 100644 --- a/config/freeswitch/freeswitch_public_includes.tmp +++ b/config/freeswitch/freeswitch_public_includes.tmp @@ -209,7 +209,6 @@ include("head.inc"); } } - //order the array //order the array function cmp_number($a, $b) { if ($a["order"] > $b["order"]) { @@ -219,7 +218,7 @@ include("head.inc"); return 0; } } - usort($a_public_includes, "cmp_number"); + if (count($a_public_includes) > 0) { usort($a_public_includes, "cmp_number"); } $i = 0; if (count($a_public_includes) > 0) { -- cgit v1.2.3