From 44f44e817107347cb73bc74a92c60e1a6fc63014 Mon Sep 17 00:00:00 2001 From: mcrane Date: Sun, 9 Aug 2009 02:12:29 -0600 Subject: FreeSWITCH dev package replace the rest of the hard coded paths, update wording, fix labels on a few pages, fix wav and mp3 download and play tools. --- config/freeswitch_dev/v_auto_attendant.tmp | 185 ++++++ config/freeswitch_dev/v_auto_attendant_edit.tmp | 701 +++++++++++++++++++++ config/freeswitch_dev/v_auto_attendant_options.tmp | 49 ++ .../v_auto_attendant_options_edit.tmp | 252 ++++++++ config/freeswitch_dev/v_config.inc | 145 +++-- config/freeswitch_dev/v_dialplan.tmp | 4 +- config/freeswitch_dev/v_dialplan_includes.tmp | 6 +- .../v_dialplan_includes_details_edit.tmp | 48 +- config/freeswitch_dev/v_fax.tmp | 11 +- config/freeswitch_dev/v_fax_edit.tmp | 4 +- config/freeswitch_dev/v_features.tmp | 12 +- config/freeswitch_dev/v_gateways.tmp | 4 +- config/freeswitch_dev/v_gateways_edit.tmp | 11 +- config/freeswitch_dev/v_hunt_group.tmp | 4 +- config/freeswitch_dev/v_ivr.tmp | 185 ------ config/freeswitch_dev/v_ivr_edit.tmp | 701 --------------------- config/freeswitch_dev/v_ivr_options.tmp | 49 -- config/freeswitch_dev/v_ivr_options_edit.tmp | 252 -------- config/freeswitch_dev/v_mailto.tmp | 6 +- config/freeswitch_dev/v_modules.tmp | 6 +- config/freeswitch_dev/v_profile_edit.tmp | 12 +- config/freeswitch_dev/v_profiles.tmp | 14 +- config/freeswitch_dev/v_public.tmp | 22 +- config/freeswitch_dev/v_public_includes.tmp | 33 +- .../v_public_includes_details_edit.tmp | 28 +- config/freeswitch_dev/v_recordings.tmp | 22 +- config/freeswitch_dev/v_recordings_play.tmp | 4 +- config/freeswitch_dev/v_status.tmp | 5 +- config/freeswitch_dev/v_time_conditions.tmp | 179 ------ config/freeswitch_dev/v_time_conditions_edit.tmp | 200 ------ config/freeswitch_dev/v_vars.tmp | 4 +- 31 files changed, 1423 insertions(+), 1735 deletions(-) create mode 100644 config/freeswitch_dev/v_auto_attendant.tmp create mode 100644 config/freeswitch_dev/v_auto_attendant_edit.tmp create mode 100755 config/freeswitch_dev/v_auto_attendant_options.tmp create mode 100644 config/freeswitch_dev/v_auto_attendant_options_edit.tmp delete mode 100644 config/freeswitch_dev/v_ivr.tmp delete mode 100644 config/freeswitch_dev/v_ivr_edit.tmp delete mode 100755 config/freeswitch_dev/v_ivr_options.tmp delete mode 100644 config/freeswitch_dev/v_ivr_options_edit.tmp mode change 100755 => 100644 config/freeswitch_dev/v_recordings_play.tmp delete mode 100644 config/freeswitch_dev/v_time_conditions.tmp delete mode 100644 config/freeswitch_dev/v_time_conditions_edit.tmp (limited to 'config/freeswitch_dev') diff --git a/config/freeswitch_dev/v_auto_attendant.tmp b/config/freeswitch_dev/v_auto_attendant.tmp new file mode 100644 index 00000000..ee769819 --- /dev/null +++ b/config/freeswitch_dev/v_auto_attendant.tmp @@ -0,0 +1,185 @@ + + + + +$v_label: IVR

\n"; +} +?> + +
+ + +
+ +
+ + + + + +
+ +
+ + + + + +

IVR
+
+ An interactive voice response (IVR) often refered to as an Auto Attendant. + It associates a recording to multiple options that can be used to direct calls + to extensions, voicemail, queues, other IVR applications, and external + phone numbers. +

+
+ + + + + + + + + + 0) { + foreach ($a_ivr as $ent) { + if (strlen($ent['ivrid']) > 0) { + + $ivrid = str_replace(array("{", "}"), "", $ent['ivrid']); + + ?> + + + + + + + + + + + + + + + + +
ExtensionNameDescription + + + + + +
+
+ + +   + +   + + + + + + +
+
+ + + + + +
+
+ +
+ +
+
+ + + +
+
+
+
+ +
+ +
+ + + + + diff --git a/config/freeswitch_dev/v_auto_attendant_edit.tmp b/config/freeswitch_dev/v_auto_attendant_edit.tmp new file mode 100644 index 00000000..6826a896 --- /dev/null +++ b/config/freeswitch_dev/v_auto_attendant_edit.tmp @@ -0,0 +1,701 @@ + 1 && Day < 7) {\n"; + $ivrconditionjs .= " return true;\n"; + $ivrconditionjs .= " }\n"; + $ivrconditionjs .= " else {\n"; + $ivrconditionjs .= " return false;\n"; + $ivrconditionjs .= " }\n"; + $ivrconditionjs .= "}\n"; + $ivrconditionjs .= "\n"; + $ivrconditionjs .= "function isweekend( Day ) {\n"; + $ivrconditionjs .= " if (Day > 1 && Day < 7) {\n"; + $ivrconditionjs .= " return false;\n"; + $ivrconditionjs .= " }\n"; + $ivrconditionjs .= " else {\n"; + $ivrconditionjs .= " return true;\n"; + $ivrconditionjs .= " }\n"; + $ivrconditionjs .= "}\n"; + $ivrconditionjs .= "\n"; + $ivrconditionjs .= "function isofficehours( Hours ) {\n"; + $ivrconditionjs .= " if (Hours >= 9 && Hours < 17) {\n"; + $ivrconditionjs .= " return true;\n"; + $ivrconditionjs .= " }\n"; + $ivrconditionjs .= " else {\n"; + $ivrconditionjs .= " return false;\n"; + $ivrconditionjs .= " }\n"; + $ivrconditionjs .= "}\n"; + $ivrconditionjs .= "\n"; + $ivrconditionjs .= "function isafterhours( Hours ) {\n"; + $ivrconditionjs .= " if (Hours >= 9 && Hours < 17) {\n"; + $ivrconditionjs .= " return false;\n"; + $ivrconditionjs .= " }\n"; + $ivrconditionjs .= " else {\n"; + $ivrconditionjs .= " return true;\n"; + $ivrconditionjs .= " }\n"; + $ivrconditionjs .= "}\n"; + $ivrconditionjs .= "\n"; + $ivrconditionjs .= "//set default\n"; + $ivrconditionjs .= "condition = true;\n"; + $ivrconditionjs .= "\n"; + $ivrconditionjs .= "//Holiday?\n"; + $ivrconditionjs .= "if (isholiday( Month, Date )) {\n"; + $ivrconditionjs .= " console_log( \"info\", \"holiday\\n\" );\n"; + $ivrconditionjs .= " condition = false;\n"; + $ivrconditionjs .= "}\n"; + $ivrconditionjs .= "\n"; + $ivrconditionjs .= "//Weekend?\n"; + $ivrconditionjs .= "if (isweekend( Day )) {\n"; + $ivrconditionjs .= " console_log( \"info\", \"weekend\\n\" );\n"; + $ivrconditionjs .= " condition = false;\n"; + $ivrconditionjs .= "}\n"; + $ivrconditionjs .= "\n"; + $ivrconditionjs .= "// After Hours?\n"; + $ivrconditionjs .= "if (isafterhours( Hours )) {\n"; + $ivrconditionjs .= " console_log( \"info\", \"after hours\\n\" );\n"; + $ivrconditionjs .= " condition = false;\n"; + $ivrconditionjs .= "}\n"; + $ivrconditionjs .= "\n"; + + +if (isset($id) && $a_ivr[$id]) { + $pconfig['ivrid'] = $a_ivr[$id]['ivrid']; + $ivrid = $a_ivr[$id]['ivrid']; + $pconfig['ivrextension'] = $a_ivr[$id]['ivrextension']; + $pconfig['ivrname'] = $a_ivr[$id]['ivrname']; + $pconfig['recordingidaction'] = $a_ivr[$id]['recordingidaction']; + $pconfig['recordingidantiaction'] = $a_ivr[$id]['recordingidantiaction']; + $pconfig['ivrtimeout'] = $a_ivr[$id]['ivrtimeout']; + $pconfig['ivrcalltimeout'] = $a_ivr[$id]['ivrcalltimeout']; + $pconfig['ivrcontext'] = $a_ivr[$id]['ivrcontext']; + $pconfig['ivrdirectdial'] = $a_ivr[$id]['ivrdirectdial']; + $pconfig['ivrringback'] = $a_ivr[$id]['ivrringback']; + $pconfig['ivrcidnameprefix'] = $a_ivr[$id]['ivrcidnameprefix']; + $pconfig['ivrconditionjs'] = ($a_ivr[$id]['ivrconditionjs']); + $pconfig['ivrdescr'] = $a_ivr[$id]['ivrdescr']; +} + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + + if ($_GET['act'] == "del") { + if ($_GET['type'] == 'options') { + if ($a_ivroptions[$_GET['optionid']]) { + unset($a_ivr_options[$_GET['optionid']]); + write_config(); + sync_package_v_ivr(); + header("Location: v_auto_attendant_edit.php?id=".$_GET['id']); + exit; + } + } + } + + + if (!$input_errors) { + + $ivrent = array(); + if (strlen($_POST['ivrid']) > 0) { + $ivrent['ivrid'] = $_POST['ivrid']; + } + else { + $ivrent['ivrid'] = guid(); + } + $ivrent['ivrextension'] = $_POST['ivrextension']; + $ivrent['ivrname'] = $_POST['ivrname']; + $ivrent['recordingidaction'] = $_POST['recordingidaction']; + $ivrent['recordingidantiaction'] = $_POST['recordingidantiaction']; + $ivrent['ivrtimeout'] = $_POST['ivrtimeout']; + $ivrent['ivrcalltimeout'] = $_POST['ivrcalltimeout']; + $ivrent['ivrcontext'] = $_POST['ivrcontext']; + $ivrent['ivrdirectdial'] = $_POST['ivrdirectdial']; + $ivrent['ivrringback'] = $_POST['ivrringback']; + $ivrent['ivrcidnameprefix'] = $_POST['ivrcidnameprefix']; + $ivrent['ivrconditionjs'] = base64_encode($_POST['ivrconditionjs']); + $ivrent['ivrdescr'] = $_POST['ivrdescr']; + + if (isset($id) && $a_ivr[$id]) { + //update + $a_ivr[$id] = $ivrent; + } + else { + //add + $a_ivr[] = $ivrent; + } + + //touch($d_hostsdirty_path); + write_config(); + sync_package_v_ivr(); + + header("Location: v_auto_attendant.php"); + exit; + } +} + +include("head.inc"); + +?> + + + + + +$v_label: IVR: Edit

\n"; +} + +if ($input_errors) print_input_errors($input_errors); + +?> + + +
+ + +
+ +
+ + + + +
+ + + + + +

General Settings:
+
+ Interactive voice response general settings. +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Extension + +
e.g. 5002
IVR Name + +
Recording Action + \n"; + echo " \n"; + if (count($a_recordings) > 0) { + foreach ($a_recordings as $ent) { + if (htmlspecialchars($pconfig['recordingidaction']) == $ent['recordingid']) { + echo " \n"; + } + else { + echo " \n"; + } + } + } + echo " \n"; + ?> +
Recording Anti-Action + \n"; + echo " \n"; + if (count($a_recordings) > 0) { + foreach ($a_recordings as $ent) { + if (htmlspecialchars($pconfig['recordingidantiaction']) == $ent['recordingid']) { + echo " \n"; + } + else { + echo " \n"; + } + } + } + echo " \n"; + ?> +
IVR Timeout + +
+ After the recording concludes the + timeout sets the time in seconds to continue to wait for DTMF. + If the DTMF is
not detected during that time the 't' + timeout option is executed. +
+
Call Timeout + +
+ + Call timeout is the time in seconds to ring the destination. After this time is exceeded calls + to extensions will be sent to voicemail. default: 30 seconds + +
Context + +
e.g. default
Direct Dial + \n"; + echo " \n"; + if (strlen($pconfig['ivrdirectdial']) == 0) { //set default + echo " \n"; + echo " \n"; + } + else { + if (htmlspecialchars($pconfig['ivrdirectdial']) == "true") { + echo " \n"; + } + else { + echo " \n"; + } + if (htmlspecialchars($pconfig['ivrdirectdial']) == "false") { + echo " \n"; + } + else { + echo " \n"; + } + } + + echo " \n"; + ?> +
Allows callers to dial directly to extensions and feature codes that are up to 5 digits in length. +
Ring Back + \n"; + echo " \n"; + if (htmlspecialchars($pconfig['ivrringback']) == "ring") { + echo " \n"; + } + else { + echo " \n"; + } + if (htmlspecialchars($pconfig['ivrringback']) == "music") { + echo " \n"; + } + else { + echo " \n"; + } + echo " \n"; + ?> +
+ + Defines what the caller will hear while destination is being called. The choices are music + (music on hold) ring (ring tone.) default: music + +
CID Prefix + +
Set a prefix on the caller ID name. (optional)
Description + +
+ + You may enter a description here for your reference (not parsed). + +
Javascript Condition + ".$ivrconditionjs."\n"; + } + else { + echo "\n"; + } + ?> +
A simple valid condition is: + condition=true; To re-populate the default simply empty the + textarea and click on save. The following javascript variables + have been defined: Hours, Mins, Seconds, Month, Date, Year, + and Day.
  + + + + + +
+
+ +
+
+ +
+ "; + //print_r ($a_ivr); + //echo ""; + + //if ($savemsg) print_info_box($savemsg); + //if (file_exists($d_hostsdirty_path)): echo"

"; + //print_info_box_np("The FreeSWITCH recordings have been changed.
You must apply the changes in order for them to take effect."); + //echo"
"; + //endif; + + ?> + + + + + +


+
+ Options are the choices that are available to the caller when they + are calling the auto attendant. If the caller presses 2 then the call + is directed to the corresponding destination. +

+ + + + + + +

Action
+
+ The options that are executed when the condition matches. +

+
+ + + + + + + + + + + + 0) { + foreach ($a_ivr_options as $ent) { + if ($ent['optionaction'] == "action" && $ivrid == $ent['ivrid']) { + ?> + + + + + + + + + + + + + + + + + + + +
OptionTypeProfileDestinationDescription + + + + + +
+ 1) { ?> + + +
+
+ + +   + +   + +   + +   + + + + + + +
+
+ + + + + +
+ 1) { ?> + + +
+
+ +

+ + + +
+ "; + //print_r ($a_ivr); + //echo ""; + + //if ($savemsg) print_info_box($savemsg); + //if (file_exists($d_hostsdirty_path)): echo"

"; + //print_info_box_np("The FreeSWITCH recordings have been changed.
You must apply the changes in order for them to take effect."); + //echo"
"; + //endif; + + ?> + + + + +

Anti-Action
+
+ The options that are executed when the condition does NOT match. +

+
+ + + + + + + + + + + + 0) { + foreach ($a_ivr_options as $ent) { + if ($ent['optionaction'] == "anti-action" && $ivrid == $ent['ivrid']) { + ?> + + + + + + + + + + + + + + + + + + + +
OptionTypeProfileDestinationDescription + + + + + +
+ 1) { ?> + + +
+
+ + +   + +   + +   + +   + + + + + + +
+
+ + + + + +
+ 1) { ?> + + +
+
+ +

+ +
+
+ +
+ +
+ + + + diff --git a/config/freeswitch_dev/v_auto_attendant_options.tmp b/config/freeswitch_dev/v_auto_attendant_options.tmp new file mode 100755 index 00000000..f92a59d5 --- /dev/null +++ b/config/freeswitch_dev/v_auto_attendant_options.tmp @@ -0,0 +1,49 @@ + \ No newline at end of file diff --git a/config/freeswitch_dev/v_auto_attendant_options_edit.tmp b/config/freeswitch_dev/v_auto_attendant_options_edit.tmp new file mode 100644 index 00000000..7be21e6b --- /dev/null +++ b/config/freeswitch_dev/v_auto_attendant_options_edit.tmp @@ -0,0 +1,252 @@ + + + +$v_label: Options: Edit

\n"; +} +if ($input_errors) print_input_errors($input_errors); + +?> + +
+ + +
+ +
+ + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Option Number + +
Option Number
+ e.g. 1
Type + \n"; + echo " \n"; + if (htmlspecialchars($pconfig['optiontype']) == "extension") { + echo " \n"; + } + else { + echo " \n"; + } + if (htmlspecialchars($pconfig['optiontype']) == "voicemail") { + echo " \n"; + } + else { + echo " \n"; + } + if (htmlspecialchars($pconfig['optiontype']) == "sip uri") { + echo " \n"; + } + else { + echo " \n"; + } + echo " \n"; + ?> +
Profile + \n"; + echo " \n"; + if (htmlspecialchars($pconfig['optionprofile']) == "auto") { + echo " \n"; + } + else { + echo " \n"; + } + + foreach (ListFiles($v_conf_dir.'/sip_profiles') as $key=>$sip_profile_file){ + $sip_profile_name = str_replace(".xml", "", $sip_profile_file); + + if (htmlspecialchars($pconfig['optionprofile']) == $sip_profile_name) { + echo " \n"; + } + else { + echo " \n"; + } + } + echo " \n"; + + ?> +
Destination + +
+ + + extension: 1001
+ voicemail: 1001
+ sip uri (voicemail): sofia/internal/*98@${domain}
+ sip uri (external number): sofia/gateway/gatewayname/12081231234
+ sip uri (auto attendant): sofia/internal/5002@${domain}
+ sip uri (user): /user/1001@${domain}
+
+
Description + +
You may enter a description here + for your reference (not parsed).
  + + + + + + + +
+
+ +
+
+
+
+
+
+ +
+ +
+ + + + diff --git a/config/freeswitch_dev/v_config.inc b/config/freeswitch_dev/v_config.inc index 69350a9e..9ae25dec 100644 --- a/config/freeswitch_dev/v_config.inc +++ b/config/freeswitch_dev/v_config.inc @@ -49,15 +49,20 @@ function v_settings() { global $config; $config['installedpackages']['freeswitchsettings']['config'][0]['php_dir'] = '/usr/local/bin/php'; - $config['installedpackages']['freeswitchsettings']['config'][0]['tmp_dir'] = '/tmp/'; + $config['installedpackages']['freeswitchsettings']['config'][0]['tmp_dir'] = '/tmp'; + $config['installedpackages']['freeswitchsettings']['config'][0]['bin_dir'] = '/usr/local/bin'; + $config['installedpackages']['freeswitchsettings']['config'][0]['v_startup_script_dir'] = '/usr/local/etc/rc.d'; $config['installedpackages']['freeswitchsettings']['config'][0]['v_package_version'] = "0.9.7.13"; $config['installedpackages']['freeswitchsettings']['config'][0]['v_build_version'] = "1.0.4"; - $config['installedpackages']['freeswitchsettings']['config'][0]['v_build_revision'] = ""; + $config['installedpackages']['freeswitchsettings']['config'][0]['v_build_revision'] = "Release"; $config['installedpackages']['freeswitchsettings']['config'][0]['v_label'] = 'FreeSWITCH'; //FreeSWITCH (TM) http://www.freeswitch.org/ $config['installedpackages']['freeswitchsettings']['config'][0]['v_name'] = 'freeswitch'; $config['installedpackages']['freeswitchsettings']['config'][0]['v_dir'] = '/usr/local/freeswitch'; + $config['installedpackages']['freeswitchsettings']['config'][0]['v_parent_dir'] = '/usr/local/'; $config['installedpackages']['freeswitchsettings']['config'][0]['v_backup_dir'] = '/root/backup'; $config['installedpackages']['freeswitchsettings']['config'][0]['v_web_dir'] = '/usr/local/www/packages/freeswitch'; + $config['installedpackages']['freeswitchsettings']['config'][0]['v_web_root'] = '/usr/local/www/'; + $config['installedpackages']['freeswitchsettings']['config'][0]['v_relative_url'] = '/packages/freeswitch'; $config['installedpackages']['freeswitchsettings']['config'][0]['v_conf_dir'] = '/usr/local/freeswitch/conf'; $config['installedpackages']['freeswitchsettings']['config'][0]['v_db_dir'] = '/usr/local/freeswitch/db'; $config['installedpackages']['freeswitchsettings']['config'][0]['v_htdocs_dir'] = '/usr/local/freeswitch/htdocs'; @@ -79,69 +84,69 @@ function build_menu() { $tab_array = array(); $menu_selected = false; - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_settings.php") { $menu_selected = true; } - $tab_array[] = array(gettext("Settings"), $menu_selected, "/packages/freeswitch/v_settings.php"); + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_settings.php") { $menu_selected = true; } + $tab_array[] = array(gettext("Settings"), $menu_selected, $v_relative_url."/v_settings.php"); unset($menu_selected); $menu_selected = false; - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_dialplan_includes.php") { $menu_selected = true; } - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_dialplan.php") { $menu_selected = true; } - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_dialplan_includes_edit.php") { $menu_selected = true; } - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_dialplan_includes_details_edit.php") { $menu_selected = true; } - $tab_array[] = array(gettext("Dialplan"), $menu_selected, "/packages/freeswitch/v_dialplan_includes.php"); + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_dialplan_includes.php") { $menu_selected = true; } + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_dialplan.php") { $menu_selected = true; } + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_dialplan_includes_edit.php") { $menu_selected = true; } + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_dialplan_includes_details_edit.php") { $menu_selected = true; } + $tab_array[] = array(gettext("Dialplan"), $menu_selected, $v_relative_url."/v_dialplan_includes.php"); unset($menu_selected); $menu_selected = false; - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_extensions.php") { $menu_selected = true; } - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_extensions_edit.php") { $menu_selected = true; } - $tab_array[] = array(gettext("Extensions"), $menu_selected, "/packages/freeswitch/v_extensions.php"); + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_extensions.php") { $menu_selected = true; } + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_extensions_edit.php") { $menu_selected = true; } + $tab_array[] = array(gettext("Extensions"), $menu_selected, $v_relative_url."/v_extensions.php"); unset($menu_selected); $menu_selected = false; - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_features.php") { $menu_selected = true; } - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_fax.php") { $menu_selected = true; } - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_fax_edit.php") { $menu_selected = true; } - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_hunt_group.php") { $menu_selected = true; } - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_hunt_group_edit.php") { $menu_selected = true; } - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_hunt_group_destinations.php") { $menu_selected = true; } - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_hunt_group_destinations_edit.php") { $menu_selected = true; } - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_ivr.php") { $menu_selected = true; } - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_ivr_edit.php") { $menu_selected = true; } - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_ivr_options_edit.php") { $menu_selected = true; } - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_modules.php") { $menu_selected = true; } - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_recordings.php") { $menu_selected = true; } - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_recordings_edit.php") { $menu_selected = true; } - $tab_array[] = array(gettext("Features"), $menu_selected, "/packages/freeswitch/v_features.php"); + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_features.php") { $menu_selected = true; } + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_fax.php") { $menu_selected = true; } + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_fax_edit.php") { $menu_selected = true; } + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_hunt_group.php") { $menu_selected = true; } + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_hunt_group_edit.php") { $menu_selected = true; } + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_hunt_group_destinations.php") { $menu_selected = true; } + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_hunt_group_destinations_edit.php") { $menu_selected = true; } + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_auto_attendant.php") { $menu_selected = true; } + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_auto_attendant_edit.php") { $menu_selected = true; } + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_auto_attendant_options_edit.php") { $menu_selected = true; } + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_modules.php") { $menu_selected = true; } + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_recordings.php") { $menu_selected = true; } + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_recordings_edit.php") { $menu_selected = true; } + $tab_array[] = array(gettext("Features"), $menu_selected, $v_relative_url."/v_features.php"); unset($menu_selected); $menu_selected = false; - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_gateways.php") { $menu_selected = true; } - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_gateways_edit.php") { $menu_selected = true; } - $tab_array[] = array(gettext("Gateways"), $menu_selected, "/packages/freeswitch/v_gateways.php"); + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_gateways.php") { $menu_selected = true; } + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_gateways_edit.php") { $menu_selected = true; } + $tab_array[] = array(gettext("Gateways"), $menu_selected, $v_relative_url."/v_gateways.php"); unset($menu_selected); $menu_selected = false; - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_profiles.php") { $menu_selected = true; } - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_profile_edit.php") { $menu_selected = true; } - $tab_array[] = array(gettext("Profiles"), $menu_selected, "/packages/freeswitch/v_profiles.php"); + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_profiles.php") { $menu_selected = true; } + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_profile_edit.php") { $menu_selected = true; } + $tab_array[] = array(gettext("Profiles"), $menu_selected, $v_relative_url."/v_profiles.php"); unset($menu_selected); $menu_selected = false; - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_public.php") { $menu_selected = true; } - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_public_includes.php") { $menu_selected = true; } - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_public_includes_edit.php") { $menu_selected = true; } - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_public_includes_details_edit.php") { $menu_selected = true; } - $tab_array[] = array(gettext("Public"), $menu_selected, "/packages/freeswitch/v_public_includes.php"); + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_public.php") { $menu_selected = true; } + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_public_includes.php") { $menu_selected = true; } + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_public_includes_edit.php") { $menu_selected = true; } + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_public_includes_details_edit.php") { $menu_selected = true; } + $tab_array[] = array(gettext("Public"), $menu_selected, $v_relative_url."/v_public_includes.php"); unset($menu_selected); $menu_selected = false; - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_status.php") { $menu_selected = true; } - $tab_array[] = array(gettext("Status"), $menu_selected, "/packages/freeswitch/v_status.php"); + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_status.php") { $menu_selected = true; } + $tab_array[] = array(gettext("Status"), $menu_selected, $v_relative_url."/v_status.php"); unset($menu_selected); $menu_selected = false; - if ($_SERVER["SCRIPT_NAME"] == "/packages/freeswitch/v_vars.php") { $menu_selected = true; } - $tab_array[] = array(gettext("Vars"), $menu_selected, "/packages/freeswitch/v_vars.php"); + if ($_SERVER["SCRIPT_NAME"] == $v_relative_url."/v_vars.php") { $menu_selected = true; } + $tab_array[] = array(gettext("Vars"), $menu_selected, $v_relative_url."/v_vars.php"); unset($menu_selected); display_top_tabs($tab_array); @@ -1542,7 +1547,7 @@ function sync_package_v_hunt_group() $tmp .= "session.streamFile( \"".$v_dir."/sounds/custom/8000/please_say_your_name_and_reason_for_calling.wav\");\n"; $tmp .= "session.execute(\"gentones\", \"%(1000, 0, 640)\");\n"; $tmp .= "session.execute(\"set\", \"playback_terminators=#\");\n"; - $tmp .= "session.execute(\"record\", \"/tmp/\"+caller_announce+\" 180 200\");\n"; + $tmp .= "session.execute(\"record\", \"".$tmp_dir."/\"+caller_announce+\" 180 200\");\n"; $tmp .= "\n"; $tmp .= "result = session.setAutoHangup(false);\n"; $tmp .= "session.execute(\"transfer\", \"*\"+extension+\" XML default\");\n"; @@ -3112,8 +3117,8 @@ function v_install_phase_2() { clearstatcache(); //clear file status cache - if (!is_dir('/usr/local/www/packages/')) { - exec("mkdir /usr/local/www/packages/"); + if (!is_dir($v_web_root.'/packages/')) { + exec("mkdir ".$v_web_root."/packages/"); } if (!is_dir($v_web_dir)) { @@ -3150,11 +3155,12 @@ function v_install_phase_2() { //misc files - if (!is_dir('/usr/local/www/edit_area/')) { - chdir('/tmp/'); - exec("cd /tmp/;fetch ".$v_download_path."edit_area.tgz"); - system('cd /usr/local/www; tar xvpfz /tmp/edit_area.tgz edit_area'); - unlink_if_exists("/tmp/edit_area.tgz"); + if (!is_dir($v_web_root.'/edit_area/')) { + chdir($tmp_dir); + exec("fetch ".$v_download_path."edit_area.tgz"); + chdir($v_web_root); + system('tar xvpfz ".tmp_dir."/edit_area.tgz edit_area'); + unlink_if_exists($tmp_dir."/edit_area.tgz"); } @@ -3210,7 +3216,7 @@ function v_install_phase_2() { exec("fetch ".$v_download_path."v_fax_edit.tmp"); exec("cp ".$tmp_dir."/v_fax_edit.tmp ".$v_web_dir."/v_fax_edit.php"); - unlink_if_exists("/tmp/v_fax_edit.tmp"); + unlink_if_exists($tmp_dir."/v_fax_edit.tmp"); exec("fetch ".$v_download_path."fax_to_email.tmp"); exec("cp ".$tmp_dir."/fax_to_email.tmp ".$v_web_dir."/fax_to_email.php"); @@ -3244,21 +3250,21 @@ function v_install_phase_2() { exec("cp ".$tmp_dir."/v_hunt_group_destinations_edit.tmp ".$v_web_dir."/v_hunt_group_destinations_edit.php"); unlink_if_exists($tmp_dir."/v_hunt_group_destinations_edit.tmp"); - exec("fetch ".$v_download_path."v_ivr.tmp"); - exec("cp ".$tmp_dir."/v_ivr.tmp ".$v_web_dir."/v_ivr.php"); - unlink_if_exists($tmp_dir."/v_ivr.tmp"); + exec("fetch ".$v_download_path."v_auto_attendant.tmp"); + exec("cp ".$tmp_dir."/v_auto_attendant.tmp ".$v_web_dir."/v_auto_attendant.php"); + unlink_if_exists($tmp_dir."/v_auto_attendant.tmp"); - exec("fetch ".$v_download_path."v_ivr_edit.tmp"); - exec("cp ".$tmp_dir."/v_ivr_edit.tmp ".$v_web_dir."/v_ivr_edit.php"); - unlink_if_exists($tmp_dir."/v_ivr_edit.tmp"); + exec("fetch ".$v_download_path."v_auto_attendant_edit.tmp"); + exec("cp ".$tmp_dir."/v_auto_attendant_edit.tmp ".$v_web_dir."/v_auto_attendant_edit.php"); + unlink_if_exists($tmp_dir."/v_auto_attendant_edit.tmp"); - exec("fetch ".$v_download_path."v_ivr_options.tmp"); - exec("cp ".$tmp_dir."/v_ivr_options.tmp ".$v_web_dir."/v_ivr_options.php"); - unlink_if_exists($tmp_dir."/v_ivr_options.tmp"); + exec("fetch ".$v_download_path."v_auto_attendant_options.tmp"); + exec("cp ".$tmp_dir."/v_auto_attendant_options.tmp ".$v_web_dir."/v_auto_attendant_options.php"); + unlink_if_exists($tmp_dir."/v_auto_attendant_options.tmp"); - exec("fetch ".$v_download_path."v_ivr_options_edit.tmp"); - exec("cp ".$tmp_dir."/v_ivr_options_edit.tmp ".$v_web_dir."/v_ivr_options_edit.php"); - unlink_if_exists($tmp_dir."/v_ivr_options_edit.tmp"); + exec("fetch ".$v_download_path."v_auto_attendant_options_edit.tmp"); + exec("cp ".$tmp_dir."/v_auto_attendant_options_edit.tmp ".$v_web_dir."/v_auto_attendant_options_edit.php"); + unlink_if_exists($tmp_dir."/v_auto_attendant_options_edit.tmp"); exec("fetch ".$v_download_path."v_profiles.tmp"); exec("cp ".$tmp_dir."/v_profiles.tmp ".$v_web_dir."/v_profiles.php"); @@ -3316,18 +3322,9 @@ function v_install_phase_2() { exec("cp ".$tmp_dir."/v_status.tmp ".$v_web_dir."/v_status.php"); unlink_if_exists($tmp_dir."/v_status.tmp"); - exec("fetch ".$v_download_path."v_time_conditions.tmp"); - exec("cp ".$tmp_dir."/v_time_conditions.tmp ".$v_web_dir."/v_time_conditions.php"); - unlink_if_exists($tmp_dir."/v_time_conditions.tmp"); - - exec("fetch ".$v_download_path."v_time_conditions_edit.tmp"); - exec("cp ".$tmp_dir."/v_time_conditions_edit.tmp ".$v_web_dir."/v_time_conditions_edit.php"); - unlink_if_exists($tmp_dir."/v_time_conditions_edit.tmp"); - exec("fetch ".$v_download_path."v_vars.tmp"); exec("cp ".$tmp_dir."/v_vars.tmp ".$v_web_dir."/v_vars.php"); unlink_if_exists($tmp_dir."/v_vars.tmp"); - chdir($v_scripts_dir); exec("fetch ".$v_download_path."disa.js"); @@ -3369,9 +3366,9 @@ function v_install_phase_1() // update_output_window($static_output); - //exec("cd /tmp/;fetch ".$download_path."freeswitch.tgz"); //handled by freeswitch.xml - //exec("tar zxvf /tmp/freeswitch.tgz -C /usr/local/"); - //unlink_if_exists("/tmp/freeswitch.tgz"); + //exec("fetch ".$download_path."freeswitch.tgz"); //handled by freeswitch.xml + //exec("tar zxvf ".$tmp_dir."/freeswitch.tgz -C /usr/local/"); + //unlink_if_exists($tmp_dir."/freeswitch.tgz"); // $static_output = 'Downloading Files'; diff --git a/config/freeswitch_dev/v_dialplan.tmp b/config/freeswitch_dev/v_dialplan.tmp index 034f60f9..e15108e3 100644 --- a/config/freeswitch_dev/v_dialplan.tmp +++ b/config/freeswitch_dev/v_dialplan.tmp @@ -112,7 +112,7 @@ build_menu();

Default Dialplan
The default dialplan is used to setup call destinations based on conditions and context. - You can use the dialplan to send calls to gateways, IVRs, external numbers, to scripts, or any destination. + You can use the dialplan to send calls to gateways, auto attendants, external numbers, to scripts, or any destination.

@@ -138,7 +138,7 @@ build_menu(); "; + echo ""; ?> diff --git a/config/freeswitch_dev/v_dialplan_includes.tmp b/config/freeswitch_dev/v_dialplan_includes.tmp index 6ce4a3f6..0377d148 100644 --- a/config/freeswitch_dev/v_dialplan_includes.tmp +++ b/config/freeswitch_dev/v_dialplan_includes.tmp @@ -155,13 +155,15 @@ build_menu(); - + - The dialplan is used to setup call destinations based on conditions and context. You can use the dialplan to send calls to gateways, IVRs, external numbers, to scripts, or any destination. + The dialplan is used to setup call destinations based on conditions and context. + You can use the dialplan to send calls to gateways, auto attendants, external numbers, + to scripts, or any destination. diff --git a/config/freeswitch_dev/v_dialplan_includes_details_edit.tmp b/config/freeswitch_dev/v_dialplan_includes_details_edit.tmp index 789f3d1f..d3c3aeba 100644 --- a/config/freeswitch_dev/v_dialplan_includes_details_edit.tmp +++ b/config/freeswitch_dev/v_dialplan_includes_details_edit.tmp @@ -96,16 +96,16 @@ if ($_POST) { if (isset($id) && $a_dialplan_includes_details[$id]) { - //update - $a_dialplan_includes_details[$id] = $ent; + //update + $a_dialplan_includes_details[$id] = $ent; } else { - //add + //add $a_dialplan_includes_details[] = $ent; } write_config(); - sync_package_v_dialplan_includes(); + sync_package_v_dialplan_includes(); header("Location: v_dialplan_includes_edit.php?id=".$parentid); exit; @@ -275,13 +275,17 @@ build_menu(); -
-
- Additional Information -
-
- http://wiki.freeswitch.org/wiki/Dialplan_XML + \n"; + echo "
\n"; + echo "Additional Information\n"; + echo "
\n"; + echo "
\n"; + echo "http://wiki.freeswitch.org/wiki/Dialplan_XML"; + } + ?>


@@ -290,7 +294,7 @@ build_menu(); Conditions

- Conditions are pattern matching tags that help FreeSwitch decide if the current call should be processed in this extension or not. When matching conditions against the current call you have several fields that you can compare against. + Conditions are pattern matching tags that help decide if the current call should be processed in this extension or not. When matching conditions against the current call you have several fields that you can compare against. @@ -319,10 +323,14 @@ build_menu();

Actions are executed when the condition matches. Anti-Actions are executed when the condition does NOT match. - Additional information on applications for Actions and Anti-Actions.
- http://wiki.freeswitch.org/wiki/Modules#Applications -
- http://wiki.freeswitch.org/wiki/Dialplan_Functions + \n"; + echo "http://wiki.freeswitch.org/wiki/Modules#Applications\n"; + echo "
\n"; + echo "http://wiki.freeswitch.org/wiki/Dialplan_Functions\n"; + } + ?>


@@ -358,8 +366,12 @@ build_menu(); Param Example parameters by name and value
- http://wiki.freeswitch.org/wiki/Special:Search?search=param&go=Go -