diff options
author | mcrane <mctch@yahoo.com> | 2009-04-30 15:43:00 -0600 |
---|---|---|
committer | mcrane <mctch@yahoo.com> | 2009-04-30 15:43:00 -0600 |
commit | 7d9f813cf6164487e7668efc6e3db89aabb9e771 (patch) | |
tree | 346e549b96c15ebcc8a0f19d428d0c64861d3512 | |
parent | ab4946e7d593997df7baea4cd5ccc1ba2318d23a (diff) | |
download | pfsense-packages-7d9f813cf6164487e7668efc6e3db89aabb9e771.tar.gz pfsense-packages-7d9f813cf6164487e7668efc6e3db89aabb9e771.tar.bz2 pfsense-packages-7d9f813cf6164487e7668efc6e3db89aabb9e771.zip |
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.
-rw-r--r-- | config/freeswitch/freeswitch.inc | 26 | ||||
-rw-r--r-- | config/freeswitch/freeswitch.xml | 2 | ||||
-rw-r--r-- | config/freeswitch/freeswitch_dialplan_includes.tmp | 2 | ||||
-rw-r--r-- | config/freeswitch/freeswitch_extensions.tmp | 2 | ||||
-rwxr-xr-x | config/freeswitch/freeswitch_extensions.xml | 225 | ||||
-rw-r--r-- | config/freeswitch/freeswitch_gateways.tmp | 2 | ||||
-rw-r--r-- | config/freeswitch/freeswitch_public_includes.tmp | 3 | ||||
-rwxr-xr-x | pkg_config.7.xml | 2 |
8 files changed, 21 insertions, 243 deletions
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 @@ <requirements>Describe your package requirements here</requirements> <faq>Currently there are no FAQ items provided.</faq> <name>FreeSWITCH Settings</name> - <version>0.8.5.2</version> + <version>0.8.5.3</version> <title>FreeSWITCH: Settings</title> <include_file>/usr/local/pkg/freeswitch.inc</include_file> <menu> 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 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE packagegui SYSTEM "./schema/packages.dtd"> -<packagegui> - <copyright> - <![CDATA[ -/* $Id$ */ -/* ========================================================================== */ -/* - - freeswitch_extensions.xml - Copyright (C) 2008 Mark J Crane - All rights reserved. - - FreeSWITCH (TM) - http://www.freeswitch.org/ - - part of pfSense (http://www.pfSense.com) - Copyright (C) 2007 to whom it may belong - All rights reserved. - - Based on m0n0wall (http://m0n0.ch/wall) - Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>. - 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. - */ -/* ========================================================================== */ - ]]> - </copyright> - <description>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.</description> - <requirements>Describe your package requirements here</requirements> - <faq>Currently there are no FAQ items provided.</faq> - <name>freeswitchextensions</name> - <version>0.1</version> - <title>FreeSWITCH: Extensions</title> - <include_file>/usr/local/pkg/freeswitch.inc</include_file> - <tabs> - <tab> - <text>Settings</text> - <url>/pkg_edit.php?xml=freeswitch.xml&id=0</url> - </tab> - <tab> - <text>Dialplan</text> - <url>/packages/freeswitch/freeswitch_dialplan_includes.php</url> - </tab> - <tab> - <text>Extensions</text> - <url>/packages/freeswitch/freeswitch_extensions.php</url> - <active/> - </tab> - <tab> - <text>External</text> - <url>/pkg_edit.php?xml=freeswitch_external.xml&id=0</url> - </tab> - <tab> - <text>Gateways</text> - <url>/packages/freeswitch/freeswitch_gateways.php</url> - </tab> - <tab> - <text>Internal</text> - <url>/pkg_edit.php?xml=freeswitch_internal.xml&id=0</url> - </tab> - <tab> - <text>IVR</text> - <url>/packages/freeswitch/freeswitch_ivr.php</url> - </tab> - <tab> - <text>Modules</text> - <url>/pkg_edit.php?xml=freeswitch_modules.xml&id=0</url> - </tab> - <tab> - <text>Public</text> - <url>/packages/freeswitch/freeswitch_public_includes.php</url> - </tab> - <tab> - <text>Rec</text> - <url>/packages/freeswitch/freeswitch_recordings.php</url> - </tab> - <tab> - <text>Status</text> - <url>/packages/freeswitch/freeswitch_status.php</url> - </tab> - <tab> - <text>Vars</text> - <url>/pkg_edit.php?xml=freeswitch_vars.xml&id=0</url> - </tab> - </tabs> - <configpath>installedpackages->package->$packagename->configuration->extensions</configpath> - <adddeleteeditpagefields> - <columnitem> - <fielddescr>Extension</fielddescr> - <fieldname>extension</fieldname> - </columnitem> - <columnitem> - <fielddescr>Mailbox</fielddescr> - <fieldname>mailbox</fieldname> - </columnitem> - <columnitem> - <fielddescr>Description</fielddescr> - <fieldname>description</fieldname> - </columnitem> - </adddeleteeditpagefields> - <fields> - <field> - <fielddescr>Extension</fielddescr> - <fieldname>extension</fieldname> - <description>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])$".</description> - <type>input</type> - </field> - <field> - <fielddescr>Password</fielddescr> - <fieldname>password</fieldname> - <description>Enter the password here.</description> - <type>input</type> - </field> - <field> - <fielddescr>Mailbox</fielddescr> - <fieldname>mailbox</fieldname> - <description>Enter the mailbox here. Example: extension 1001 then mailbox 1001</description> - <type>input</type> - </field> - <field> - <fielddescr>Voicemail Password</fielddescr> - <fieldname>vm-password</fieldname> - <description>Enter the voicemail password here.</description> - <type>input</type> - </field> - <field> - <fielddescr>Account Code</fielddescr> - <fieldname>accountcode</fieldname> - <description>Enter the account code here. Example: extension 1001 then accountcode 1001</description> - <type>input</type> - </field> - <field> - <fielddescr>Effective Caller ID Name</fielddescr> - <fieldname>effective_caller_id_name</fieldname> - <description>Enter the effective caller id name here.</description> - <type>input</type> - </field> - <field> - <fielddescr>Effective Caller ID Number</fielddescr> - <fieldname>effective_caller_id_number</fieldname> - <description>Enter the effective caller id number here.</description> - <type>input</type> - </field> - <field> - <fielddescr>Outbound Caller ID Name</fielddescr> - <fieldname>outbound_caller_id_name</fieldname> - <description>Enter the outbound caller id name here.</description> - <type>input</type> - </field> - <field> - <fielddescr>Outbound Caller ID Number</fielddescr> - <fieldname>outbound_caller_id_number</fieldname> - <description>Enter the outbound caller id number here.</description> - <type>input</type> - </field> - <field> - <fielddescr>Voicemail Mail To</fielddescr> - <fieldname>vm-mailto</fieldname> - <description>Optional: Enter the email address to send voicemail to.</description> - <type>input</type> - </field> - <field> - <fielddescr>Voicemail Attach File</fielddescr> - <fieldname>vm-attach-file</fieldname> - <description>Choose whether to attach the file to the email.</description> - <type>select</type> - <options> - <option> - <name>true</name> - <value>true</value> - </option> - <option> - <name>false</name> - <value>false</value> - </option> - </options> - </field> - - <field> - <fielddescr>User Context</fielddescr> - <fieldname>user_context</fieldname> - <description>Enter the user context here. Example: default</description> - <type>input</type> - </field> - <field> - <fielddescr>Extension Description</fielddescr> - <fieldname>description</fieldname> - <description>Enter the description of the extension here.</description> - <type>input</type> - </field> - </fields> - <custom_add_php_command> - </custom_add_php_command> - <custom_php_resync_config_command> - sync_package_freeswitch_extensions(); - </custom_php_resync_config_command> - <custom_delete_php_command> - sync_package_freeswitch_extensions(); - </custom_delete_php_command> - <custom_php_deinstall_command> - </custom_php_deinstall_command> -</packagegui>
\ 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 @@ -210,7 +210,6 @@ include("head.inc"); } //order the array - //order the array function cmp_number($a, $b) { if ($a["order"] > $b["order"]) { return 1; @@ -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) { diff --git a/pkg_config.7.xml b/pkg_config.7.xml index 3a0347b4..daec8aef 100755 --- a/pkg_config.7.xml +++ b/pkg_config.7.xml @@ -92,7 +92,7 @@ <pkginfolink>http://doc.pfsense.org/index.php/FreeSWITCH</pkginfolink> <config_file>http://www.pfsense.com/packages/config/freeswitch/freeswitch.xml</config_file> <depends_on_package_base_url>http://files.pfsense.org/packages/7/All/</depends_on_package_base_url> - <version>0.8.5.2</version> + <version>0.8.5.3</version> <status>Beta</status> <required_version>1.2.1</required_version> <maintainer>markjcrane@gmail.com</maintainer> |