diff --git a/app/access_controls/access_controls.php b/app/access_controls/access_controls.php
index ac6f92a527..e049c83431 100644
--- a/app/access_controls/access_controls.php
+++ b/app/access_controls/access_controls.php
@@ -211,8 +211,12 @@
if (!empty($access_controls) && count($access_controls) > 0) {
$x = 0;
foreach ($access_controls as $row) {
+ $list_row_url = '';
if (permission_exists('access_control_edit')) {
$list_row_url = "access_control_edit.php?id=".urlencode($row['access_control_uuid']);
+ if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
+ $list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
+ }
}
echo "
\n";
if (permission_exists('fifo_add') || permission_exists('fifo_edit') || permission_exists('fifo_delete')) {
@@ -284,8 +287,8 @@
}
echo " \n";
echo " ".escape($row['fifo_extension'])." \n";
- echo " ".escape($row['fifo_agent_queue'])." \n";
echo " ".escape($row['fifo_agent_status'])." \n";
+ echo " ".escape($row['fifo_agent_queue'])." \n";
echo " ".escape($row['fifo_order'])." \n";
if (permission_exists('fifo_edit')) {
echo " \n";
@@ -319,4 +322,4 @@
//include the footer
require_once "resources/footer.php";
-?>
+?>
\ No newline at end of file
diff --git a/app/fifo/fifo_edit.php b/app/fifo/fifo_edit.php
index ef1d4cf2a1..164caebe18 100644
--- a/app/fifo/fifo_edit.php
+++ b/app/fifo/fifo_edit.php
@@ -39,9 +39,15 @@
$language = new text;
$text = $language->get();
+//connect to the database
+ $database = database::new();
+
//add the settings object
$settings = new settings(["domain_uuid" => $_SESSION['domain_uuid'], "user_uuid" => $_SESSION['user_uuid']]);
+//setup the event socket connection
+ $event_socket = event_socket::create();
+
//set from session variables
$button_icon_back = $settings->get('theme', 'button_icon_back', '');
$button_icon_copy = $settings->get('theme', 'button_icon_copy', '');
@@ -66,7 +72,11 @@
$fifo_extension = $_POST["fifo_extension"];
$fifo_agent_status = $_POST["fifo_agent_status"];
$fifo_agent_queue = $_POST["fifo_agent_queue"];
+ $fifo_strategy = $_POST["fifo_strategy"];
$fifo_members = $_POST["fifo_members"];
+ $fifo_timeout_seconds = $_POST["fifo_timeout_seconds"];
+ $fifo_exit_key = $_POST["fifo_exit_key"];
+ $fifo_exit_action = $_POST["fifo_exit_action"];
$fifo_music = $_POST["fifo_music"];
$domain_uuid = $_POST["domain_uuid"];
$fifo_order = $_POST["fifo_order"];
@@ -104,20 +114,17 @@
switch ($_POST['action']) {
case 'copy':
if (permission_exists('fifo_add')) {
- $obj = new database;
- $obj->copy($array);
+ $database->copy($array);
}
break;
case 'delete':
if (permission_exists('fifo_delete')) {
- $obj = new database;
- $obj->delete($array);
+ $database->delete($array);
}
break;
case 'toggle':
if (permission_exists('fifo_update')) {
- $obj = new database;
- $obj->toggle($array);
+ $database->toggle($array);
}
break;
}
@@ -129,13 +136,38 @@
}
}
+ //validate the data
+ $fifo_extension = preg_replace('#[^a-zA-Z0-9.\-\*]#', '', $fifo_extension ?? '');
+ $fifo_order = preg_replace('#[^0-9]#', '', $fifo_order ?? '');
+ $fifo_exit_key = preg_replace('#[^0-9]#', '', $fifo_exit_key ?? '');
+ $fifo_timeout_seconds = preg_replace('#[^0-9]#', '', $fifo_timeout_seconds ?? '');
+ $fifo_agent_status = preg_replace('#[^a-zA-Z0-9.\-\*]#', '', $fifo_agent_status ?? '');
+ $fifo_agent_queue = preg_replace('#[^a-zA-Z0-9.\-\*]#', '', $fifo_agent_queue ?? '');
+ if (!empty($fifo_uuid) && !is_uuid($fifo_uuid)) { throw new Exception("invalid uuid"); }
+ if (!empty($dialplan_uuid) && !is_uuid($dialplan_uuid)) { throw new Exception("invalid uuid"); }
+
+ if (is_array($fifo_members)) {
+ $i = 0;
+ foreach ($fifo_members as $row) {
+ $fifo_members[$i]['member_contact'] = preg_replace('#[^a-zA-Z0-9/@.\-\*]#', '', $row["member_contact"] ?? '');
+ $fifo_members[$i]['member_call_timeout'] = preg_replace('#[^0-9]#', '', $row["member_call_timeout"] ?? '20');
+ $fifo_members[$i]['member_wrap_up_time'] = preg_replace('#[^0-9]#', '', $row["member_wrap_up_time"] ?? '10');
+ $fifo_members[$i]['member_enabled'] = $row["member_enabled"] ?? 'false';
+ $i++;
+ }
+ }
+
//check for all required data
$msg = '';
if (strlen($fifo_name) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_name']." \n"; }
if (strlen($fifo_extension) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_extension']." \n"; }
//if (strlen($fifo_agent_status) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_agent_status']." \n"; }
//if (strlen($fifo_agent_queue) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_agent_queue']." \n"; }
+ if (strlen($fifo_strategy) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_strategy']." \n"; }
//if (strlen($fifo_members) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_members']." \n"; }
+ //if (strlen($fifo_timeout_seconds) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_timeout_seconds']." \n"; }
+ //if (strlen($fifo_exit_key) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_exit_key']." \n"; }
+ //if (strlen($fifo_exit_action) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_exit_action']." \n"; }
//if (strlen($fifo_music) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_music']." \n"; }
if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-domain_uuid']." \n"; }
if (strlen($fifo_order) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_order']." \n"; }
@@ -177,52 +209,115 @@
$array['fifo'][0]['fifo_extension'] = $fifo_extension;
$array['fifo'][0]['fifo_agent_status'] = $fifo_agent_status;
$array['fifo'][0]['fifo_agent_queue'] = $fifo_agent_queue;
+ $array['fifo'][0]['fifo_strategy'] = $fifo_strategy;
+ $array['fifo'][0]['fifo_timeout_seconds'] = $fifo_timeout_seconds;
+ $array['fifo'][0]['fifo_exit_key'] = $fifo_exit_key;
+ $array['fifo'][0]['fifo_exit_action'] = $fifo_exit_action;
$array['fifo'][0]['fifo_music'] = $fifo_music;
$array['fifo'][0]['fifo_order'] = $fifo_order;
$array['fifo'][0]['fifo_enabled'] = $fifo_enabled;
$array['fifo'][0]['fifo_description'] = $fifo_description;
- $y = 0;
if (is_array($fifo_members)) {
+ $y = 0;
foreach ($fifo_members as $row) {
if (!empty($row['member_contact']) && strlen($row['member_contact']) > 0) {
$array['fifo'][0]['fifo_members'][$y]['fifo_member_uuid'] = $row["fifo_member_uuid"];
$array['fifo'][0]['fifo_members'][$y]['domain_uuid'] = $_SESSION['domain_uuid'];
$array['fifo'][0]['fifo_members'][$y]['member_contact'] = $row["member_contact"];
- $array['fifo'][0]['fifo_members'][$y]['member_call_timeout'] = $row["member_call_timeout"];
+ $array['fifo'][0]['fifo_members'][$y]['member_call_timeout'] = $row["member_call_timeout"] ?? '20';
//$array['fifo'][0]['fifo_members'][$y]['member_simultaneous'] = $row["member_simultaneous"];
- $array['fifo'][0]['fifo_members'][$y]['member_wrap_up_time'] = $row["member_wrap_up_time"];
+ $array['fifo'][0]['fifo_members'][$y]['member_wrap_up_time'] = $row["member_wrap_up_time"] ?? '10';
$array['fifo'][0]['fifo_members'][$y]['member_enabled'] = $row["member_enabled"] ?? 'false';
$y++;
}
}
}
+ //send commands for agent login or agent logout
+ if (is_array($fifo_members)) {
+ foreach ($fifo_members as $row) {
+ //empty row skip iteration
+ if (empty($row["member_contact"])) {
+ continue;
+ }
+
+ //build the command to add or remove the agent from the FIFO queue
+ if ($row["member_enabled"] == 'true') {
+ $command = "fifo_member add ".$fifo_extension."@".$_SESSION['domain_name']." {fifo_member_wait=nowait}".$row["member_contact"]." 5 ".$row['member_call_timeout']." ".$row['member_wrap_up_time'];
+ }
+ else {
+ $command = "fifo_member del ".$fifo_extension."@".$_SESSION['domain_name']." {fifo_member_wait=nowait}".$row["member_contact"];
+ }
+
+ if ($event_socket->is_connected()) {
+ $response = $event_socket->command('api '.$command);
+ }
+ }
+ }
+
+ //get the action destination number
+ if (!empty($fifo_exit_action)) {
+ $fifo_exit_destination = explode(':', $fifo_exit_action)[1];
+ $fifo_exit_destination = explode(' ', $fifo_exit_destination)[0];
+ }
+
//add the fifo dialplan
if (!empty($fifo_extension)) {
//escape the * symbol
$fifo_agent_status_xml = str_replace("*", "\*", $fifo_agent_status);
$fifo_agent_queue_xml = str_replace("*", "\*", $fifo_agent_queue);
+ //prepare the fifo orbit extension
+ if (!empty($fifo_exit_destination) && $fifo_timeout_seconds == 0) {
+ $fifo_orbit_exten = $fifo_exit_destination;
+ }
+ else {
+ $fifo_orbit_exten = $fifo_exit_destination.":".$fifo_timeout_seconds;
+ }
+
//build the xml dialplan
$dialplan_xml = "\n";
$dialplan_xml .= " \n";
- $dialplan_xml .= " \n";
- $dialplan_xml .= " \n";
+ $dialplan_xml .= " \n";
+ $dialplan_xml .= " \n";
+ if ($fifo_strategy == 'longest_idle_agent') {
+ $dialplan_xml .= " \n";
+ }
+ if ($fifo_strategy == 'simultaneous') {
+ $dialplan_xml .= " \n";
+ }
+ /*
+
+
+
+
+
+ */
+ if (!empty($fifo_exit_key)) {
+ $dialplan_xml .= " \n";
+ $dialplan_xml .= " \n";
+ $dialplan_xml .= " \n";
+ $dialplan_xml .= " \n";
+
+ }
+ if (!empty($fifo_orbit_exten)) {
+ $dialplan_xml .= " \n";
+ }
$dialplan_xml .= " \n";
- $dialplan_xml .= " \n";
+ $dialplan_xml .= " \n";
$dialplan_xml .= " \n";
- $dialplan_xml .= " \n";
- $dialplan_xml .= " \n";
- $dialplan_xml .= " \n";
+ $dialplan_xml .= " \n";
+ $dialplan_xml .= " \n";
+ $dialplan_xml .= " \n";
$dialplan_xml .= " \n";
$dialplan_xml .= " \n";
$dialplan_xml .= " \n";
$dialplan_xml .= " \n";
- $dialplan_xml .= " \n";
- $dialplan_xml .= " \n";
- $dialplan_xml .= " \n";
+ $dialplan_xml .= " \n";
+ $dialplan_xml .= " \n";
+ $dialplan_xml .= " \n";
$dialplan_xml .= " \n";
- $dialplan_xml .= " \n";
+ $dialplan_xml .= " \n";
$dialplan_xml .= " \n";
$dialplan_xml .= " \n";
@@ -247,7 +342,6 @@
$p->add("dialplan_edit", "temp");
//save the data
- $database = new database;
$database->app_name = 'fifo';
$database->app_uuid = '16589224-c876-aeb3-f59f-523a1c0801f7';
$result = $database->save($array);
@@ -296,6 +390,10 @@
$sql .= " fifo_extension, ";
$sql .= " fifo_agent_status, ";
$sql .= " fifo_agent_queue, ";
+ $sql .= " fifo_strategy, ";
+ $sql .= " fifo_timeout_seconds, ";
+ $sql .= " fifo_exit_key, ";
+ $sql .= " fifo_exit_action, ";
$sql .= " fifo_music, ";
$sql .= " domain_uuid, ";
$sql .= " fifo_order, ";
@@ -306,7 +404,6 @@
//$sql .= "and domain_uuid = :domain_uuid ";
//$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$parameters['fifo_uuid'] = $fifo_uuid;
- $database = new database;
$row = $database->select($sql, $parameters, 'row');
if (is_array($row) && @sizeof($row) != 0) {
$dialplan_uuid = $row["dialplan_uuid"];
@@ -314,6 +411,10 @@
$fifo_extension = $row["fifo_extension"];
$fifo_agent_status = $row["fifo_agent_status"];
$fifo_agent_queue = $row["fifo_agent_queue"];
+ $fifo_strategy = $row["fifo_strategy"];
+ $fifo_timeout_seconds = $row["fifo_timeout_seconds"];
+ $fifo_exit_key = $row["fifo_exit_key"];
+ $fifo_exit_action = $row["fifo_exit_action"];
$fifo_music = $row["fifo_music"];
$domain_uuid = $row["domain_uuid"];
$fifo_order = $row["fifo_order"];
@@ -339,7 +440,6 @@
//$sql .= "and domain_uuid = '".$domain_uuid."' ";
//$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$parameters['fifo_uuid'] = $fifo_uuid;
- $database = new database;
$fifo_members = $database->select($sql, $parameters, 'all');
unset ($sql, $parameters);
}
@@ -358,16 +458,28 @@
$fifo_member_uuid = uuid();
}
-//add an empty row
- $x = isset($fifo_members) && is_array($fifo_members) ? sizeof($fifo_members) : 0;
- $fifo_members[$x]['domain_uuid'] = $_SESSION['domain_uuid'];
- $fifo_members[$x]['fifo_uuid'] = $fifo_uuid;
- $fifo_members[$x]['fifo_member_uuid'] = uuid();
- $fifo_members[$x]['member_contact'] = '';
- $fifo_members[$x]['member_call_timeout'] = '';
- //$fifo_members[$x]['member_simultaneous'] = '';
- $fifo_members[$x]['member_wrap_up_time'] = '';
- $fifo_members[$x]['member_enabled'] = '';
+//add an empty row to the members array
+ if (count($fifo_members) == 0) {
+ $rows = $settings->get('fifo', 'option_add_rows', '5');
+ $id = 0;
+ $show_option_delete = false;
+ }
+ if (count($fifo_members) > 0) {
+ $rows = $settings->get('fifo', 'option_edit_rows', '1');
+ $id = count($fifo_members)+1;
+ $show_option_delete = true;
+ }
+ for ($x = 0; $x < $rows; $x++) {
+ $fifo_members[$id]['domain_uuid'] = $_SESSION['domain_uuid'];
+ $fifo_members[$id]['fifo_uuid'] = $fifo_uuid;
+ $fifo_members[$id]['fifo_member_uuid'] = uuid();
+ $fifo_members[$id]['member_contact'] = '';
+ $fifo_members[$id]['member_call_timeout'] = '';
+ //$fifo_members[$id]['member_simultaneous'] = '';
+ $fifo_members[$id]['member_wrap_up_time'] = '';
+ $fifo_members[$id]['member_enabled'] = '';
+ $id++;
+ }
//create token
$object = new token;
@@ -377,11 +489,14 @@
$destination = new destinations;
//set the defaults
+ if (empty($fifo_timeout_seconds)) {
+ $fifo_timeout_seconds = 0;
+ }
if (empty($fifo_order)) {
$fifo_order = 50;
}
- if (!isset($fifo_enabled)) {
- // $fifo_enabled = true;
+ if (empty($fifo_enabled)) {
+ $fifo_enabled = true;
}
//show the header
@@ -422,7 +537,7 @@
echo "\n";
echo "\n";
- echo "\n";
+ echo " \n";
echo " ".$text['label-fifo_name']."\n";
echo " \n";
echo "\n";
@@ -465,6 +580,20 @@
echo " \n";
echo " \n";
+ echo "\n";
+ echo "\n";
+ echo " ".$text['label-strategy']."\n";
+ echo " \n";
+ echo "\n";
+ echo " \n";
+ echo " ".$text['option-longest_idle_agent']." \n";
+ echo " ".$text['option-simultaneous']." \n";
+ echo " \n";
+ echo " \n";
+ echo $text['description-strategy']."\n";
+ echo " \n";
+ echo " \n";
+
echo "\n";
echo "\n";
echo " ".$text['label-fifo_members']."\n";
@@ -477,7 +606,7 @@
//echo " ".$text['label-member_simultaneous']." \n";
echo " ".$text['label-member_wrap_up_time']." \n";
echo " ".$text['label-member_enabled']." \n";
- if (is_array($fifo_members) && @sizeof($fifo_members) > 1 && permission_exists('fifo_member_delete')) {
+ if ($show_option_delete && is_array($fifo_members) && @sizeof($fifo_members) > 1 && permission_exists('fifo_member_delete')) {
echo " \n";
echo " ".$text['label-delete']." \n";
echo " \n";
@@ -523,7 +652,7 @@
echo " \n";
}
echo " \n";
- if (is_array($fifo_members) && @sizeof($fifo_members) > 1 && permission_exists('fifo_member_delete')) {
+ if ($show_option_delete && is_array($fifo_members) && @sizeof($fifo_members) > 1 && permission_exists('fifo_member_delete')) {
if (is_uuid($row['fifo_member_uuid'])) {
echo " \n";
echo " \n";
@@ -543,16 +672,47 @@
echo " \n";
echo " \n";
+ echo "\n";
+ echo "\n";
+ echo " ".$text['label-fifo_timeout_seconds']."\n";
+ echo " \n";
+ echo "\n";
+ echo " \n";
+ echo " \n";
+ echo $text['description-fifo_timeout_seconds']."\n";
+ echo " \n";
+ echo " \n";
+
+ echo "\n";
+ echo "\n";
+ echo " ".$text['label-fifo_exit_key']."\n";
+ echo " \n";
+ echo "\n";
+ echo " \n";
+ echo " \n";
+ echo $text['description-fifo_exit_key']."\n";
+ echo " \n";
+ echo " \n";
+
+ echo "\n";
+ echo "\n";
+ echo " ".$text['label-fifo_exit_action']."\n";
+ echo " \n";
+ echo "\n";
+ $destination = new destinations;
+ echo $destination->select('dialplan', 'fifo_exit_action', $fifo_exit_action);
+ echo " \n";
+ echo $text['description-fifo_exit_action']."\n";
+ echo " \n";
+ echo " \n";
+
echo "\n";
echo "\n";
echo " ".$text['label-fifo_music']."\n";
echo " \n";
echo "\n";
- //echo " \n";
-
$ringbacks = new ringbacks;
echo $ringbacks->select('fifo_music', $fifo_music ?? null);
-
echo " \n";
echo $text['description-fifo_music']."\n";
echo " \n";
diff --git a/app/gateways/gateways.php b/app/gateways/gateways.php
index cd6299c25f..1f0bd727c3 100644
--- a/app/gateways/gateways.php
+++ b/app/gateways/gateways.php
@@ -118,7 +118,7 @@
$show = !empty($_GET["show"]) ? $_GET["show"] : '';
//set from session variables
- $list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
+ $list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//get total gateway count from the database
$sql = "select count(*) from v_gateways where true ";
@@ -278,7 +278,7 @@
echo th_order_by('hostname', $text['label-hostname'], $order_by, $order, null, "class='hide-sm-dn'");
echo th_order_by('enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
echo th_order_by('description', $text['label-description'], $order_by, $order, null, "class='hide-sm-dn'");
- if (permission_exists('gateway_edit') && $list_row_edit_button == 'true') {
+ if (permission_exists('gateway_edit') && $list_row_edit_button) {
echo " \n";
}
echo " \n";
@@ -286,8 +286,12 @@
if (!empty($gateways)) {
$x = 0;
foreach($gateways as $row) {
+ $list_row_url = '';
if (permission_exists('gateway_edit')) {
$list_row_url = "gateway_edit.php?id=".urlencode($row['gateway_uuid']);
+ if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
+ $list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
+ }
}
echo "\n";
if (permission_exists('gateway_add') || permission_exists('gateway_edit') || permission_exists('gateway_delete')) {
@@ -367,9 +371,9 @@
}
echo " \n";
echo " ".escape($row["description"])." \n";
- if (permission_exists('gateway_edit') && $list_row_edit_button == 'true') {
+ if (permission_exists('gateway_edit') && $list_row_edit_button) {
echo " ";
- echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$list_row_edit_button,'link'=>$list_row_url]);
+ echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " \n";
}
echo " \n";
@@ -391,3 +395,4 @@
require_once "resources/footer.php";
?>
+
diff --git a/app/ivr_menus/ivr_menu_edit.php b/app/ivr_menus/ivr_menu_edit.php
index 80f658a42f..b6fd64cf61 100644
--- a/app/ivr_menus/ivr_menu_edit.php
+++ b/app/ivr_menus/ivr_menu_edit.php
@@ -349,7 +349,7 @@
$dialplan_xml = "\n";
$dialplan_xml .= " \n";
$dialplan_xml .= " \n";
- if ($_SESSION['ivr_menu']['answer']['boolean'] == 'true') {
+ if (filter_var($_SESSION['ivr_menu']['answer']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
$dialplan_xml .= " \n";
}
$dialplan_xml .= " \n";
diff --git a/app/ivr_menus/ivr_menus.php b/app/ivr_menus/ivr_menus.php
index 2c4968369d..edb964215d 100644
--- a/app/ivr_menus/ivr_menus.php
+++ b/app/ivr_menus/ivr_menus.php
@@ -94,7 +94,7 @@
$show = $_GET["show"] ?? '';
//set from session variables
- $list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
+ $list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//prepare to page the results
$sql = "select count(*) from v_ivr_menus ";
@@ -228,7 +228,7 @@
echo th_order_by('ivr_menu_extension', $text['label-extension'], $order_by, $order);
echo th_order_by('ivr_menu_enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
echo th_order_by('ivr_menu_description', $text['label-description'], $order_by, $order, null, "class='hide-sm-dn'");
- if (permission_exists('ivr_menu_edit') && $list_row_edit_button == 'true') {
+ if (permission_exists('ivr_menu_edit') && $list_row_edit_button) {
echo " \n";
}
echo "\n";
@@ -236,8 +236,12 @@
if (!empty($ivr_menus)) {
$x = 0;
foreach($ivr_menus as $row) {
+ $list_row_url = '';
if (permission_exists('ivr_menu_edit')) {
$list_row_url = "ivr_menu_edit.php?id=".urlencode($row['ivr_menu_uuid']);
+ if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
+ $list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
+ }
}
echo "\n";
if (permission_exists('ivr_menu_add') || permission_exists('ivr_menu_edit') || permission_exists('ivr_menu_delete')) {
@@ -274,7 +278,7 @@
}
echo " \n";
echo " ".escape($row['ivr_menu_description'])." \n";
- if (permission_exists('ivr_menu_edit') && $list_row_edit_button == 'true') {
+ if (permission_exists('ivr_menu_edit') && $list_row_edit_button) {
echo " ";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " \n";
@@ -298,3 +302,4 @@
require_once "resources/footer.php";
?>
+
diff --git a/app/ivr_menus/waveform.php b/app/ivr_menus/waveform.php
index 3408037311..f51a6a97fc 100644
--- a/app/ivr_menus/waveform.php
+++ b/app/ivr_menus/waveform.php
@@ -96,8 +96,8 @@
Waveform::$colorB = !empty($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) : [0,125,232,0.6]; // array rgba, right (b-leg) wave color
Waveform::$backgroundColor = !empty($_SESSION['theme']['audio_player_waveform_color_background']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_background']['text']) : [0,0,0,0]; // array rgba, default: transparent
Waveform::$axisColor = !empty($_SESSION['theme']['audio_player_waveform_color_axis']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_axis']['text']) : [0,0,0,0.3]; // array rgba
- Waveform::$singlePhase = empty($_SESSION['theme']['audio_player_waveform_single_phase']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] !== 'true' ? false : true; // positive phase only - left (a-leg) top, right (b-leg) bottom
- Waveform::$singleAxis = empty($_SESSION['theme']['audio_player_waveform_single_axis']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] !== 'false' ? true : false; // combine channels into single axis
+ Waveform::$singlePhase = filter_var($_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] ?? false, FILTER_VALIDATE_BOOL); // positive phase only - left (a-leg) top, right (b-leg) bottom
+ Waveform::$singleAxis = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? false, FILTER_VALIDATE_BOOL); // combine channels into single axis
$height = !empty($_SESSION['theme']['audio_player_waveform_height']['text']) && is_numeric(str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text'])) ? 2.2 * (int) str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text']) : null;
$wf = $waveform->getWaveform($temp_filename, 1600, $height ?? 180); // input: png filename returns boolean true/false, or 'base64' returns base64 string
}
diff --git a/app/modules/module_edit.php b/app/modules/module_edit.php
index eb482483b9..296432c1f8 100644
--- a/app/modules/module_edit.php
+++ b/app/modules/module_edit.php
@@ -205,6 +205,7 @@
echo "
\n";
echo "\n";
+ echo "\n";
echo "
\n";
echo "\n";
@@ -297,6 +298,7 @@
echo " \n";
echo "
";
+ echo "
";
echo " ";
if ($action == "update") {
diff --git a/app/modules/modules.php b/app/modules/modules.php
index f2ec07b185..cdc8b56f06 100644
--- a/app/modules/modules.php
+++ b/app/modules/modules.php
@@ -60,7 +60,7 @@
}
//set from session variables
- $list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
+ $list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//process the http post data by action
if ($action != '' && is_array($modules) && @sizeof($modules) != 0) {
@@ -185,7 +185,7 @@
}
echo "".$text['label-enabled']." \n";
echo "".$text['label-description']." \n";
- if (permission_exists('module_edit') && $list_row_edit_button == 'true') {
+ if (permission_exists('module_edit') && $list_row_edit_button) {
echo " \n";
}
echo " \n";
@@ -202,8 +202,12 @@
echo "\n";
write_header($row["module_category"]);
}
+ $list_row_url = '';
if (permission_exists('module_edit')) {
$list_row_url = "module_edit.php?id=".urlencode($row['module_uuid']);
+ if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
+ $list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
+ }
}
echo "\n";
if (permission_exists('module_edit') || permission_exists('module_delete')) {
@@ -257,7 +261,7 @@
}
echo " \n";
echo " ".escape($row["module_description"])." \n";
- if (permission_exists('module_edit') && $list_row_edit_button == 'true') {
+ if (permission_exists('module_edit') && $list_row_edit_button) {
echo " ";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " \n";
@@ -283,3 +287,4 @@
require_once "resources/footer.php";
?>
+
diff --git a/app/music_on_hold/waveform.php b/app/music_on_hold/waveform.php
index ee56d2e5ac..b2bea9c34c 100644
--- a/app/music_on_hold/waveform.php
+++ b/app/music_on_hold/waveform.php
@@ -87,8 +87,8 @@
Waveform::$colorB = !empty($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) : [0,125,232,0.6]; // array rgba, right (b-leg) wave color
Waveform::$backgroundColor = !empty($_SESSION['theme']['audio_player_waveform_color_background']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_background']['text']) : [0,0,0,0]; // array rgba, default: transparent
Waveform::$axisColor = !empty($_SESSION['theme']['audio_player_waveform_color_axis']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_axis']['text']) : [0,0,0,0.3]; // array rgba
- Waveform::$singlePhase = empty($_SESSION['theme']['audio_player_waveform_single_phase']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] !== 'true' ? false : true; // positive phase only - left (a-leg) top, right (b-leg) bottom
- Waveform::$singleAxis = Waveform::$singlePhase === true ? false : (empty($_SESSION['theme']['audio_player_waveform_single_axis']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] !== 'false' ? true : false); // combine channels into single axis
+ Waveform::$singlePhase = filter_var($_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] ?? false, FILTER_VALIDATE_BOOL); // positive phase only - left (a-leg) top, right (b-leg) bottom
+ Waveform::$singleAxis = Waveform::$singlePhase === true ? false : (filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? false, FILTER_VALIDATE_BOOL)); // combine channels into single axis
$height = !empty($_SESSION['theme']['audio_player_waveform_height']['text']) && is_numeric(str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text'])) ? 2.2 * (int) str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text']) : null;
$wf = $waveform->getWaveform($temp_filename, 1600, $height ?? 180); // input: png filename returns boolean true/false, or 'base64' returns base64 string
}
diff --git a/app/number_translations/number_translations.php b/app/number_translations/number_translations.php
index bc02e4fef8..073c1b2c65 100644
--- a/app/number_translations/number_translations.php
+++ b/app/number_translations/number_translations.php
@@ -46,7 +46,7 @@
$search = $_GET["search"] ?? '';
//set from session variables
- $list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
+ $list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//get the http post data
if (!empty($_POST['number_translations'])) {
@@ -217,7 +217,7 @@
echo th_order_by('number_translation_name', $text['label-number_translation_name'], $order_by, $order);
echo th_order_by('number_translation_enabled', $text['label-number_translation_enabled'], $order_by, $order, null, "class='center'");
echo " ".$text['label-number_translation_description']." \n";
- if (permission_exists('number_translation_edit') && $list_row_edit_button == 'true') {
+ if (permission_exists('number_translation_edit') && $list_row_edit_button) {
echo " \n";
}
echo " \n";
@@ -225,8 +225,12 @@
if (!empty($number_translations)) {
$x = 0;
foreach ($number_translations as $row) {
+ $list_row_url = '';
if (permission_exists('number_translation_edit')) {
$list_row_url = "number_translation_edit.php?id=".urlencode($row['number_translation_uuid']);
+ if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
+ $list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
+ }
}
echo "\n";
if (permission_exists('number_translation_add') || permission_exists('number_translation_edit') || permission_exists('number_translation_delete')) {
@@ -254,7 +258,7 @@
}
echo " \n";
echo " ".escape($row['number_translation_description'])." \n";
- if (permission_exists('number_translation_edit') && $list_row_edit_button == 'true') {
+ if (permission_exists('number_translation_edit') && $list_row_edit_button) {
echo " \n";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " \n";
@@ -276,3 +280,4 @@
require_once "resources/footer.php";
?>
+
diff --git a/app/phrases/phrases.php b/app/phrases/phrases.php
index e8b5bd16ab..df01fbf03f 100644
--- a/app/phrases/phrases.php
+++ b/app/phrases/phrases.php
@@ -203,7 +203,7 @@
echo th_order_by('phrase_language', $text['label-language'], $order_by, $order);
echo th_order_by('phrase_enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
echo th_order_by('phrase_description', $text['label-description'], $order_by, $order, null, "class='hide-sm-dn' style='min-width: 40%;'");
- if (permission_exists('phrase_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
+ if (permission_exists('phrase_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " \n";
}
echo " \n";
@@ -211,8 +211,12 @@
if (is_array($phrases) && @sizeof($phrases) != 0) {
$x = 0;
foreach($phrases as $row) {
+ $list_row_url = '';
if (permission_exists('phrase_edit')) {
$list_row_url = "phrase_edit.php?id=".urlencode($row['phrase_uuid']);
+ if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
+ $list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
+ }
}
echo "\n";
if (permission_exists('phrase_add') || permission_exists('phrase_edit') || permission_exists('phrase_delete')) {
@@ -249,7 +253,7 @@
}
echo " \n";
echo " ".escape($row['phrase_description'])." \n";
- if (permission_exists('phrase_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
+ if (permission_exists('phrase_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " ";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " \n";
@@ -273,3 +277,4 @@
require_once "resources/footer.php";
?>
+
diff --git a/app/pin_numbers/pin_numbers.php b/app/pin_numbers/pin_numbers.php
index 1740c631a2..71eae27815 100644
--- a/app/pin_numbers/pin_numbers.php
+++ b/app/pin_numbers/pin_numbers.php
@@ -181,7 +181,7 @@
echo th_order_by('accountcode', $text['label-accountcode'], $order_by, $order);
echo th_order_by('enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
echo th_order_by('description', $text['label-description'], $order_by, $order, null, "class='hide-sm-dn'");
- if (permission_exists('pin_number_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
+ if (permission_exists('pin_number_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " \n";
}
echo " \n";
@@ -189,8 +189,12 @@
if (is_array($pin_numbers) && @sizeof($pin_numbers) != 0) {
$x = 0;
foreach ($pin_numbers as $row) {
+ $list_row_url = '';
if (permission_exists('pin_number_edit')) {
$list_row_url = "pin_number_edit.php?id=".urlencode($row['pin_number_uuid']);
+ if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
+ $list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
+ }
}
echo "\n";
if (permission_exists('pin_number_add') || permission_exists('pin_number_edit') || permission_exists('pin_number_delete')) {
@@ -218,7 +222,7 @@
}
echo " \n";
echo " ".escape($row['description'])." \n";
- if (permission_exists('pin_number_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
+ if (permission_exists('pin_number_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " ";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " \n";
@@ -241,3 +245,4 @@
require_once "resources/footer.php";
?>
+
diff --git a/app/recordings/recordings.php b/app/recordings/recordings.php
index b429120270..0a8f68b13b 100644
--- a/app/recordings/recordings.php
+++ b/app/recordings/recordings.php
@@ -529,8 +529,12 @@
echo " \n";
echo " \n"; // dummy row to maintain alternating background color
}
+ $list_row_url = '';
if (permission_exists('recording_edit')) {
$list_row_url = "recording_edit.php?id=".urlencode($row['recording_uuid']);
+ if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
+ $list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
+ }
}
echo "\n";
if (permission_exists('recording_delete')) {
@@ -710,3 +714,4 @@
}
?>
+
diff --git a/app/recordings/waveform.php b/app/recordings/waveform.php
index 57b8fbef96..a1729c5384 100644
--- a/app/recordings/waveform.php
+++ b/app/recordings/waveform.php
@@ -94,8 +94,8 @@
Waveform::$colorB = !empty($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) : [0,125,232,0.6]; // array rgba, right (b-leg) wave color
Waveform::$backgroundColor = !empty($_SESSION['theme']['audio_player_waveform_color_background']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_background']['text']) : [0,0,0,0]; // array rgba, default: transparent
Waveform::$axisColor = !empty($_SESSION['theme']['audio_player_waveform_color_axis']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_axis']['text']) : [0,0,0,0.3]; // array rgba
- Waveform::$singlePhase = empty($_SESSION['theme']['audio_player_waveform_single_phase']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] !== 'true' ? false : true; // positive phase only - left (a-leg) top, right (b-leg) bottom
- Waveform::$singleAxis = empty($_SESSION['theme']['audio_player_waveform_single_axis']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] !== 'false' ? true : false; // combine channels into single axis
+ Waveform::$singlePhase = filter_var($_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] ?? false, FILTER_VALIDATE_BOOL); // positive phase only - left (a-leg) top, right (b-leg) bottom
+ Waveform::$singleAxis = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? false, FILTER_VALIDATE_BOOL); // combine channels into single axis
$height = !empty($_SESSION['theme']['audio_player_waveform_height']['text']) && is_numeric(str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text'])) ? 2.2 * (int) str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text']) : null;
$wf = $waveform->getWaveform($temp_filename, 1600, $height ?? 180); // input: png filename returns boolean true/false, or 'base64' returns base64 string
}
diff --git a/app/registrations/registrations.php b/app/registrations/registrations.php
index 9c9fafef6e..8840050198 100644
--- a/app/registrations/registrations.php
+++ b/app/registrations/registrations.php
@@ -234,13 +234,13 @@
echo " ".escape($row['ping-time'])." \n";
echo " ".escape($row['sip_profile_name'])." \n";
echo " \n";
- if (!empty($_SESSION['registrations']['list_row_button_unregister']['boolean']) && $_SESSION['registrations']['list_row_button_unregister']['boolean'] == 'true') {
+ if (filter_var($_SESSION['registrations']['list_row_button_unregister']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo button::create(['type'=>'submit','title'=>$text['button-unregister'],'icon'=>'user-slash fa-fw','style'=>'margin-left: 2px; margin-right: 0;','onclick'=>"list_self_check('checkbox_".$x."'); list_action_set('unregister'); list_form_submit('form_list')"]);
}
- if (!empty($_SESSION['registrations']['list_row_button_provision']['boolean']) && $_SESSION['registrations']['list_row_button_provision']['boolean'] == 'true') {
+ if (filter_var($_SESSION['registrations']['list_row_button_provision']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo button::create(['type'=>'submit','title'=>$text['button-provision'],'icon'=>'fax fa-fw','style'=>'margin-left: 2px; margin-right: 0;','onclick'=>"list_self_check('checkbox_".$x."'); list_action_set('provision'); list_form_submit('form_list')"]);
}
- if (!empty($_SESSION['registrations']['list_row_button_reboot']['boolean']) && $_SESSION['registrations']['list_row_button_reboot']['boolean'] == 'true') {
+ if (filter_var($_SESSION['registrations']['list_row_button_reboot']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo button::create(['type'=>'submit','title'=>$text['button-reboot'],'icon'=>'power-off fa-fw','style'=>'margin-left: 2px; margin-right: 0;','onclick'=>"list_self_check('checkbox_".$x."'); list_action_set('reboot'); list_form_submit('form_list')"]);
}
echo " \n";
diff --git a/app/ring_groups/ring_groups.php b/app/ring_groups/ring_groups.php
index 59473180d1..d46f228159 100644
--- a/app/ring_groups/ring_groups.php
+++ b/app/ring_groups/ring_groups.php
@@ -249,7 +249,7 @@
echo th_order_by('ring_group_forward_enabled', $text['label-forwarding'], $order_by, $order);
echo th_order_by('ring_group_enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
echo th_order_by('ring_group_description', $text['header-description'], $order_by, $order, null, "class='hide-sm-dn'");
- if (permission_exists('ring_group_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
+ if (permission_exists('ring_group_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " \n";
}
echo " \n";
@@ -257,8 +257,12 @@
if (is_array($ring_groups) && @sizeof($ring_groups) != 0) {
$x = 0;
foreach ($ring_groups as $row) {
+ $list_row_url = '';
if (permission_exists('ring_group_edit')) {
$list_row_url = "ring_group_edit.php?id=".urlencode($row['ring_group_uuid']);
+ if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
+ $list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
+ }
}
echo "\n";
if (permission_exists('ring_group_add') || permission_exists('ring_group_edit') || permission_exists('ring_group_delete')) {
@@ -291,7 +295,7 @@
}
echo " \n";
echo " ".escape($row['ring_group_description'])." \n";
- if (permission_exists('ring_group_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
+ if (permission_exists('ring_group_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " ";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " \n";
@@ -315,3 +319,4 @@
require_once "resources/footer.php";
?>
+
diff --git a/app/ring_groups/waveform.php b/app/ring_groups/waveform.php
index 3408037311..f51a6a97fc 100644
--- a/app/ring_groups/waveform.php
+++ b/app/ring_groups/waveform.php
@@ -96,8 +96,8 @@
Waveform::$colorB = !empty($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) : [0,125,232,0.6]; // array rgba, right (b-leg) wave color
Waveform::$backgroundColor = !empty($_SESSION['theme']['audio_player_waveform_color_background']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_background']['text']) : [0,0,0,0]; // array rgba, default: transparent
Waveform::$axisColor = !empty($_SESSION['theme']['audio_player_waveform_color_axis']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_axis']['text']) : [0,0,0,0.3]; // array rgba
- Waveform::$singlePhase = empty($_SESSION['theme']['audio_player_waveform_single_phase']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] !== 'true' ? false : true; // positive phase only - left (a-leg) top, right (b-leg) bottom
- Waveform::$singleAxis = empty($_SESSION['theme']['audio_player_waveform_single_axis']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] !== 'false' ? true : false; // combine channels into single axis
+ Waveform::$singlePhase = filter_var($_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] ?? false, FILTER_VALIDATE_BOOL); // positive phase only - left (a-leg) top, right (b-leg) bottom
+ Waveform::$singleAxis = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? false, FILTER_VALIDATE_BOOL); // combine channels into single axis
$height = !empty($_SESSION['theme']['audio_player_waveform_height']['text']) && is_numeric(str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text'])) ? 2.2 * (int) str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text']) : null;
$wf = $waveform->getWaveform($temp_filename, 1600, $height ?? 180); // input: png filename returns boolean true/false, or 'base64' returns base64 string
}
diff --git a/app/sip_profiles/sip_profiles.php b/app/sip_profiles/sip_profiles.php
index a18b92c5e5..565f227eae 100644
--- a/app/sip_profiles/sip_profiles.php
+++ b/app/sip_profiles/sip_profiles.php
@@ -76,7 +76,7 @@
}
//set from session variables
- $list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
+ $list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//get order and order by
if (isset($_GET["order_by"])) {
@@ -180,7 +180,7 @@
echo th_order_by('sip_profile_hostname', $text['label-sip_profile_hostname'], $order_by, $order);
echo th_order_by('sip_profile_enabled', $text['label-sip_profile_enabled'], $order_by, $order, null, "class='center'");
echo th_order_by('sip_profile_description', $text['label-sip_profile_description'], $order_by, $order, null, "class='hide-sm-dn pct-70'");
- if (permission_exists('sip_profile_edit') && $list_row_edit_button == 'true') {
+ if (permission_exists('sip_profile_edit') && $list_row_edit_button) {
echo " \n";
}
echo " \n";
@@ -188,8 +188,12 @@
if (!empty($sip_profiles) && @sizeof($sip_profiles) != 0) {
$x = 0;
foreach ($sip_profiles as $row) {
+ $list_row_url = '';
if (permission_exists('sip_profile_edit')) {
$list_row_url = "sip_profile_edit.php?id=".urlencode($row['sip_profile_uuid']);
+ if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
+ $list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
+ }
}
echo "\n";
if (permission_exists('sip_profile_add') || permission_exists('sip_profile_edit') || permission_exists('sip_profile_delete')) {
@@ -217,7 +221,7 @@
}
echo " \n";
echo " ".escape($row['sip_profile_description'])." \n";
- if (permission_exists('sip_profile_edit') && $list_row_edit_button == 'true') {
+ if (permission_exists('sip_profile_edit') && $list_row_edit_button) {
echo " \n";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " \n";
@@ -239,3 +243,4 @@
require_once "resources/footer.php";
?>
+
diff --git a/app/sofia_global_settings/sofia_global_settings.php b/app/sofia_global_settings/sofia_global_settings.php
index deb31716d5..537b15be04 100644
--- a/app/sofia_global_settings/sofia_global_settings.php
+++ b/app/sofia_global_settings/sofia_global_settings.php
@@ -44,7 +44,7 @@
$search = '';
//set from session variables
- $list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
+ $list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//get the http post data
if (!empty($_POST['sofia_global_settings'])) {
@@ -201,7 +201,7 @@
echo th_order_by('global_setting_value', $text['label-global_setting_value'], $order_by, $order);
echo th_order_by('global_setting_enabled', $text['label-global_setting_enabled'], $order_by, $order, null, "class='center'");
echo " ".$text['label-global_setting_description']." \n";
- if (permission_exists('sofia_global_setting_edit') && $list_row_edit_button == 'true') {
+ if (permission_exists('sofia_global_setting_edit') && $list_row_edit_button) {
echo " \n";
}
echo " \n";
@@ -209,8 +209,12 @@
if (!empty($sofia_global_settings) && @sizeof($sofia_global_settings) != 0) {
$x = 0;
foreach ($sofia_global_settings as $row) {
+ $list_row_url = '';
if (permission_exists('sofia_global_setting_edit')) {
$list_row_url = "sofia_global_setting_edit.php?id=".urlencode($row['sofia_global_setting_uuid']);
+ if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
+ $list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
+ }
}
echo "\n";
if (permission_exists('sofia_global_setting_add') || permission_exists('sofia_global_setting_edit') || permission_exists('sofia_global_setting_delete')) {
@@ -239,7 +243,7 @@
}
echo " \n";
echo " ".escape($row['global_setting_description'])." \n";
- if (permission_exists('sofia_global_setting_edit') && $list_row_edit_button == 'true') {
+ if (permission_exists('sofia_global_setting_edit') && $list_row_edit_button) {
echo " \n";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " \n";
@@ -261,3 +265,4 @@
require_once "resources/footer.php";
?>
+
diff --git a/app/streams/streams.php b/app/streams/streams.php
index 5b872b764a..af41905082 100644
--- a/app/streams/streams.php
+++ b/app/streams/streams.php
@@ -240,7 +240,7 @@
echo " ".$text['label-play']." \n";
echo th_order_by('stream_enabled', $text['label-stream_enabled'], $order_by, $order, null, "class='center'");
echo th_order_by('stream_description', $text['label-stream_description'], $order_by, $order, null, "class='hide-sm-dn'");
- if (permission_exists('stream_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
+ if (permission_exists('stream_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " \n";
}
echo " \n";
@@ -248,8 +248,12 @@
if (!empty($streams)) {
$x = 0;
foreach ($streams as $row) {
+ $list_row_url = '';
if (permission_exists('stream_edit')) {
$list_row_url = "stream_edit.php?id=".urlencode($row['stream_uuid']);
+ if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
+ $list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
+ }
}
echo "\n";
if (permission_exists('stream_add') || permission_exists('stream_edit') || permission_exists('stream_delete')) {
@@ -293,7 +297,7 @@
}
echo " \n";
echo " ".escape($row['stream_description'])." \n";
- if (permission_exists('stream_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
+ if (permission_exists('stream_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " \n";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " \n";
@@ -315,3 +319,4 @@
require_once "resources/footer.php";
?>
+
diff --git a/app/switch/resources/conf/sip_profiles/internal-ipv6.xml.noload b/app/switch/resources/conf/sip_profiles/internal-ipv6.xml.noload
index 2c376ce0d0..f7bf02d931 100644
--- a/app/switch/resources/conf/sip_profiles/internal-ipv6.xml.noload
+++ b/app/switch/resources/conf/sip_profiles/internal-ipv6.xml.noload
@@ -11,6 +11,8 @@
+
+
diff --git a/app/switch/resources/conf/sip_profiles/internal.xml.noload b/app/switch/resources/conf/sip_profiles/internal.xml.noload
index 872de9f47c..951af3f741 100644
--- a/app/switch/resources/conf/sip_profiles/internal.xml.noload
+++ b/app/switch/resources/conf/sip_profiles/internal.xml.noload
@@ -83,6 +83,8 @@
+
+
diff --git a/app/switch/resources/scripts/app/emergency/index.lua b/app/switch/resources/scripts/app/emergency/index.lua
index f3dc40fde8..009e72c2f0 100644
--- a/app/switch/resources/scripts/app/emergency/index.lua
+++ b/app/switch/resources/scripts/app/emergency/index.lua
@@ -94,7 +94,7 @@ local sql = "SELECT * FROM v_email_templates ";
sql = sql .. "WHERE template_category = :category ";
sql = sql .. "AND template_subcategory = :subcategory ";
sql = sql .. "AND template_enabled = :status ";
- local params = {category = 'plugins', subcategory = 'emergency', status = 'true'}
+ local params = {category = 'plugin', subcategory = 'emergency', status = 'true'}
dbh:query(sql, params, function(row)
subject = row.template_subject;
body = row.template_body;
@@ -192,9 +192,10 @@ end);
--set event
if (tonumber(destination_number) == 933) then
event = '933 Emergency Address Validation Service';
-else if (tonumber(destination_number) == 911) then
+elseif (tonumber(destination_number) == 922) then
+ event = '922 Emergency Address Validation Service';
+elseif (tonumber(destination_number) == 911) then
event = '911 Emergency Call';
- end
end
--connect to the database
@@ -261,4 +262,3 @@ end
dbh:query(sql, params);
dbh:release();
-
diff --git a/app/switch/resources/scripts/app/voicemail/resources/functions/send_email.lua b/app/switch/resources/scripts/app/voicemail/resources/functions/send_email.lua
index eaaa53dbb2..05ed42cb48 100644
--- a/app/switch/resources/scripts/app/voicemail/resources/functions/send_email.lua
+++ b/app/switch/resources/scripts/app/voicemail/resources/functions/send_email.lua
@@ -25,364 +25,361 @@
-- POSSIBILITY OF SUCH DAMAGE.
--load libraries
- local send_mail = require 'resources.functions.send_mail'
- local Database = require "resources.functions.database"
- local Settings = require "resources.functions.lazy_settings"
+local send_mail = require 'resources.functions.send_mail'
+local Database = require "resources.functions.database"
+local Settings = require "resources.functions.lazy_settings"
--define a function to send email
- function send_email(id, uuid)
+function send_email(id, uuid)
+ --prepare the database, settings and variables
local db = dbh or Database.new('system');
local settings = Settings.new(db, domain_name, domain_uuid);
local http_protocol = settings:get('domain', 'http_protocol', 'text') or "https";
local email_queue_enabled = "true";
- --get voicemail message details
- local sql = [[SELECT * FROM v_voicemails
- WHERE domain_uuid = :domain_uuid
- AND voicemail_id = :voicemail_id]]
- local params = {domain_uuid = domain_uuid, voicemail_id = id};
- if (debug["sql"]) then
- freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
- end
- dbh:query(sql, params, function(row)
- db_voicemail_uuid = string.lower(row["voicemail_uuid"]);
- --voicemail_password = row["voicemail_password"];
- --greeting_id = row["greeting_id"];
- voicemail_mail_to = row["voicemail_mail_to"];
- voicemail_transcription_enabled = row["voicemail_transcription_enabled"];
- voicemail_file = row["voicemail_file"];
- voicemail_local_after_email = row["voicemail_local_after_email"];
- voicemail_local_after_forward = row["voicemail_local_after_forward"];
- voicemail_description = row["voicemail_description"];
- end);
+ --get voicemail message details
+ local sql = [[SELECT * FROM v_voicemails
+ WHERE domain_uuid = :domain_uuid
+ AND voicemail_id = :voicemail_id]]
+ local params = {domain_uuid = domain_uuid, voicemail_id = id};
+ if (debug["sql"]) then
+ freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
+ end
+ dbh:query(sql, params, function(row)
+ db_voicemail_uuid = string.lower(row["voicemail_uuid"]);
+ --voicemail_password = row["voicemail_password"];
+ --greeting_id = row["greeting_id"];
+ voicemail_mail_to = row["voicemail_mail_to"];
+ voicemail_transcription_enabled = row["voicemail_transcription_enabled"];
+ voicemail_file = row["voicemail_file"];
+ voicemail_local_after_email = row["voicemail_local_after_email"];
+ voicemail_description = row["voicemail_description"];
+ end);
- --set default values
- if (voicemail_file == nil) then
- voicemail_file = "listen";
- end
- if (voicemail_local_after_email == nil) then
- voicemail_local_after_email = "true";
- end
- if (voicemail_local_after_forward == nil) then
- voicemail_local_after_forward = "true";
- end
+ --set default values
+ if (voicemail_file == nil or voicemail_file == '') then
+ voicemail_file = "listen";
+ end
+ if (voicemail_local_after_email == nil or voicemail_local_after_email == '') then
+ voicemail_local_after_email = "true";
+ end
- --require the email address to send the email
- if (string.len(voicemail_mail_to) > 2) then
- --include languages file
- local Text = require "resources.functions.text"
- local text = Text.new("app.voicemail.app_languages")
- local dbh = dbh
+ --require the email address to send the email
+ if (string.len(voicemail_mail_to) > 2) then
+ --include languages file
+ local Text = require "resources.functions.text"
+ local text = Text.new("app.voicemail.app_languages")
+ local dbh = dbh
- --user setting time zone, if set
- local sql = [[
- select
- us.user_setting_value as time_zone
- from
- v_user_settings as us,
- v_extension_users as eu,
- v_extensions as e,
- v_voicemails as v
- where
- v.voicemail_id = :voicemail_id and
- v.domain_uuid = :domain_uuid and
- v.voicemail_id = e.extension and
- e.domain_uuid = :domain_uuid and
- e.extension_uuid = eu.extension_uuid and
- eu.domain_uuid = :domain_uuid and
- eu.user_uuid = us.user_uuid and
- us.domain_uuid = :domain_uuid and
- us.user_setting_category = 'domain' and
- us.user_setting_subcategory = 'time_zone' and
- us.user_setting_name = 'name' and
- us.user_setting_enabled = 'true'
- order by
- eu.insert_date asc
- limit 1
- ]]
- local params = {domain_uuid = domain_uuid, voicemail_id = id};
- if (debug["sql"]) then
- freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
- end
- dbh:query(sql, params, function(row)
- time_zone = row["time_zone"];
- end);
+ --user setting time zone, if set
+ local sql = [[
+ select
+ us.user_setting_value as time_zone
+ from
+ v_user_settings as us,
+ v_extension_users as eu,
+ v_extensions as e,
+ v_voicemails as v
+ where
+ v.voicemail_id = :voicemail_id and
+ v.domain_uuid = :domain_uuid and
+ v.voicemail_id = e.extension and
+ e.domain_uuid = :domain_uuid and
+ e.extension_uuid = eu.extension_uuid and
+ eu.domain_uuid = :domain_uuid and
+ eu.user_uuid = us.user_uuid and
+ us.domain_uuid = :domain_uuid and
+ us.user_setting_category = 'domain' and
+ us.user_setting_subcategory = 'time_zone' and
+ us.user_setting_name = 'name' and
+ us.user_setting_enabled = 'true'
+ order by
+ eu.insert_date asc
+ limit 1
+ ]]
+ local params = {domain_uuid = domain_uuid, voicemail_id = id};
+ if (debug["sql"]) then
+ freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
+ end
+ dbh:query(sql, params, function(row)
+ time_zone = row["time_zone"];
+ end);
- --default/domain setting time zone
- if (time_zone == nil or time_zone == '') then
- time_zone = settings:get('domain', 'time_zone', 'name');
- end
-
- --default time zone
- if (time_zone == nil or time_zone == '') then
- time_zone = 'UTC';
- end
-
- --connect using other backend if needed
- if storage_type == "base64" then
- dbh = Database.new('system', 'base64/read')
- end
-
- --get voicemail message details
- local sql = [[SELECT to_char(timezone(:time_zone, to_timestamp(created_epoch)), 'Day DD Mon YYYY HH:MI:SS PM') as message_date, *
- FROM v_voicemail_messages
- WHERE domain_uuid = :domain_uuid
- AND voicemail_message_uuid = :uuid]]
- local params = {domain_uuid = domain_uuid, uuid = uuid, time_zone = time_zone};
- if (debug["sql"]) then
- freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
- end
- dbh:query(sql, params, function(row)
- --get the values from the database
- --uuid = row["voicemail_message_uuid"];
- created_epoch = row["created_epoch"];
- caller_id_name = row["caller_id_name"];
- caller_id_number = row["caller_id_number"];
- message_date = row["message_date"];
- message_length = row["message_length"];
- --message_status = row["message_status"];
- --message_priority = row["message_priority"];
- --get the recordings from the database
- if (storage_type == "base64") then
- --set the voicemail intro and message paths
- message_location = voicemail_dir.."/"..id.."/msg_"..uuid.."."..vm_message_ext;
- intro_location = voicemail_dir.."/"..id.."/intro_"..uuid.."."..vm_message_ext;
-
- --save the recordings to the file system
- if (string.len(row["message_base64"]) > 32) then
- --save the value to a variable
- voicemail_base64 = row["message_base64"];
-
- --include the file io
- local file = require "resources.functions.file"
-
- --write decoded message string to file
- file.write_base64(message_location, row["message_base64"]);
-
- --write decoded intro string to file, if any
- if (string.len(row["message_intro_base64"]) > 32) then
- file.write_base64(intro_location, row["message_intro_base64"]);
- end
- end
- end
- end);
-
- --close temporary connection
- if storage_type == "base64" then
- dbh:release()
- end
-
- --format the message length and date
- message_length_formatted = format_seconds(message_length);
- if (debug["info"]) then
- freeswitch.consoleLog("notice", "[voicemail] message date: " .. message_date .. "\n");
- freeswitch.consoleLog("notice", "[voicemail] message length: " .. message_length .. "\n");
- end
- --local message_date = os.date("%A, %d %b %Y %I:%M %p", created_epoch);
-
- --connect to the database
- local dbh = Database.new('system');
-
- --get the templates
- local sql = "SELECT * FROM v_email_templates ";
- sql = sql .. "WHERE (domain_uuid = :domain_uuid or domain_uuid is null) ";
- sql = sql .. "AND template_language = :template_language ";
- sql = sql .. "AND template_category = 'voicemail' "
- if (voicemail_transcription_enabled == 'true') then
- sql = sql .. "AND template_subcategory = 'transcription' "
- else
- sql = sql .. "AND template_subcategory = 'default' "
- end
- sql = sql .. "AND template_enabled = 'true' "
- sql = sql .. "ORDER BY domain_uuid DESC "
- local params = {domain_uuid = domain_uuid, template_language = default_language.."-"..default_dialect};
- if (debug["sql"]) then
- freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
- end
- dbh:query(sql, params, function(row)
- subject = row["template_subject"];
- body = row["template_body"];
- end);
-
- --get the link_address
- link_address = http_protocol.."://"..domain_name..project_path;
-
- --set proper delete status
- local local_after_email = '';
- if (voicemail_local_after_email == "false" or voicemail_local_after_forward == "false") then
- local_after_email = "false";
- else
- local_after_email = "true";
- end
-
- --prepare the headers
- local headers = {
- ["X-FusionPBX-Domain-UUID"] = domain_uuid;
- ["X-FusionPBX-Domain-Name"] = domain_name;
- ["X-FusionPBX-Call-UUID"] = uuid;
- ["X-FusionPBX-Email-Type"] = 'voicemail';
- ["X-FusionPBX-local_after_email"] = local_after_email;
- }
-
- --prepare the voicemail_name_formatted
- voicemail_name_formatted = id;
- local display_domain_name = settings:get('voicemail', 'display_domain_name', 'boolean');
-
- if (display_domain_name == 'true') then
- voicemail_name_formatted = id.."@"..domain_name;
- end
- if (voicemail_description ~= nil and voicemail_description ~= "" and voicemail_description ~= id) then
- voicemail_name_formatted = voicemail_name_formatted.." ("..voicemail_description..")";
- end
-
- --prepare file
- file = voicemail_dir.."/"..id.."/msg_"..uuid.."."..vm_message_ext;
-
- --combine intro, if exists, with message for emailing (only)
- intro = voicemail_dir.."/"..id.."/intro_"..uuid.."."..vm_message_ext;
- combined = voicemail_dir.."/"..id.."/intro_msg_"..uuid.."."..vm_message_ext;
- if (file_exists(intro) and file_exists(file)) then
- os.execute("sox "..intro.." "..file.." "..combined);
- end
-
- --prepare the subject
- if (subject ~= nil) then
- subject = subject:gsub("${caller_id_name}", caller_id_name);
- subject = subject:gsub("${caller_id_number}", caller_id_number);
- subject = subject:gsub("${message_date}", message_date);
- subject = subject:gsub("${message_duration}", message_length_formatted);
- subject = subject:gsub("${account}", voicemail_name_formatted);
- subject = subject:gsub("${voicemail_id}", id);
- subject = subject:gsub("${voicemail_description}", voicemail_description);
- subject = subject:gsub("${voicemail_name_formatted}", voicemail_name_formatted);
- subject = subject:gsub("${domain_name}", domain_name);
- subject = subject:gsub("${new_messages}", new_messages);
- subject = trim(subject);
- else
- subject = text['label-voicemail'] .. ' ' .. caller_id_name .. ' <' .. caller_id_number .. '> ' .. message_length_formatted;
- end
- subject = '=?utf-8?B?'..base64.encode(subject)..'?=';
-
- --prepare the body
- if (body ~= nil) then
- body = body:gsub("${caller_id_name}", caller_id_name);
- body = body:gsub("${caller_id_number}", caller_id_number);
- body = body:gsub("${message_date}", message_date);
- if (transcription ~= nil) then
- transcription = transcription:gsub("%%", "*");
- body = body:gsub("${message_text}", transcription);
- end
- body = body:gsub("${message_duration}", message_length_formatted);
- body = body:gsub("${account}", voicemail_name_formatted);
- body = body:gsub("${voicemail_id}", id);
- body = body:gsub("${voicemail_description}", voicemail_description);
- body = body:gsub("${voicemail_name_formatted}", voicemail_name_formatted);
- body = body:gsub("${domain_name}", domain_name);
- body = body:gsub("${sip_to_user}", id);
- if (origination_callee_id_name ~= nil) then
- body = body:gsub("${origination_callee_id_name}", origination_callee_id_name);
- end
- body = body:gsub("${dialed_user}", id);
- if (voicemail_file == "attach" and file) then
- body = body:gsub("${message}", text['label-attached']);
- elseif (voicemail_file == "link") then
- body = body:gsub("${message}", ""..text['label-download'].." ");
- else
- body = body:gsub("${message}", ""..text['label-listen'].." ");
- end
- --body = body:gsub(" ", " ");
- --body = body:gsub("%s+", "");
- --body = body:gsub(" ", " ");
- body = trim(body);
- else
- body = '';
- if (caller_id_name ~= nil and caller_id_name ~= caller_id_number) then
- body = body .. caller_id_name .. ' ';
- end
- body = body .. caller_id_number .. ' ';
- body = body .. message_date .. ' ';
- if (voicemail_file == "attach" and file) then
- body = body .. ' ' .. text['label-attached'];
- elseif (voicemail_file == "link") then
- body = body .. ""..text['label-download'].." ";
- else
- body = body .. ""..text['label-listen'].." ";
- end
- body = body .. '';
- end
-
- --get the smtp from address and name
- smtp_from = settings:get('voicemail', 'smtp_from', 'text');
- smtp_from_name = settings:get('voicemail', 'smtp_from_name', 'text');
- if (smtp_from == nil or smtp_from == '') then
- smtp_from = settings:get('email', 'smtp_from', 'text');
- end
- if (smtp_from_name == nil or smtp_from_name == '') then
- smtp_from_name = settings:get('email', 'smtp_from_name', 'text');
- end
- if (smtp_from_name and string.len(smtp_from_name) > 0 and smtp_from and string.len(smtp_from) > 2) then
- smtp_from = smtp_from_name.."<"..smtp_from..">";
- end
-
- --send the email with, or without, including the intro
- if (file_exists(combined)) then
- voicemail_path = combined
- else
- voicemail_path = file
- end
-
- --send the email
- send_mail(headers,
- smtp_from,
- voicemail_mail_to,
- {subject, body},
- (voicemail_file == "attach") and voicemail_path,
- voicemail_base64
- );
-
- end
-
- --whether to keep the voicemail message and details local after email
- if (string.len(voicemail_mail_to) > 2 and email_queue_enabled == 'false') then
- if (voicemail_local_after_email == "false" and voicemail_local_after_forward == "false") then
- --delete the voicemail message details
- local sql = [[DELETE FROM v_voicemail_messages
- WHERE domain_uuid = :domain_uuid
- AND voicemail_uuid = :voicemail_uuid
- AND voicemail_message_uuid = :uuid]]
- local params = {domain_uuid = domain_uuid,
- voicemail_uuid = db_voicemail_uuid, uuid = uuid};
- if (debug["sql"]) then
- freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
- end
- dbh:query(sql, params);
- --delete voicemail recording files
- if (file_exists(file)) then
- os.remove(file);
- end
- if (file_exists(intro)) then
- os.remove(intro);
- end
- if (file_exists(combined)) then
- os.remove(combined);
- end
- --set message waiting indicator
- message_waiting(id, domain_uuid);
- --clear the variable
- db_voicemail_uuid = '';
- elseif (storage_type == "base64") then
- --delete voicemail recording files
- if (file_exists(file)) then
- os.remove(file);
- end
- if (file_exists(intro)) then
- os.remove(intro);
- end
- if (file_exists(combined)) then
- os.remove(combined);
- end
+ --default/domain setting time zone
+ if (time_zone == nil or time_zone == '') then
+ time_zone = settings:get('domain', 'time_zone', 'name');
end
+ --default time zone
+ if (time_zone == nil or time_zone == '') then
+ time_zone = 'UTC';
+ end
+
+ --connect using other backend if needed
+ if storage_type == "base64" then
+ dbh = Database.new('system', 'base64/read')
+ end
+
+ --get voicemail message details
+ local sql = [[SELECT to_char(timezone(:time_zone, to_timestamp(created_epoch)), 'Day DD Mon YYYY HH:MI:SS PM') as message_date, *
+ FROM v_voicemail_messages
+ WHERE domain_uuid = :domain_uuid
+ AND voicemail_message_uuid = :uuid]]
+ local params = {domain_uuid = domain_uuid, uuid = uuid, time_zone = time_zone};
+ if (debug["sql"]) then
+ freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
+ end
+ dbh:query(sql, params, function(row)
+ --get the values from the database
+ --uuid = row["voicemail_message_uuid"];
+ created_epoch = row["created_epoch"];
+ caller_id_name = row["caller_id_name"];
+ caller_id_number = row["caller_id_number"];
+ message_date = row["message_date"];
+ message_length = row["message_length"];
+ --message_status = row["message_status"];
+ --message_priority = row["message_priority"];
+ --get the recordings from the database
+ if (storage_type == "base64") then
+ --set the voicemail intro and message paths
+ message_location = voicemail_dir.."/"..id.."/msg_"..uuid.."."..vm_message_ext;
+ intro_location = voicemail_dir.."/"..id.."/intro_"..uuid.."."..vm_message_ext;
+
+ --save the recordings to the file system
+ if (string.len(row["message_base64"]) > 32) then
+ --save the value to a variable
+ voicemail_base64 = row["message_base64"];
+
+ --include the file io
+ local file = require "resources.functions.file"
+
+ --write decoded message string to file
+ file.write_base64(message_location, row["message_base64"]);
+
+ --write decoded intro string to file, if any
+ if (string.len(row["message_intro_base64"]) > 32) then
+ file.write_base64(intro_location, row["message_intro_base64"]);
+ end
+ end
+ end
+ end);
+
+ --close temporary connection
+ if storage_type == "base64" then
+ dbh:release()
+ end
+
+ --format the message length and date
+ message_length_formatted = format_seconds(message_length);
+ if (debug["info"]) then
+ freeswitch.consoleLog("notice", "[voicemail] message date: " .. message_date .. "\n");
+ freeswitch.consoleLog("notice", "[voicemail] message length: " .. message_length .. "\n");
+ end
+ --local message_date = os.date("%A, %d %b %Y %I:%M %p", created_epoch);
+
+ --connect to the database
+ local dbh = Database.new('system');
+
+ --get the templates
+ local sql = "SELECT * FROM v_email_templates ";
+ sql = sql .. "WHERE (domain_uuid = :domain_uuid or domain_uuid is null) ";
+ sql = sql .. "AND template_language = :template_language ";
+ sql = sql .. "AND template_category = 'voicemail' "
+ if (voicemail_transcription_enabled == 'true') then
+ sql = sql .. "AND template_subcategory = 'transcription' "
+ else
+ sql = sql .. "AND template_subcategory = 'default' "
+ end
+ sql = sql .. "AND template_enabled = 'true' "
+ sql = sql .. "ORDER BY domain_uuid DESC "
+ local params = {domain_uuid = domain_uuid, template_language = default_language.."-"..default_dialect};
+ if (debug["sql"]) then
+ freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
+ end
+ dbh:query(sql, params, function(row)
+ subject = row["template_subject"];
+ body = row["template_body"];
+ end);
+
+ --get the link_address
+ link_address = http_protocol.."://"..domain_name..project_path;
+
+ --set proper delete status
+ local local_after_email = '';
+ if (voicemail_local_after_email == "false") then
+ local_after_email = "false";
+ else
+ local_after_email = "true";
+ end
+
+ --prepare the headers
+ local headers = {
+ ["X-FusionPBX-Domain-UUID"] = domain_uuid;
+ ["X-FusionPBX-Domain-Name"] = domain_name;
+ ["X-FusionPBX-Call-UUID"] = uuid;
+ ["X-FusionPBX-Email-Type"] = 'voicemail';
+ ["X-FusionPBX-local_after_email"] = local_after_email;
+ }
+
+ --prepare the voicemail_name_formatted
+ voicemail_name_formatted = id;
+ local display_domain_name = settings:get('voicemail', 'display_domain_name', 'boolean');
+
+ if (display_domain_name == 'true') then
+ voicemail_name_formatted = id.."@"..domain_name;
+ end
+ if (voicemail_description ~= nil and voicemail_description ~= "" and voicemail_description ~= id) then
+ voicemail_name_formatted = voicemail_name_formatted.." ("..voicemail_description..")";
+ end
+
+ --prepare file
+ file = voicemail_dir.."/"..id.."/msg_"..uuid.."."..vm_message_ext;
+
+ --combine intro, if exists, with message for emailing (only)
+ intro = voicemail_dir.."/"..id.."/intro_"..uuid.."."..vm_message_ext;
+ combined = voicemail_dir.."/"..id.."/intro_msg_"..uuid.."."..vm_message_ext;
+ if (file_exists(intro) and file_exists(file)) then
+ os.execute("sox "..intro.." "..file.." "..combined);
+ end
+
+ --prepare the subject
+ if (subject ~= nil) then
+ subject = subject:gsub("${caller_id_name}", caller_id_name);
+ subject = subject:gsub("${caller_id_number}", caller_id_number);
+ subject = subject:gsub("${message_date}", message_date);
+ subject = subject:gsub("${message_duration}", message_length_formatted);
+ subject = subject:gsub("${account}", voicemail_name_formatted);
+ subject = subject:gsub("${voicemail_id}", id);
+ subject = subject:gsub("${voicemail_description}", voicemail_description);
+ subject = subject:gsub("${voicemail_name_formatted}", voicemail_name_formatted);
+ subject = subject:gsub("${domain_name}", domain_name);
+ subject = subject:gsub("${new_messages}", new_messages);
+ subject = trim(subject);
+ else
+ subject = text['label-voicemail'] .. ' ' .. caller_id_name .. ' <' .. caller_id_number .. '> ' .. message_length_formatted;
+ end
+ subject = '=?utf-8?B?'..base64.encode(subject)..'?=';
+
+ --prepare the body
+ if (body ~= nil) then
+ body = body:gsub("${caller_id_name}", caller_id_name);
+ body = body:gsub("${caller_id_number}", caller_id_number);
+ body = body:gsub("${message_date}", message_date);
+ if (transcription ~= nil) then
+ transcription = transcription:gsub("%%", "*");
+ body = body:gsub("${message_text}", transcription);
+ end
+ body = body:gsub("${message_duration}", message_length_formatted);
+ body = body:gsub("${account}", voicemail_name_formatted);
+ body = body:gsub("${voicemail_id}", id);
+ body = body:gsub("${voicemail_description}", voicemail_description);
+ body = body:gsub("${voicemail_name_formatted}", voicemail_name_formatted);
+ body = body:gsub("${domain_name}", domain_name);
+ body = body:gsub("${sip_to_user}", id);
+ if (origination_callee_id_name ~= nil) then
+ body = body:gsub("${origination_callee_id_name}", origination_callee_id_name);
+ end
+ body = body:gsub("${dialed_user}", id);
+ if (voicemail_file == "attach" and file) then
+ body = body:gsub("${message}", text['label-attached']);
+ elseif (voicemail_file == "link") then
+ body = body:gsub("${message}", ""..text['label-download'].." ");
+ else
+ body = body:gsub("${message}", ""..text['label-listen'].." ");
+ end
+ --body = body:gsub(" ", " ");
+ --body = body:gsub("%s+", "");
+ --body = body:gsub(" ", " ");
+ body = trim(body);
+ else
+ body = '';
+ if (caller_id_name ~= nil and caller_id_name ~= caller_id_number) then
+ body = body .. caller_id_name .. ' ';
+ end
+ body = body .. caller_id_number .. ' ';
+ body = body .. message_date .. ' ';
+ if (voicemail_file == "attach" and file) then
+ body = body .. ' ' .. text['label-attached'];
+ elseif (voicemail_file == "link") then
+ body = body .. ""..text['label-download'].." ";
+ else
+ body = body .. ""..text['label-listen'].." ";
+ end
+ body = body .. '';
+ end
+
+ --get the smtp from address and name
+ smtp_from = settings:get('voicemail', 'smtp_from', 'text');
+ smtp_from_name = settings:get('voicemail', 'smtp_from_name', 'text');
+ if (smtp_from == nil or smtp_from == '') then
+ smtp_from = settings:get('email', 'smtp_from', 'text');
+ end
+ if (smtp_from_name == nil or smtp_from_name == '') then
+ smtp_from_name = settings:get('email', 'smtp_from_name', 'text');
+ end
+ if (smtp_from_name and string.len(smtp_from_name) > 0 and smtp_from and string.len(smtp_from) > 2) then
+ smtp_from = smtp_from_name.."<"..smtp_from..">";
+ end
+
+ --send the email with, or without, including the intro
+ if (file_exists(combined)) then
+ voicemail_path = combined
+ else
+ voicemail_path = file
+ end
+
+ --send the email
+ send_mail(headers,
+ smtp_from,
+ voicemail_mail_to,
+ {subject, body},
+ (voicemail_file == "attach") and voicemail_path,
+ voicemail_base64
+ );
+
+ end
+
+ --whether to keep the voicemail message and details local after email
+ if (string.len(voicemail_mail_to) > 2 and email_queue_enabled == 'false') then
+ if (voicemail_local_after_email == "false") then
+ --delete the voicemail message details
+ local sql = [[DELETE FROM v_voicemail_messages
+ WHERE domain_uuid = :domain_uuid
+ AND voicemail_uuid = :voicemail_uuid
+ AND voicemail_message_uuid = :uuid]]
+ local params = {domain_uuid = domain_uuid,
+ voicemail_uuid = db_voicemail_uuid, uuid = uuid};
+ if (debug["sql"]) then
+ freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
+ end
+ dbh:query(sql, params);
+ --delete voicemail recording files
+ if (file_exists(file)) then
+ os.remove(file);
+ end
+ if (file_exists(intro)) then
+ os.remove(intro);
+ end
+ if (file_exists(combined)) then
+ os.remove(combined);
+ end
+ --set message waiting indicator
+ message_waiting(id, domain_uuid);
+ --clear the variable
+ db_voicemail_uuid = '';
+ elseif (storage_type == "base64") then
+ --delete voicemail recording files
+ if (file_exists(file)) then
+ os.remove(file);
+ end
+ if (file_exists(intro)) then
+ os.remove(intro);
+ end
+ if (file_exists(combined)) then
+ os.remove(combined);
+ end
end
- end
+ end
+
+end
diff --git a/app/system/resources/dashboard/system_counts.php b/app/system/resources/dashboard/system_counts.php
index 323e71dedb..c143d18433 100644
--- a/app/system/resources/dashboard/system_counts.php
+++ b/app/system/resources/dashboard/system_counts.php
@@ -260,8 +260,8 @@
//get the domain active and inactive counts
$sql = "select ";
- $sql .= "(select count(*) from v_domains where domain_enabled = 'true') as active, ";
- $sql .= "(select count(*) from v_domains where domain_enabled = 'false') as inactive; ";
+ $sql .= "(select count(domain_uuid) from v_domains where domain_enabled = 'true') as active, ";
+ $sql .= "(select count(domain_uuid) from v_domains where domain_enabled = 'false') as inactive; ";
$row = $database->select($sql, null, 'row');
$domain_active = $row['active'];
$domain_inactive = $row['inactive'];
diff --git a/app/system/system.php b/app/system/system.php
index 38b14c0e69..ce51b6b116 100644
--- a/app/system/system.php
+++ b/app/system/system.php
@@ -49,9 +49,9 @@
if (permission_exists("system_view_support")) {
$setting_size = !empty($_SESSION["editor"]["font_size"]["text"]) ? $_SESSION["editor"]["font_size"]["text"] : '12px';
$setting_theme = !empty($_SESSION["editor"]["theme"]["text"]) ? $_SESSION["editor"]["theme"]["text"] : 'cobalt';
- $setting_invisibles = !empty($_SESSION["editor"]["invisibles"]["boolean"]) ? $_SESSION["editor"]["invisibles"]["boolean"] : 'false';
- $setting_indenting = !empty($_SESSION["editor"]["indent_guides"]["boolean"]) ? $_SESSION["editor"]["indent_guides"]["boolean"] : 'false';
- $setting_numbering = !empty($_SESSION["editor"]["line_numbers"]["boolean"]) ? $_SESSION["editor"]["line_numbers"]["boolean"] : 'true';
+ $setting_invisibles = isset($_SESSION['editor']['invisibles']['text']) ? $_SESSION['editor']['invisibles']["text"] : 'false';
+ $setting_indenting = isset($_SESSION['editor']['indent_guides']['text']) ? $_SESSION['editor']['indent_guides']["text"]: 'false';
+ $setting_numbering = isset($_SESSION['editor']['line_numbers']['text']) ? $_SESSION['editor']['line_numbers']["text"] : 'true';
}
//additional includes
diff --git a/app/time_conditions/time_conditions.php b/app/time_conditions/time_conditions.php
index 63c826305e..23eb0b57ee 100644
--- a/app/time_conditions/time_conditions.php
+++ b/app/time_conditions/time_conditions.php
@@ -210,7 +210,7 @@
echo th_order_by('dialplan_order', $text['label-order'], $order_by, $order, null, "class='center'", ($search != '' ? "search=".$search : null));
echo th_order_by('dialplan_enabled', $text['label-enabled'], $order_by, $order, null, "class='center'", ($search != '' ? "search=".$search : null));
echo th_order_by('dialplan_description', $text['label-description'], $order_by, $order, null, "class='hide-sm-dn'", ($search != '' ? "search=".$search : null));
- if (permission_exists('time_condition_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
+ if (permission_exists('time_condition_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " \n";
}
echo " \n";
@@ -218,8 +218,12 @@
if (is_array($dialplans) && @sizeof($dialplans) != 0) {
$x = 0;
foreach ($dialplans as $row) {
+ $list_row_url = '';
if (permission_exists('time_condition_edit')) {
$list_row_url = "time_condition_edit.php?id=".urlencode($row['dialplan_uuid']);
+ if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
+ $list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
+ }
}
echo "\n";
if (permission_exists('time_condition_add') || permission_exists('time_condition_edit') || permission_exists('time_condition_delete')) {
@@ -260,7 +264,7 @@
}
echo " \n";
echo " ".$row['dialplan_description']." \n";
- if (permission_exists('time_condition_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
+ if (permission_exists('time_condition_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " \n";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " \n";
@@ -282,3 +286,4 @@
require_once "resources/footer.php";
?>
+
diff --git a/app/vars/vars.php b/app/vars/vars.php
index d954ff394d..cc97607fa8 100644
--- a/app/vars/vars.php
+++ b/app/vars/vars.php
@@ -85,7 +85,7 @@
$order = $_GET["order"] ?? '';
//set from session variables
- $list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
+ $list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//get the count
$sql = "select count(var_uuid) from v_vars ";
@@ -207,7 +207,7 @@
echo th_order_by('var_hostname', $text['label-hostname'], $order_by, $order, null, "class='hide-sm-dn'");
echo th_order_by('var_enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
echo "".$text['label-description']." \n";
- if (permission_exists('var_edit') && $list_row_edit_button == 'true') {
+ if (permission_exists('var_edit') && $list_row_edit_button) {
echo " \n";
}
echo " \n";
@@ -224,8 +224,12 @@
echo "\n";
write_header($row["var_category"]);
}
+ $list_row_url = '';
if (permission_exists('var_edit')) {
$list_row_url = "var_edit.php?id=".urlencode($row['var_uuid']);
+ if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
+ $list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
+ }
}
echo "\n";
if (permission_exists('var_add') || permission_exists('var_edit') || permission_exists('var_delete')) {
@@ -259,7 +263,7 @@
}
echo " \n";
echo " ".escape($row['var_description'] ?? '')." \n";
- if (permission_exists('var_edit') && $list_row_edit_button == 'true') {
+ if (permission_exists('var_edit') && $list_row_edit_button) {
echo " \n";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " \n";
@@ -283,3 +287,4 @@
require_once "resources/footer.php";
?>
+
diff --git a/app/voicemail_greetings/voicemail_greetings.php b/app/voicemail_greetings/voicemail_greetings.php
index 93a5674dac..fef31701f3 100644
--- a/app/voicemail_greetings/voicemail_greetings.php
+++ b/app/voicemail_greetings/voicemail_greetings.php
@@ -424,7 +424,7 @@
}
echo th_order_by('greeting_description', $text['label-description'], $order_by, $order, null, "class='hide-sm-dn pct-25'", "id=".urlencode($voicemail_id));
$col_count++;
- if (permission_exists('voicemail_greeting_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
+ if (permission_exists('voicemail_greeting_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " \n";
}
echo " \n";
@@ -437,8 +437,12 @@
echo " \n";
echo " \n"; // dummy row to maintain alternating background color
}
+ $list_row_url = '';
if (permission_exists('voicemail_greeting_edit')) {
$list_row_url = "voicemail_greeting_edit.php?id=".urlencode($row['voicemail_greeting_uuid'])."&voicemail_id=".urlencode($voicemail_id);
+ if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
+ $list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
+ }
}
echo "\n";
if (permission_exists('voicemail_greeting_delete')) {
@@ -493,7 +497,7 @@
echo " ".$file_date." \n";
}
echo " ".escape($row['greeting_description'])." \n";
- if (permission_exists('voicemail_greeting_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
+ if (permission_exists('voicemail_greeting_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
echo " ";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " \n";
@@ -605,3 +609,4 @@
}
?>
+
diff --git a/app/voicemail_greetings/waveform.php b/app/voicemail_greetings/waveform.php
index f24c62be62..acce66c0ba 100644
--- a/app/voicemail_greetings/waveform.php
+++ b/app/voicemail_greetings/waveform.php
@@ -103,8 +103,8 @@
Waveform::$colorB = !empty($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) : [0,125,232,0.6]; // array rgba, right (b-leg) wave color
Waveform::$backgroundColor = !empty($_SESSION['theme']['audio_player_waveform_color_background']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_background']['text']) : [0,0,0,0]; // array rgba, default: transparent
Waveform::$axisColor = !empty($_SESSION['theme']['audio_player_waveform_color_axis']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_axis']['text']) : [0,0,0,0.3]; // array rgba
- Waveform::$singlePhase = empty($_SESSION['theme']['audio_player_waveform_single_phase']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] !== 'true' ? false : true; // positive phase only - left (a-leg) top, right (b-leg) bottom
- Waveform::$singleAxis = empty($_SESSION['theme']['audio_player_waveform_single_axis']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] !== 'false' ? true : false; // combine channels into single axis
+ Waveform::$singlePhase = filter_var($_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] ?? false, FILTER_VALIDATE_BOOL); // positive phase only - left (a-leg) top, right (b-leg) bottom
+ Waveform::$singleAxis = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? false, FILTER_VALIDATE_BOOL); // combine channels into single axis
$height = !empty($_SESSION['theme']['audio_player_waveform_height']['text']) && is_numeric(str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text'])) ? 2.2 * (int) str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text']) : null;
$wf = $waveform->getWaveform($greeting_dir.'/'.$temp_filename, 1600, $height ?? 180); // input: png filename returns boolean true/false, or 'base64' returns base64 string
}
diff --git a/app/voicemails/app_config.php b/app/voicemails/app_config.php
index 11d6f974b0..6adc844b91 100644
--- a/app/voicemails/app_config.php
+++ b/app/voicemails/app_config.php
@@ -180,10 +180,6 @@
$apps[$x]['permissions'][$y]['groups'][] = "user";
$apps[$x]['permissions'][$y]['groups'][] = "agent";
$y++;
- $apps[$x]['permissions'][$y]['name'] = "voicemail_local_after_forward";
- $apps[$x]['permissions'][$y]['groups'][] = "superadmin";
- $apps[$x]['permissions'][$y]['groups'][] = "admin";
- $y++;
$apps[$x]['permissions'][$y]['name'] = "voicemail_recording_instructions";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
@@ -491,6 +487,7 @@
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Choose to keep the voicemail file after sending to forward destinations.";
+ $apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "voicemail_enabled";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
@@ -751,4 +748,4 @@
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
-?>
+?>
\ No newline at end of file
diff --git a/app/voicemails/app_languages.php b/app/voicemails/app_languages.php
index ecaa6b0d9c..0b1f9520e6 100644
--- a/app/voicemails/app_languages.php
+++ b/app/voicemails/app_languages.php
@@ -649,33 +649,6 @@ $text['label-voicemail_local_after_email']['zh-cn'] = "äæęę¬å°";
$text['label-voicemail_local_after_email']['ja-jp'] = "ćć¼ć«ć«ć«äæć¤";
$text['label-voicemail_local_after_email']['ko-kr'] = "ė”컬 ģ ģ§";
-$text['label-voicemail_local_after_forward']['en-us'] = "Keep Local After Forward";
-$text['label-voicemail_local_after_forward']['en-gb'] = "Keep Local After Forward";
-$text['label-voicemail_local_after_forward']['ar-eg'] = "Ų§ŁŲŁŲ§Ųø Ų¹ŁŁ Ų§ŁŁ
ŲŁŁŲ© ŲØŲ¹ŲÆ Ų§ŁŲ£Ł
Ų§Ł
";
-$text['label-voicemail_local_after_forward']['de-at'] = "Nach Weiterleitung lokal behalten";
-$text['label-voicemail_local_after_forward']['de-ch'] = "Nach Weiterleitung lokal behalten";
-$text['label-voicemail_local_after_forward']['de-de'] = "Nach Weiterleitung lokal behalten";
-$text['label-voicemail_local_after_forward']['el-gr'] = "Keep Local After Forward";
-$text['label-voicemail_local_after_forward']['es-cl'] = "Mantener local despuƩs de avanzar";
-$text['label-voicemail_local_after_forward']['es-mx'] = "Mantener local despuƩs de avanzar";
-$text['label-voicemail_local_after_forward']['fr-ca'] = "Rester local aprĆØs le transfert";
-$text['label-voicemail_local_after_forward']['fr-fr'] = "Rester local aprĆØs le transfert";
-$text['label-voicemail_local_after_forward']['he-il'] = "ש××ר ×¢× ××§××× ×××ר ×§××××";
-$text['label-voicemail_local_after_forward']['it-it'] = "Mantieni locale dopo l'inoltro";
-$text['label-voicemail_local_after_forward']['ka-ge'] = "įįįįįįįįįįį” įØįįįįį įįįįįįįį įįįį įØįįįį į©į£įįįį";
-$text['label-voicemail_local_after_forward']['nl-nl'] = "Lokaal behouden na doorsturen";
-$text['label-voicemail_local_after_forward']['pl-pl'] = "Zachowaj lokalny po przesÅaniu dalej";
-$text['label-voicemail_local_after_forward']['pt-br'] = "Manter local depois de encaminhar";
-$text['label-voicemail_local_after_forward']['pt-pt'] = "Manter local depois de encaminhar";
-$text['label-voicemail_local_after_forward']['ro-ro'] = "PÄstraČi local dupÄ redirecČionare";
-$text['label-voicemail_local_after_forward']['ru-ru'] = "ДоŃ
ŃŠ°Š½ŃŃŃ Š»Š¾ŠŗŠ°Š»ŃŠ½Š¾Šµ Š·Š½Š°ŃŠµŠ½ŠøŠµ ŠæŠ¾ŃŠ»Šµ ŠæŠµŃŠµŃŃŠ»ŠŗŠø";
-$text['label-voicemail_local_after_forward']['sv-se'] = "HƄll lokal efter Forward";
-$text['label-voicemail_local_after_forward']['uk-ua'] = "ŠŠ±ŠµŃŃŠ³Š°ŃŠø Š»Š¾ŠŗŠ°Š»ŃŠ½Ń ŠæŃŃŠ»Ń ŠæŠµŃŠµŃиланнŃ";
-$text['label-voicemail_local_after_forward']['tr-tr'] = "İleriden Sonra Yerel Tut";
-$text['label-voicemail_local_after_forward']['zh-cn'] = "转ååäæęę¬å°";
-$text['label-voicemail_local_after_forward']['ja-jp'] = "転éå¾ććć¼ć«ć«ć«äæę";
-$text['label-voicemail_local_after_forward']['ko-kr'] = "ģ ė¬ ķ ė”컬 ģ ģ§";
-
$text['label-voicemail_transcribe_enabled']['en-us'] = "Transcribe";
$text['label-voicemail_transcribe_enabled']['en-gb'] = "Transcribe";
$text['label-voicemail_transcribe_enabled']['ar-eg'] = "ŁŲ³Ų®";
@@ -1782,32 +1755,32 @@ $text['description-voicemail_alternate_greet_id']['zh-cn'] = "é»č®¤é®åčÆäø
$text['description-voicemail_alternate_greet_id']['ja-jp'] = "ććć©ć«ćć®ć°ćŖć¼ćć£ć³ć°ć§ä½æēØććć代ęæć°ćŖć¼ćć£ć³ć° IDć";
$text['description-voicemail_alternate_greet_id']['ko-kr'] = "źø°ė³ø ģøģ¬ė§ģ ģ¬ģ©ėė ė첓 ģøģ¬ė§ IDģ
ėė¤.";
-$text['description-voicemail_mail_to']['en-us'] = "Enter the email address to send voicemail to. Multiple addresses may be separated by commas.";
-$text['description-voicemail_mail_to']['en-gb'] = "Enter the email address to send voicemail to. Multiple addresses may be separated by commas.";
-$text['description-voicemail_mail_to']['ar-eg'] = "Ų£ŲÆŲ®Ł Ų¹ŁŁŲ§Ł Ų§ŁŲØŲ±ŁŲÆ Ų§ŁŲ„ŁŁŲŖŲ±ŁŁŁ ŁŲ„Ų±Ų³Ų§Ł ŲØŲ±ŁŲÆ ŲµŁŲŖŁ Ų„ŁŁŁ. ŁŁ
ŁŁ ŁŲµŁ Ų§ŁŲ¹ŁŲ§ŁŁŁ Ų§ŁŁ
ŲŖŲ¹ŲÆŲÆŲ© ŲØŁŲ§ŲµŁŲ§ŲŖ.";
-$text['description-voicemail_mail_to']['de-at'] = "Geben Sie die Email Adresse an, an die Ihre Mailbox Nachricht gesendet werden soll (optional).";
-$text['description-voicemail_mail_to']['de-ch'] = "Geben Sie die Email Adresse an, an die Ihre Mailbox Nachricht gesendet werden soll (optional).";
-$text['description-voicemail_mail_to']['de-de'] = "Geben Sie die Email Adresse an, an die Ihre Mailbox Nachricht gesendet werden soll (optional).";
-$text['description-voicemail_mail_to']['el-gr'] = "ĪιĻαγάγεĻε ĻĪ· ΓιεĻĪøĻ
νĻĪ· email ĻĻην ĪæĻοία θα ĻĻείλεĻε αĻ
ĻĻμαĻĪæ ĻηλεĻĻνηĻĪ®. ΠολλĪĻ Ī“Ī¹ĪµĻ
ĪøĻνĻĪµĪ¹Ļ Ī¼ĻĪæĻĪæĻν να ΓιαĻĻĻιĻĻĪæĻν με ĪŗĻμμα.";
-$text['description-voicemail_mail_to']['es-cl'] = "Ingrese las direcciones de correo a quien desee enviar el correo de voz.";
-$text['description-voicemail_mail_to']['es-mx'] = "Ingrese las direcciones de correo a quien desee enviar el correo de voz.";
-$text['description-voicemail_mail_to']['fr-ca'] = "Saisissez l'adresse e-mail à laquelle envoyer le message vocal. Plusieurs adresses peuvent être séparées par des virgules.";
-$text['description-voicemail_mail_to']['fr-fr'] = "Saisissez l'adresse e-mail à laquelle envoyer le message vocal. Plusieurs adresses peuvent être séparées par des virgules.";
-$text['description-voicemail_mail_to']['he-il'] = "××× ××Ŗ ××Ŗ×××Ŗ ××××ר ××××§×ר×× × ×©×××× ×ש ×ש××× ×××ר ×§×××. ××Ŗ××××Ŗ ×ר××××Ŗ עש××××Ŗ ×××××Ŗ ××פר×××Ŗ ×פה××§××.";
-$text['description-voicemail_mail_to']['it-it'] = "Inserire l'indirizzo email a cui spedire i messaggi vocali.";
-$text['description-voicemail_mail_to']['ka-ge'] = "įØįįį§įįįįį įįį¤įį”į¢įį” įįį”įįįį įį, į”įįįįŖ į®įįįįįį į¤įį”į¢į įįįįįįįįįįį. įį įįį įįį¢į įįį”įįįį įį įį«įįįį į£įįį įįįįį°į§įį.";
-$text['description-voicemail_mail_to']['nl-nl'] = "Voer het E-mail adres om de boodschap naar te sturen.";
-$text['description-voicemail_mail_to']['pl-pl'] = "Dodaj adres email na który bÄdÄ
wysyÅane pliki poczty gÅosowej";
-$text['description-voicemail_mail_to']['pt-br'] = "Insira o endereƧo de email para enviar o correio de voz (opcional)";
-$text['description-voicemail_mail_to']['pt-pt'] = "Introduza o endereƧo de email para enviar o correio de voz.";
-$text['description-voicemail_mail_to']['ro-ro'] = "IntroduceČi adresa de e-mail la care trimiteČi mesajul vocal. Adresele multiple pot fi separate prin virgule.";
-$text['description-voicemail_mail_to']['ru-ru'] = "ŠŠ²ŠµŠ“ŠøŃŠµ Š°Š“ŃŠµŃ ŃŠ»ŠµŠŗŃŃŠ¾Š½Š½Š¾Š¹ поŃŃŃ Š“Š»Ń Š¾ŃŠæŃавки Š³Š¾Š»Š¾Ńовой поŃŃŃ.";
-$text['description-voicemail_mail_to']['sv-se'] = "Ange E-post adressen dit meddelande skall skickas.";
-$text['description-voicemail_mail_to']['uk-ua'] = "ŠŠ²ŠµŠ“ŃŃŃ Š°Š“ŃŠµŃŃ E-Mail на ŃŠŗŃ наГŃŃŠ»Š°ŃŠø Š³Š¾Š»Š¾ŃŠ¾Š²Šµ ŠæŠ¾Š²ŃŠ“омленнŃ";
-$text['description-voicemail_mail_to']['tr-tr'] = "Sesli mesajın gƶnderileceÄi e-posta adresini girin. Birden fazla adres virgülle ayrılabilir.";
-$text['description-voicemail_mail_to']['zh-cn'] = "č¾å
„č¦åå
¶åéčÆé³é®ä»¶ēēµåé®ä»¶å°åć å¤äøŖå°ååÆä»„ēØéå·åéć";
-$text['description-voicemail_mail_to']['ja-jp'] = "ćć¤ć¹ć”ć¼ć«ć®éäæ”å
ć®é»åć”ć¼ć« ć¢ćć¬ć¹ćå
„åćć¾ćć č¤ę°ć®ć¢ćć¬ć¹ćÆć«ć³ćć§åŗåćććØćć§ćć¾ćć";
-$text['description-voicemail_mail_to']['ko-kr'] = "ģģ± ė©ģ¼ģ ė³“ė¼ ģ“ė©ģ¼ 주ģ넼 ģ
ė „ķ©ėė¤. ģ¬ė¬ 주ģė ģ¼ķė” źµ¬ė¶ķ ģ ģģµėė¤.";
+$text['description-voicemail_mail_to']['en-us'] = "Enter the email address to send voicemail to (optional). Multiple addresses may be separated by commas.";
+$text['description-voicemail_mail_to']['en-gb'] = "Enter the email address to send voicemail to (optional). Multiple addresses may be separated by commas.";
+$text['description-voicemail_mail_to']['ar-eg'] = "Ų£ŲÆŲ®Ł Ų¹ŁŁŲ§Ł Ų§ŁŲØŲ±ŁŲÆ Ų§ŁŲ„ŁŁŲŖŲ±ŁŁŁ ŁŲ„Ų±Ų³Ų§Ł Ų§ŁŲØŲ±ŁŲÆ Ų§ŁŲµŁŲŖŁ Ų„ŁŁŁ (Ų§Ų®ŲŖŁŲ§Ų±Ł). ŁŁ
ŁŁ ŁŲµŁ Ų§ŁŲ¹ŁŲ§ŁŁŁ Ų§ŁŁ
ŲŖŲ¹ŲÆŲÆŲ© ŲØŁŁŲ§ŲµŁ.";
+$text['description-voicemail_mail_to']['de-at'] = "Geben Sie die E-Mail-Adresse ein, an die die Voicemail gesendet werden soll (optional). Mehrere Adressen kƶnnen durch Kommas getrennt werden.";
+$text['description-voicemail_mail_to']['de-ch'] = "Geben Sie die E-Mail-Adresse ein, an die die Voicemail gesendet werden soll (optional). Mehrere Adressen kƶnnen durch Kommas getrennt werden.";
+$text['description-voicemail_mail_to']['de-de'] = "Geben Sie die E-Mail-Adresse ein, an die die Voicemail gesendet werden soll (optional). Mehrere Adressen kƶnnen durch Kommas getrennt werden.";
+$text['description-voicemail_mail_to']['el-gr'] = "ĪιĻαγάγεĻε ĻĪ· ΓιεĻĪøĻ
νĻĪ· email για αĻĪæĻĻολή ĻĪæĻ
ĻĻνηĻĪ¹ĪŗĪæĻ Ī¼Ī·Ī½ĻμαĻĪæĻ (ĻĻοαιĻεĻικĻ). ΠολλαĻĪ»ĪĻ Ī“Ī¹ĪµĻ
ĪøĻνĻĪµĪ¹Ļ Ī¼ĻĪæĻĪæĻν να ΓιαĻĻĻιĻĻĪæĻν με ĪŗĻμμαĻα.";
+$text['description-voicemail_mail_to']['es-cl'] = "Ingrese la dirección de correo electrónico para enviar el correo de voz (opcional). Se pueden separar múltiples direcciones con comas.";
+$text['description-voicemail_mail_to']['es-mx'] = "Ingrese la dirección de correo electrónico para enviar el correo de voz (opcional). Se pueden separar múltiples direcciones con comas.";
+$text['description-voicemail_mail_to']['fr-ca'] = "Entrez l'adresse e-mail à laquelle envoyer la messagerie vocale (facultatif). Plusieurs adresses peuvent être séparées par des virgules.";
+$text['description-voicemail_mail_to']['fr-fr'] = "Entrez l'adresse e-mail à laquelle envoyer la messagerie vocale (facultatif). Plusieurs adresses peuvent être séparées par des virgules.";
+$text['description-voicemail_mail_to']['he-il'] = "××× ××Ŗ ××Ŗ×××Ŗ ××××××× ×ש××××Ŗ ××××ר ××§××× (××פצ××× ××). × ××Ŗ× ××פר×× ××× ××Ŗ××××Ŗ ×ר××××Ŗ ×××צע××Ŗ פה××§××.";
+$text['description-voicemail_mail_to']['it-it'] = "Inserisci l'indirizzo email a cui inviare la segreteria telefonica (opzionale). Più indirizzi possono essere separati da virgole.";
+$text['description-voicemail_mail_to']['ka-ge'] = "įØįįį§įįįįį įį.į¤įį”į¢įį” įįį”įįįį įį, į įįįįįįįŖ įįįįįįįįįįį į®įįįįįį į¤įį”į¢į (įį įį”įįįįįįįį£įį). įØįį”įį«įįįįįįį įį įįįįį įįį”įįįį įįį” įį«įįįį įįįįį§įį¤į.";
+$text['description-voicemail_mail_to']['nl-nl'] = "Voer het e-mailadres in om de voicemail naartoe te sturen (optioneel). Meerdere adressen kunnen worden gescheiden door komma's.";
+$text['description-voicemail_mail_to']['pl-pl'] = "WprowadÅŗ adres e-mail, na który ma zostaÄ wysÅana poczta gÅosowa (opcjonalnie). Wiele adresów można oddzieliÄ przecinkami.";
+$text['description-voicemail_mail_to']['pt-br'] = "Digite o endereƧo de e-mail para enviar o correio de voz (opcional). VĆ”rios endereƧos podem ser separados por vĆrgulas.";
+$text['description-voicemail_mail_to']['pt-pt'] = "Digite o endereƧo de e-mail para enviar o correio de voz (opcional). VĆ”rios endereƧos podem ser separados por vĆrgulas.";
+$text['description-voicemail_mail_to']['ro-ro'] = "IntroduceČi adresa de e-mail la care se va trimite mesageria vocalÄ (opČional). Mai multe adrese pot fi separate prin virgule.";
+$text['description-voicemail_mail_to']['ru-ru'] = "ŠŠ²ŠµŠ“ŠøŃŠµ Š°Š“ŃŠµŃ ŃŠ»ŠµŠŗŃŃŠ¾Š½Š½Š¾Š¹ поŃŃŃ Š“Š»Ń Š¾ŃŠæŃавки Š³Š¾Š»Š¾Ńовой поŃŃŃ (Š½ŠµŠ¾Š±ŃŠ·Š°ŃŠµŠ»ŃŠ½Š¾). ŠŠµŃŠŗŠ¾Š»ŃŠŗŠ¾ Š°Š“ŃŠµŃов можно ŃŠ°Š·Š“елŃŃŃ Š·Š°ŠæŃŃŃŠ¼Šø.";
+$text['description-voicemail_mail_to']['sv-se'] = "Ange e-postadressen som rƶstbrevet ska skickas till (valfritt). Flera adresser kan separeras med kommatecken.";
+$text['description-voicemail_mail_to']['uk-ua'] = "ŠŠ²ŠµŠ“ŃŃŃ Š°Š“ŃŠµŃŃ ŠµŠ»ŠµŠŗŃŃŠ¾Š½Š½Š¾Ń поŃŃŠø Š“Š»Ń Š½Š°Š“ŃŠøŠ»Š°Š½Š½Ń Š³Š¾Š»Š¾ŃŠ¾Š²Š¾Ń поŃŃŠø (необовāŃŠ·ŠŗŠ¾Š²Š¾). ŠŠµŠŗŃŠ»ŃŠŗŠ° Š°Š“ŃŠµŃ можна ŃŠ¾Š·Š“ŃŠ»ŠøŃŠø комами.";
+$text['description-voicemail_mail_to']['tr-tr'] = "Sesli mesajın gƶnderileceÄi e-posta adresini girin (isteÄe baÄlı). Birden fazla adres virgülle ayrılabilir.";
+$text['description-voicemail_mail_to']['zh-cn'] = "č¾å
„č¦åéčÆé³é®ä»¶ēēµåé®ä»¶å°åļ¼åÆéļ¼ćå¤äøŖå°ååÆēØéå·åéć";
+$text['description-voicemail_mail_to']['ja-jp'] = "ćć¤ć¹ć”ć¼ć«ćéäæ”ććć”ć¼ć«ć¢ćć¬ć¹ćå
„åćć¦ćć ććļ¼ćŖćć·ć§ć³ļ¼ćč¤ę°ć®ć¢ćć¬ć¹ćÆć³ć³ćć§åŗåćććØćć§ćć¾ćć";
+$text['description-voicemail_mail_to']['ko-kr'] = "볓ģ“ģ¤ė©ģ¼ģ ė³“ė¼ ģ“ė©ģ¼ 주ģ넼 ģ
ė „ķģøģ(ģ ķ ģ¬ķ). ģ¬ė¬ ź°ģ 주ģė ģ¼ķė” źµ¬ė¶ķ ģ ģģµėė¤.";
$text['description-voicemail_local_after_email']['en-us'] = "Choose whether to keep the voicemail in the system after sending the email notification.";
$text['description-voicemail_local_after_email']['en-gb'] = "Choose whether to keep the voicemail in the system after sending the email notification.";
@@ -1836,33 +1809,6 @@ $text['description-voicemail_local_after_email']['zh-cn'] = "éę©åéēµå
$text['description-voicemail_local_after_email']['ja-jp'] = "é»åć”ć¼ć«éē„ć®éäæ”å¾ć«ćć¤ć¹ć”ć¼ć«ćć·ć¹ćć ć«äæęćććć©ćććéøęćć¾ćć";
$text['description-voicemail_local_after_email']['ko-kr'] = "ģ“ė©ģ¼ ģ림ģ ė³“ėø ķ ģģ¤ķ
ģ ģģ± ė©ģ¼ģ ģ ģ§ķ ģ§ ģ¬ė¶ė„¼ ģ ķķ©ėė¤.";
-$text['description-voicemail_local_after_forward']['en-us'] = "Choose whether to keep the voicemail in this mailbox after sending to the defined Forward Destination(s).";
-$text['description-voicemail_local_after_forward']['en-gb'] = "Choose whether to keep the voicemail in this mailbox after sending to the defined Forward Destination(s).";
-$text['description-voicemail_local_after_forward']['ar-eg'] = "Ų§Ų®ŲŖŲ± Ł
Ų§ Ų„Ų°Ų§ ŁŁŲŖ ŲŖŲ±ŁŲÆ Ų§ŁŲ§ŲŲŖŁŲ§Ųø ŲØŲ§ŁŲØŲ±ŁŲÆ Ų§ŁŲµŁŲŖŁ ŁŁ ŲµŁŲÆŁŁ Ų§ŁŲØŲ±ŁŲÆ ŁŲ°Ų§ ŲØŲ¹ŲÆ Ų„Ų±Ų³Ų§ŁŁ Ų„ŁŁ ŁŲ¬ŁŲ© (ŁŲ¬ŁŲ§ŲŖ) Ų„Ų¹Ų§ŲÆŲ© Ų§ŁŲŖŁŲ¬ŁŁ Ų§ŁŁ
ŲŲÆŲÆŲ©.";
-$text['description-voicemail_local_after_forward']['de-at'] = "WƤhlen Sie, ob die Voicemail nach dem Senden an die definierten Weiterleitungsziele in dieser Mailbox bleiben soll.";
-$text['description-voicemail_local_after_forward']['de-ch'] = "WƤhlen Sie, ob die Voicemail nach dem Senden an die definierten Weiterleitungsziele in dieser Mailbox bleiben soll.";
-$text['description-voicemail_local_after_forward']['de-de'] = "WƤhlen Sie, ob die Voicemail nach dem Senden an die definierten Weiterleitungsziele in dieser Mailbox bleiben soll.";
-$text['description-voicemail_local_after_forward']['el-gr'] = "ĪĻιλĪξĻε εάν θα ΓιαĻĪ·Ļηθεί Īæ ĻηλεĻĻνηĻĪ®Ļ Ļε αĻ
ĻĻ ĻĪæ γĻαμμαĻοκιβĻĻιο μεĻά Ļην αĻĪæĻĻολή ĻĻον καθοĻιĻμĪνο(ĪæĻ
Ļ) Ī ĻοοĻιĻμĻ(ĪæĻ
Ļ).";
-$text['description-voicemail_local_after_forward']['es-cl'] = "Elija si desea conservar el correo de voz en este buzón despuĆ©s de enviarlo a los destinos de reenvĆo definidos.";
-$text['description-voicemail_local_after_forward']['es-mx'] = "Elija si desea conservar el correo de voz en este buzón despuĆ©s de enviarlo a los destinos de reenvĆo definidos.";
-$text['description-voicemail_local_after_forward']['fr-ca'] = "Choisissez si vous souhaitez conserver la messagerie vocale dans cette boîte aux lettres après l'envoi vers la ou les destinations de transfert définies.";
-$text['description-voicemail_local_after_forward']['fr-fr'] = "Choisissez si vous souhaitez conserver la messagerie vocale dans cette boîte aux lettres après l'envoi vers la ou les destinations de transfert définies.";
-$text['description-voicemail_local_after_forward']['he-il'] = "××ר ×× ×ש××ר ××Ŗ ××××ר ××§××× ××Ŗ×××Ŗ ××××ר ××× ×××ר ×ש×××× ×××¢×/×× ×××××ר××.";
-$text['description-voicemail_local_after_forward']['it-it'] = "Scegliere se conservare i messaggi vocali in questa casella di posta dopo l'invio alle destinazioni di inoltro definite.";
-$text['description-voicemail_local_after_forward']['ka-ge'] = "įįį į©įįį, įįį į©įįį įᣠįį į į®įįįįįį į¤įį”į¢į įį į”įį¤įį”į¢į į§į£įįØį įįįį”įįį¦įį į£į įįįįįØįį£įįįįį” įį£įį„į¢įįįįįį įįįįįįįįį” įØįįįįį.";
-$text['description-voicemail_local_after_forward']['nl-nl'] = "Kies of u de voicemail in deze mailbox wilt bewaren na verzending naar de gedefinieerde doorstuurbestemming(en).";
-$text['description-voicemail_local_after_forward']['pl-pl'] = "Wybierz, czy poczta gÅosowa ma byÄ przechowywana w tej skrzynce pocztowej po wysÅaniu do okreÅlonych miejsc docelowych przekazywania.";
-$text['description-voicemail_local_after_forward']['pt-br'] = "Escolha se deseja manter o correio de voz nesta caixa postal após enviar para o(s) destino(s) de encaminhamento definido(s).";
-$text['description-voicemail_local_after_forward']['pt-pt'] = "Escolha se deseja manter o correio de voz nesta caixa postal após enviar para o(s) destino(s) de encaminhamento definido(s).";
-$text['description-voicemail_local_after_forward']['ro-ro'] = "AlegeČi dacÄ doriČi sÄ pÄstraČi mesageria vocalÄ Ć®n aceastÄ cutie poČtalÄ dupÄ trimiterea cÄtre destinaČia (destinaČiile) de redirecČionare definite.";
-$text['description-voicemail_local_after_forward']['ru-ru'] = "ŠŃŠ±ŠµŃŠøŃе, ŃŠ»ŠµŠ“ŃŠµŃ ли ŃŠ¾Ń
ŃŠ°Š½ŃŃŃ Š³Š¾Š»Š¾ŃŠ¾Š²ŃŃ ŠæŠ¾ŃŃŃ Š² ŃŃŠ¾Š¼ поŃŃŠ¾Š²Š¾Š¼ ŃŃŠøŠŗŠµ ŠæŠ¾ŃŠ»Šµ Š¾ŃŠæŃавки в Š¾ŠæŃŠµŠ“ŠµŠ»ŠµŠ½Š½ŃŠµ ŠæŃŠ½ŠŗŃŃ Š½Š°Š·Š½Š°ŃŠµŠ½ŠøŃ ŠæŠµŃŠµŃŃŠ»ŠŗŠø.";
-$text['description-voicemail_local_after_forward']['sv-se'] = "VƤlj om du vill behƄlla rƶstbrevlƄdan i den hƤr brevlƄdan efter att ha skickats till den eller de definierade vidarebefordrandestinationerna.";
-$text['description-voicemail_local_after_forward']['uk-ua'] = "ŠŠøŠ±ŠµŃŃŃŃ, ŃŠø збеŃŃŠ³Š°ŃŠø Š³Š¾Š»Š¾ŃŠ¾Š²Ń поŃŃŃ Š² ŃŃŠ¹ поŃŃŠ¾Š²Ńй ŃŠŗŃинŃŃŃ ŠæŃŃŠ»Ń Š½Š°Š“ŃŠøŠ»Š°Š½Š½Ń на Š²ŠøŠ·Š½Š°ŃŠµŠ½Ń ŠæŃŠ½ŠŗŃŠø ŠæŃŠøŠ·Š½Š°ŃеннŃ.";
-$text['description-voicemail_local_after_forward']['tr-tr'] = "Tanımlanan İletme Hedef(ler)ine gƶnderdikten sonra sesli postanın bu posta kutusunda tutulup tutulmayacaÄını seƧin.";
-$text['description-voicemail_local_after_forward']['zh-cn'] = "éę©åØåéå°å®ä¹ē转åē®ēå°åęÆå¦å°čÆé³é®ä»¶äæēåØę¤é®ē®±äøć";
-$text['description-voicemail_local_after_forward']['ja-jp'] = "å®ē¾©ććć転éå
ć«éäæ”ććå¾ććć¤ć¹ć”ć¼ć«ććć®ć”ć¼ć«ćććÆć¹ć«äæęćććć©ćććéøęćć¾ćć";
-$text['description-voicemail_local_after_forward']['ko-kr'] = "ģ ģė ģ ė¬ ėģģ¼ė” ģģ± ė©ģ¼ģ ė³“ėø ķ ģ“ ģ¬ģķØģ ģģ± ė©ģ¼ģ 볓ź“ķ ģ§ ģ¬ė¶ė„¼ ģ ķķ©ėė¤.";
-
$text['description-voicemail_id']['en-us'] = "Enter the Voicemail ID";
$text['description-voicemail_id']['en-gb'] = "Enter the Voicemail ID";
$text['description-voicemail_id']['ar-eg'] = "أدخ٠Ł
عر٠اŁŲØŲ±ŁŲÆ Ų§ŁŲµŁŲŖŁ";
@@ -2726,4 +2672,4 @@ $text['message-emails_resent']['zh-cn'] = "ēµåé®ä»¶å·²éę°åé";
$text['message-emails_resent']['ja-jp'] = "åéäæ”ć”ć¼ć«";
$text['message-emails_resent']['ko-kr'] = "ģ“ė©ģ¼ ģ¬ģ ģ”";
-?>
+?>
\ No newline at end of file
diff --git a/app/voicemails/voicemail_edit.php b/app/voicemails/voicemail_edit.php
index a5aaec41da..c8e3d49d1f 100644
--- a/app/voicemails/voicemail_edit.php
+++ b/app/voicemails/voicemail_edit.php
@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane
- Portions created by the Initial Developer are Copyright (C) 2008-2024
+ Portions created by the Initial Developer are Copyright (C) 2008-2025
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -100,7 +100,6 @@
$voicemail_file = $_POST["voicemail_file"];
$voicemail_local_after_email = $_POST["voicemail_local_after_email"] ?? null;
$voicemail_destination = $_POST["voicemail_destination"];
- $voicemail_local_after_forward = $_POST["voicemail_local_after_forward"] ?? null;
$voicemail_enabled = $_POST["voicemail_enabled"] ?? 'false';
$voicemail_description = $_POST["voicemail_description"];
$voicemail_tutorial = $_POST["voicemail_tutorial"] ?? null;
@@ -153,8 +152,8 @@
if ($action == "add" && permission_exists('voicemail_add')) {
$voicemail_uuid = uuid();
//if adding a mailbox and don't have the transcription permission, set the default transcribe behavior
- if (!permission_exists('voicemail_transcription_enabled') && isset($_SESSION['voicemail']['transcription_enabled_default']['boolean'])) {
- $voicemail_transcription_enabled = $_SESSION['voicemail']['transcription_enabled_default']['boolean'] ?? 'false';
+ if (!permission_exists('voicemail_transcription_enabled')) {
+ $voicemail_transcription_enabled = filter_var($_SESSION['voicemail']['transcription_enabled_default']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
}
}
@@ -178,24 +177,9 @@
if (permission_exists('voicemail_file')) {
$array['voicemails'][0]['voicemail_file'] = $voicemail_file;
}
- if (permission_exists('voicemail_local_after_email') && !empty($voicemail_mail_to)) {
+ if (permission_exists('voicemail_local_after_email')) {
$array['voicemails'][0]['voicemail_local_after_email'] = $voicemail_local_after_email ?? 'false';
}
- else if (permission_exists('voicemail_local_after_forward')) {
- $array['voicemails'][0]['voicemail_local_after_email'] = $voicemail_local_after_forward ?? 'false';
- }
- else {
- $array['voicemails'][0]['voicemail_local_after_email'] = 'true';
- }
- if (permission_exists('voicemail_local_after_forward')) {
- $array['voicemails'][0]['voicemail_local_after_forward'] = $voicemail_local_after_forward ?? 'false';
- }
- else if (permission_exists('voicemail_local_after_email') && !empty($voicemail_mail_to)) {
- $array['voicemails'][0]['voicemail_local_after_forward'] = $voicemail_local_after_email ?? 'false';
- }
- else {
- $array['voicemails'][0]['voicemail_local_after_forward'] = 'true';
- }
$array['voicemails'][0]['voicemail_enabled'] = $voicemail_enabled;
$array['voicemails'][0]['voicemail_description'] = $voicemail_description;
@@ -362,7 +346,6 @@
$voicemail_recording_options = $row["voicemail_recording_options"];
$voicemail_file = $row["voicemail_file"];
$voicemail_local_after_email = $row["voicemail_local_after_email"];
- $voicemail_local_after_forward = $row["voicemail_local_after_forward"];
$voicemail_enabled = $row["voicemail_enabled"];
$voicemail_description = $row["voicemail_description"];
}
@@ -370,8 +353,7 @@
}
else {
$voicemail_file = $_SESSION['voicemail']['voicemail_file']['text'];
- $voicemail_local_after_email = $_SESSION['voicemail']['keep_local']['boolean'];
- $voicemail_local_after_forward = $_SESSION['voicemail']['keep_local']['boolean'];
+ $voicemail_local_after_email = filter_var($_SESSION['voicemail']['keep_local']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
}
//remove the spaces
@@ -381,9 +363,8 @@
//set the defaults
if (empty($voicemail_local_after_email)) { $voicemail_local_after_email = 'true'; }
- if (empty($voicemail_local_after_forward)) { $voicemail_local_after_forward = 'true'; }
if (empty($voicemail_enabled)) { $voicemail_enabled = 'true'; }
- if (empty($voicemail_transcription_enabled)) { $voicemail_transcription_enabled = $_SESSION['voicemail']['transcription_enabled_default']['boolean']; }
+ if (empty($voicemail_transcription_enabled)) { $voicemail_transcription_enabled = filter_var($_SESSION['voicemail']['transcription_enabled_default']['boolean'] ?? false, FILTER_VALIDATE_BOOL); }
if (empty($voicemail_tutorial)) { $voicemail_tutorial = 'false'; }
if (empty($voicemail_recording_instructions)) { $voicemail_recording_instructions = 'true'; }
if (empty($voicemail_recording_options)) { $voicemail_recording_options = 'true'; }
@@ -488,8 +469,8 @@
require_once "resources/header.php";
//password complexity
- $password_complexity = $_SESSION['voicemail']['password_complexity']['boolean'] ?? '';
- if ($password_complexity == "true") {
+ $password_complexity = filter_var($_SESSION['voicemail']['password_complexity']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
+ if ($password_complexity) {
echo "\n";
-?>
+?>
\ No newline at end of file
diff --git a/core/software/resources/classes/software.php b/core/software/resources/classes/software.php
index 7fe0436ccd..7a84332caf 100644
--- a/core/software/resources/classes/software.php
+++ b/core/software/resources/classes/software.php
@@ -12,7 +12,7 @@ if (!class_exists('software')) {
* version
*/
public static function version() {
- return '5.4.1';
+ return '5.4.2';
}
/**
diff --git a/core/upgrade/index.php b/core/upgrade/index.php
index f9ed6c7c77..eb56ed9fce 100644
--- a/core/upgrade/index.php
+++ b/core/upgrade/index.php
@@ -221,12 +221,12 @@
}
}
echo "".$text['button-close']." \n";
- echo "".$text['header-source_code_upgrade_preview']." \n";
+ echo "".$text['header-source_code_upgrade_preview']."
\n";
echo " \n";
if (!empty($response) && is_array($response)) {
echo str_replace('APP_NAME', (!empty($_GET['title']) ? "".$_GET['title']." " : null), $text['description-source_code_changes_found']);
echo " \n";
- echo "\n";
+ echo "
\n";
if (!empty($response) && is_array($response)) {
echo implode("
\n
\n", $response);
}
@@ -254,35 +254,6 @@
require_once "resources/header.php";
//source preview layer
- echo "\n";
-
echo "
\n";
echo "
\n";
echo " \n";
diff --git a/core/user_settings/user_setting_edit.php b/core/user_settings/user_setting_edit.php
index b480be6f05..3e0ec3fc2f 100644
--- a/core/user_settings/user_setting_edit.php
+++ b/core/user_settings/user_setting_edit.php
@@ -298,6 +298,9 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) {
}
}
+ //clear the user settings cache
+ settings::clear_cache('user');
+
//redirect the browser
if ($action == "update") {
message::add($text['message-update']);
diff --git a/core/user_settings/user_settings.php b/core/user_settings/user_settings.php
index 2da99490a6..a77d0b249a 100644
--- a/core/user_settings/user_settings.php
+++ b/core/user_settings/user_settings.php
@@ -119,7 +119,7 @@
$order = $_GET["order"] ?? '';
//set from session variables
- $list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
+ $list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL) ? 'true' : 'false';
$button_icon_back = !empty($_SESSION['theme']['button_icon_back']) ? $_SESSION['theme']['button_icon_back'] : '';
$button_icon_add = !empty($_SESSION['theme']['button_icon_add']) ? $_SESSION['theme']['button_icon_add'] : '';
$button_icon_copy = !empty($_SESSION['theme']['button_icon_copy']) ? $_SESSION['theme']['button_icon_copy'] : '';
@@ -259,7 +259,7 @@
echo "".$text['label-value']." ";
echo "".$text['label-enabled']." ";
echo "".$text['label-description']." ";
- if (permission_exists('user_setting_edit') && $list_row_edit_button == 'true') {
+ if (permission_exists('user_setting_edit') && $list_row_edit_button) {
echo " \n";
}
echo " \n";
@@ -383,7 +383,7 @@
}
echo " \n";
echo " ".escape($row['user_setting_description'])." \n";
- if (permission_exists('user_setting_edit') && $list_row_edit_button == 'true') {
+ if (permission_exists('user_setting_edit') && $list_row_edit_button) {
echo " \n";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$button_icon_edit,'link'=>$list_row_url]);
echo " \n";
diff --git a/core/users/app_defaults.php b/core/users/app_defaults.php
index 75c00a25c1..66968669be 100644
--- a/core/users/app_defaults.php
+++ b/core/users/app_defaults.php
@@ -35,7 +35,7 @@ if ($domains_processed == 1) {
$sql = "CREATE VIEW view_users AS ( \n";
$sql .= " select u.domain_uuid, u.user_uuid, d.domain_name, u.username, u.user_status, u.user_enabled, u.add_date, \n";
- $sql .= " c.contact_uuid, c.contact_organization, c.contact_name_given ||' '|| c.contact_name_family as contact_name, c.contact_name_given, c.contact_name_family, \n";
+ $sql .= " c.contact_uuid, c.contact_organization, c.contact_name_given ||' '|| c.contact_name_family as contact_name, c.contact_name_given, c.contact_name_family, c.contact_note, \n";
$sql .= " ( \n";
$sql .= " select \n";
$sql .= " string_agg(g.group_name, ', ') \n";
diff --git a/core/users/app_languages.php b/core/users/app_languages.php
index ca0ff692f9..27cdb13300 100644
--- a/core/users/app_languages.php
+++ b/core/users/app_languages.php
@@ -1975,6 +1975,32 @@ $text['label-user_enabled']['zh-cn'] = "åÆēØ";
$text['label-user_enabled']['ja-jp'] = "ęå¹";
$text['label-user_enabled']['ko-kr'] = "ģ¬ģ©";
+$text['label-contact_note']['en-us'] = "Note";
+$text['label-contact_note']['en-gb'] = "Note";
+$text['label-contact_note']['ar-eg'] = "Ł
ŁŲŁŲøŲ©";
+$text['label-contact_note']['de-at'] = "Notiz";
+$text['label-contact_note']['de-ch'] = "Notiz";
+$text['label-contact_note']['de-de'] = "Notiz";
+$text['label-contact_note']['el-gr'] = "ΣημείĻĻĪ·";
+$text['label-contact_note']['es-cl'] = "Nota";
+$text['label-contact_note']['es-mx'] = "Nota";
+$text['label-contact_note']['fr-ca'] = "Note";
+$text['label-contact_note']['fr-fr'] = "Note";
+$text['label-contact_note']['he-il'] = "×ער×";
+$text['label-contact_note']['it-it'] = "Nota";
+$text['label-contact_note']['ka-ge'] = "įØįįįįØįįį";
+$text['label-contact_note']['nl-nl'] = "Notitie";
+$text['label-contact_note']['pl-pl'] = "Notatka";
+$text['label-contact_note']['pt-br'] = "Nota";
+$text['label-contact_note']['pt-pt'] = "Nota";
+$text['label-contact_note']['ro-ro'] = "NotÄ";
+$text['label-contact_note']['ru-ru'] = "ŠŃŠøŠ¼ŠµŃŠ°Š½ŠøŠµ";
+$text['label-contact_note']['sv-se'] = "Notering";
+$text['label-contact_note']['uk-ua'] = "ŠŠ¾ŃŠ°ŃŠŗŠ°";
+$text['label-contact_note']['zh-cn'] = "ē¬č®°";
+$text['label-contact_note']['ja-jp'] = "ćć¼ć";
+$text['label-contact_note']['ko-kr'] = "ė©ėŖØ";
+
$text['label-additional_info']['en-us'] = "Additional Info";
$text['label-additional_info']['en-gb'] = "Additional Info";
$text['label-additional_info']['ar-eg'] = "Ł
Ų¹ŁŁŁ
Ų§ŲŖ Ų„Ų¶Ų§ŁŁŲ©";
@@ -2866,4 +2892,4 @@ $text['button-permissions']['zh-cn'] = "ęé";
$text['button-permissions']['ja-jp'] = "ćć¼ććć·ć§ć³";
$text['button-permissions']['ko-kr'] = "ź¶ķ";
-?>
+?>
\ No newline at end of file
diff --git a/core/users/user_edit.php b/core/users/user_edit.php
index 71813680bc..6d1ecfc835 100644
--- a/core/users/user_edit.php
+++ b/core/users/user_edit.php
@@ -105,10 +105,10 @@
//retrieve password requirements
if (permission_exists('user_password')) {
$required['length'] = $_SESSION['users']['password_length']['numeric'];
- $required['number'] = ($_SESSION['users']['password_number']['boolean'] == 'true') ? true : false;
- $required['lowercase'] = ($_SESSION['users']['password_lowercase']['boolean'] == 'true') ? true : false;
- $required['uppercase'] = ($_SESSION['users']['password_uppercase']['boolean'] == 'true') ? true : false;
- $required['special'] = ($_SESSION['users']['password_special']['boolean'] == 'true') ? true : false;
+ $required['number'] = filter_var($_SESSION['users']['password_number']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
+ $required['lowercase'] = filter_var($_SESSION['users']['password_lowercase']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
+ $required['uppercase'] = filter_var($_SESSION['users']['password_uppercase']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
+ $required['special'] = filter_var($_SESSION['users']['password_special']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
}
//prepare the data
diff --git a/core/users/users.php b/core/users/users.php
index cffbe80a8e..05d5056762 100644
--- a/core/users/users.php
+++ b/core/users/users.php
@@ -52,20 +52,6 @@
$users = $_POST['users'] ?? '';
}
-//check to see if contact details are in the view
- $sql = "select * from view_users ";
- $sql .= "where domain_uuid = :domain_uuid ";
- $parameters = null;
- $parameters['domain_uuid'] = $_SESSION['domain_uuid'];
- $row = $database->select($sql, $parameters, 'row');
- if (isset($row['contact_organization'])) {
- $show_contact_fields = true;
- }
- else {
- $show_contact_fields = false;
- }
- unset($parameters);
-
//process the http post data by action
if (!empty($action) && is_array($users) && @sizeof($users) != 0) {
switch ($action) {
@@ -103,7 +89,7 @@
$show = !empty($_GET["show"]) ? $_GET["show"] : '';
//set from session variables
- $list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
+ $list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
//add the search string
if (!empty($search)) {
@@ -113,7 +99,7 @@
$sql_search .= " or lower(group_names) like :search ";
$sql_search .= " or lower(contact_organization) like :search ";
$sql_search .= " or lower(contact_name) like :search ";
- //$sql_search .= " or lower(user_status) like :search ";
+ $sql_search .= " or lower(contact_note) like :search ";
$sql_search .= ") ";
$parameters['search'] = '%'.$search.'%';
}
@@ -153,9 +139,7 @@
//get the list
$sql = "select domain_name, domain_uuid, user_uuid, username, group_names, ";
- if ($show_contact_fields) {
- $sql .= "contact_organization,contact_name, ";
- }
+ $sql .= "contact_organization,contact_name,contact_note, ";
$sql .= "cast(user_enabled as text) ";
$sql .= "from view_users ";
if ($show == "all" && permission_exists('user_all')) {
@@ -260,24 +244,26 @@
}
echo th_order_by('username', $text['label-username'], $order_by, $order, null, null, $param);
echo th_order_by('group_names', $text['label-groups'], $order_by, $order, null, null, $param);
- if ($show_contact_fields) {
- echo th_order_by('contact_organization', $text['label-organization'], $order_by, $order, null, null, $param);
- echo th_order_by('contact_name', $text['label-name'], $order_by, $order, null, null, $param);
- }
+ echo th_order_by('contact_organization', $text['label-organization'], $order_by, $order, null, null, $param);
+ echo th_order_by('contact_name', $text['label-name'], $order_by, $order, null, null, $param);
//echo th_order_by('contact_name_family', $text['label-contact_name_family'], $order_by, $order);
//echo th_order_by('user_status', $text['label-user_status'], $order_by, $order);
//echo th_order_by('add_date', $text['label-add_date'], $order_by, $order);
+ echo th_order_by('contact_note', $text['label-contact_note'], $order_by, $order, null, "class='center'", $param);
echo th_order_by('user_enabled', $text['label-user_enabled'], $order_by, $order, null, "class='center'", $param);
- if (permission_exists('user_edit') && $list_row_edit_button == 'true') {
+ if (permission_exists('user_edit') && $list_row_edit_button) {
echo " \n";
}
echo "\n";
-
if (is_array($users) && @sizeof($users) != 0) {
$x = 0;
foreach ($users as $row) {
+ $list_row_url = '';
if (permission_exists('user_edit')) {
$list_row_url = "user_edit.php?id=".urlencode($row['user_uuid']);
+ if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
+ $list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
+ }
}
echo "\n";
if (permission_exists('user_add') || permission_exists('user_edit') || permission_exists('user_delete')) {
@@ -298,14 +284,13 @@
}
echo " \n";
echo " ".escape($row['group_names'])." \n";
- if ($show_contact_fields) {
- echo " ".escape($row['contact_organization'])." \n";
- echo " ".escape($row['contact_name'])." \n";
- }
+ echo " ".escape($row['contact_organization'])." \n";
+ echo " ".escape($row['contact_name'])." \n";
//echo " ".escape($row['contact_name_given'])." \n";
//echo " ".escape($row['contact_name_family'])." \n";
//echo " ".escape($row['user_status'])." \n";
//echo " ".escape($row['add_date'])." \n";
+ echo " ".escape($row['contact_note'])." \n";
if (permission_exists('user_edit')) {
echo " \n";
echo button::create(['type'=>'submit','class'=>'link','label'=>$text['label-'.$row['user_enabled']],'title'=>$text['button-toggle'],'onclick'=>"list_self_check('checkbox_".$x."'); list_action_set('toggle'); list_form_submit('form_list')"]);
@@ -315,7 +300,7 @@
echo $text['label-'.$row['user_enabled']];
}
echo " \n";
- if (permission_exists('user_edit') && $list_row_edit_button == 'true') {
+ if (permission_exists('user_edit') && $list_row_edit_button) {
echo " \n";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " \n";
diff --git a/logout.php b/logout.php
index 108163ef28..71ccc407e1 100644
--- a/logout.php
+++ b/logout.php
@@ -41,7 +41,7 @@
//check for login return preference
if (!empty($_SESSION["user_uuid"])) {
- if (isset($_SESSION['login']['destination_last']) && ($_SESSION['login']['destination_last']['boolean'] == 'true')) {
+ if (isset($_SESSION['login']['destination_last']) && filter_var($_SESSION['login']['destination_last']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
if ($_SERVER['HTTP_REFERER'] != '') {
//convert to relative path
$referrer = substr($_SERVER['HTTP_REFERER'], strpos($_SERVER['HTTP_REFERER'], $_SERVER["HTTP_HOST"]) + strlen($_SERVER["HTTP_HOST"]));
diff --git a/resources/classes/auto_loader.php b/resources/classes/auto_loader.php
index fcb0b4fce3..1b5ed65549 100644
--- a/resources/classes/auto_loader.php
+++ b/resources/classes/auto_loader.php
@@ -27,10 +27,21 @@
class auto_loader {
const FILE = 'autoloader_cache.php';
+ const CACHE_KEY = 'autoloader_classes';
private $classes;
+ /**
+ * Tracks the APCu extension for caching to RAM drive across requests
+ * @var bool
+ */
+ private $apcu_enabled;
+
public function __construct($project_path = '') {
+
+ //set if we can use RAM cache
+ $this->apcu_enabled = function_exists('apcu_enabled') && apcu_enabled();
+
//classes must be loaded before this object is registered
if (!$this->load_cache()) {
//cache miss so load them
@@ -43,34 +54,49 @@ class auto_loader {
}
public function update_cache(string $file = ''): bool {
+ //guard against writing an empty file
+ if (empty($this->classes)) {
+ return false;
+ }
+
+ //update RAM cache when available
+ if ($this->apcu_enabled) {
+ apcu_store(self::CACHE_KEY, $this->classes);
+ }
+
//ensure we have somewhere to put the file
if (empty($file)) {
$file = sys_get_temp_dir() . '/' . self::FILE;
}
- //guard against writing an empty file
- if (!empty($this->classes)) {
- //export the classes array using PHP engine
- $data = var_export($this->classes, true);
+ //export the classes array using PHP engine
+ $data = var_export($this->classes, true);
- //put the array in a form that it can be loaded directly to an array
- $result = file_put_contents($file, "classes = [];
+
+ //use apcu when available
+ if ($this->apcu_enabled && apcu_exists(self::CACHE_KEY)) {
+ $this->classes = apcu_fetch(self::CACHE_KEY, $success);
+ if ($success) return true;
+ }
+
//use a standard file
if (empty($file)) {
$file = sys_get_temp_dir() . '/'. self::FILE;
@@ -81,6 +107,10 @@ class auto_loader {
}
//assign to an array
if (!empty($this->classes)) {
+ //cache edge case of first time using apcu cache
+ if ($this->apcu_enabled) {
+ apcu_store(self::CACHE_KEY, $this->classes);
+ }
return true;
}
return false;
@@ -125,6 +155,46 @@ class auto_loader {
return true;
}
+ //Smarty has it's own autoloader so reject the request
+ if ($class_name === 'Smarty_Autoloader') {
+ return false;
+ }
+
+ //cache miss
+ if (!empty($_REQUEST['debug']) && $_REQUEST['debug'] == 'true') {
+ openlog("PHP", LOG_PID | LOG_PERROR, LOG_LOCAL0);
+ syslog(LOG_WARNING, "[php][auto_loader] class not found in cache: ".$class_name);
+ closelog();
+ }
+
+ //set project path using magic dir constant
+ $project_path = dirname(__DIR__, 2);
+
+ //build the search path array
+ $search_path[] = glob($project_path . "/resources/classes/".$class_name.".php");
+ $search_path[] = glob($project_path . "/resources/interfaces/".$class_name.".php");
+ $search_path[] = glob($project_path . "/resources/traits/".$class_name.".php");
+ $search_path[] = glob($project_path . "/*/*/resources/classes/".$class_name.".php");
+ $search_path[] = glob($project_path . "/*/*/resources/interfaces/".$class_name.".php");
+ $search_path[] = glob($project_path . "/*/*/resources/traits/".$class_name.".php");
+
+ //find the path
+ $path = self::autoload_search($search_path);
+ if (!empty($path)) {
+
+ //include the class or interface
+ include $path;
+
+ //make sure to reload the cache after we found a new class
+ $this->reload_classes();
+
+ //update the cache with new classes
+ $this->update_cache();
+
+ //return boolean
+ return true;
+ }
+
//send to syslog when debugging
if (!empty($_REQUEST['debug']) && $_REQUEST['debug'] == 'true') {
openlog("PHP", LOG_PID | LOG_PERROR, LOG_LOCAL0);
@@ -135,4 +205,26 @@ class auto_loader {
//return boolean
return false;
}
+
+ public static function autoload_search($array) : string {
+ foreach($array as $path) {
+ if (is_array($path) && count($path) != 0) {
+ foreach($path as $sub_path) {
+ if (!empty($sub_path) && file_exists($sub_path)) {
+ return $sub_path;
+ }
+ }
+ }
+ elseif (!empty($path) && file_exists($path)) {
+ return $path;
+ }
+ }
+ return '';
+ }
+
+ public static function clear_cache() {
+ if (function_exists('apcu_enabled') && apcu_enabled()) {
+ apcu_delete(self::CACHE_KEY);
+ }
+ }
}
diff --git a/resources/classes/cache.php b/resources/classes/cache.php
index 557d2cda63..f0ef9056ee 100644
--- a/resources/classes/cache.php
+++ b/resources/classes/cache.php
@@ -187,6 +187,17 @@ class cache {
closelog();
}
+ //check for apcu extension
+ if (function_exists('apcu_enabled') && apcu_enabled()) {
+ //flush everything
+ apcu_clear_cache();
+ }
+
+ //remove the autoloader file cache
+ if (file_exists(sys_get_temp_dir() . '/' . auto_loader::FILE)) {
+ @unlink(sys_get_temp_dir() . '/' . auto_loader::FILE);
+ }
+
//cache method memcache
if ($this->method === "memcache") {
// connect to event socket
diff --git a/resources/classes/email.php b/resources/classes/email.php
index 81cf026dd3..dc419897b0 100644
--- a/resources/classes/email.php
+++ b/resources/classes/email.php
@@ -445,7 +445,7 @@ if (!class_exists('email')) {
$smtp['password'] = $this->settings->get('email','smtp_password');
$smtp['from'] = $this->settings->get('voicemail','smtp_from') ?? $this->settings->get('email','smtp_from');
$smtp['from_name'] = $this->settings->get('voicemail','smtp_from_name') ?? $this->settings->get('email','smtp_from_name');
- $smtp['validate_certificate'] = $this->settings->get('email','smtp_validate_certificate');
+ $smtp['validate_certificate'] = $this->settings->get('email','smtp_validate_certificate', true);
$smtp['crypto_method'] = $this->settings->get('email','smtp_crypto_method') ?? null;
//override the domain-specific smtp server settings, if any
@@ -506,7 +506,7 @@ if (!class_exists('email')) {
$mail->SMTPSecure = $smtp['secure'];
}
- if ($smtp_secure && isset($smtp['validate_certificate']) && $smtp['validate_certificate'] == "false") {
+ if ($smtp_secure && isset($smtp['validate_certificate']) && !$smtp['validate_certificate']) {
//bypass certificate check e.g. for self-signed certificates
$smtp_options['ssl']['verify_peer'] = false;
$smtp_options['ssl']['verify_peer_name'] = false;
@@ -638,5 +638,3 @@ $email->attachments = $email_attachments;
$response = $mail->error;
$sent = $email->send();
*/
-
-?>
diff --git a/resources/classes/menu.php b/resources/classes/menu.php
index 86c8b8983c..9df1c94320 100644
--- a/resources/classes/menu.php
+++ b/resources/classes/menu.php
@@ -427,6 +427,7 @@ if (!class_exists('menu')) {
$menu_item_parent_uuid = $uuid_array[$menu['parent_uuid']] ?? null;
$menu_item_category = $menu['category'];
$menu_item_icon = $menu['icon'] ?? null;
+ $menu_item_icon_color = $menu['icon_color'] ?? null;
$menu_item_path = $menu['path'];
$menu_item_order = $menu['order'] ?? null;
$menu_item_description = $menu['desc'] ?? null;
@@ -471,6 +472,7 @@ if (!class_exists('menu')) {
$array['menu_items'][$x]['menu_item_link'] = $menu_item_path;
$array['menu_items'][$x]['menu_item_category'] = $menu_item_category;
$array['menu_items'][$x]['menu_item_icon'] = $menu_item_icon;
+ $array['menu_items'][$x]['menu_item_icon_color'] = $menu_item_icon_color;
if (!empty($menu_item_order)) {
$array['menu_items'][$x]['menu_item_order'] = $menu_item_order;
}
@@ -745,7 +747,7 @@ if (!class_exists('menu')) {
//get the menu from the database
$sql = "select i.menu_item_link, l.menu_item_title as menu_language_title, ";
$sql .= "i.menu_item_title, i.menu_item_protected, i.menu_item_category, ";
- $sql .= "i.menu_item_icon, i.menu_item_uuid, i.menu_item_parent_uuid ";
+ $sql .= "i.menu_item_icon, i.menu_item_icon_color, i.menu_item_uuid, i.menu_item_parent_uuid ";
$sql .= "from v_menu_items as i, v_menu_languages as l ";
$sql .= "where i.menu_item_uuid = l.menu_item_uuid ";
$sql .= "and l.menu_language = :menu_language ";
@@ -814,7 +816,7 @@ if (!class_exists('menu')) {
}
//get the child menu from the database
- $sql = "select i.menu_item_link, l.menu_item_title as menu_language_title, i.menu_item_title, i.menu_item_protected, i.menu_item_category, i.menu_item_icon, i.menu_item_uuid, i.menu_item_parent_uuid ";
+ $sql = "select i.menu_item_link, l.menu_item_title as menu_language_title, i.menu_item_title, i.menu_item_protected, i.menu_item_category, i.menu_item_icon, i.menu_item_icon_color, i.menu_item_uuid, i.menu_item_parent_uuid ";
$sql .= "from v_menu_items as i, v_menu_languages as l ";
$sql .= "where i.menu_item_uuid = l.menu_item_uuid ";
$sql .= "and l.menu_language = :menu_language ";
@@ -854,6 +856,7 @@ if (!class_exists('menu')) {
$menu_item_link = $row['menu_item_link'];
$menu_item_category = $row['menu_item_category'];
$menu_item_icon = $row['menu_item_icon'];
+ $menu_item_icon_color = $row['menu_item_icon_color'];
$menu_item_uuid = $row['menu_item_uuid'];
$menu_item_parent_uuid = $row['menu_item_parent_uuid'];
@@ -1010,7 +1013,7 @@ if (!class_exists('menu')) {
$mod_a_3 = ($menu_parent['menu_item_category'] == 'external') ? "target='_blank' " : null;
if ($this->settings->get('theme', 'menu_main_icons', true) === true) {
if (!empty($menu_parent['menu_item_icon']) && substr($menu_parent['menu_item_icon'], 0, 3) == 'fa-') { // font awesome icon
- $menu_main_icon = "";
+ $menu_main_icon = "";
}
else {
$menu_main_icon = null;
@@ -1043,7 +1046,7 @@ if (!class_exists('menu')) {
$menu_sub_icon = null;
if ($this->settings->get('theme', 'menu_sub_icons', true) !== false) {
if (!empty($menu_sub['menu_item_icon']) && substr($menu_sub['menu_item_icon'], 0, 3) == 'fa-') { // font awesome icon
- $menu_sub_icon = "";
+ $menu_sub_icon = "";
}
else {
$menu_sub_icon = null;
@@ -1211,7 +1214,7 @@ if (!class_exists('menu')) {
$html .= "
\n";
}
if (!empty($menu_item_main['menu_item_icon']) && substr($menu_item_main['menu_item_icon'], 0, 3) == 'fa-') { // font awesome icon
- $html .= " ";
+ $html .= " ";
}
$html .= "";
$html .= "\n";
@@ -1222,7 +1225,7 @@ if (!class_exists('menu')) {
$menu_sub_icon = null;
if ($this->settings->get('theme', 'menu_sub_icons', true) !== false) {
if (!empty($menu_item_sub['menu_item_icon']) && substr($menu_item_sub['menu_item_icon'], 0, 3) == 'fa-') { // font awesome icon
- $menu_sub_icon = "";
+ $menu_sub_icon = "";
}
else {
$menu_sub_icon = null;
diff --git a/resources/classes/settings.php b/resources/classes/settings.php
index b2a85e024a..77eec854a0 100644
--- a/resources/classes/settings.php
+++ b/resources/classes/settings.php
@@ -53,6 +53,12 @@ class settings {
*/
private $database;
+ /**
+ * Tracks if the APCu extension is loaded for database queries
+ * @var bool
+ */
+ private $apcu_enabled;
+
/**
* Create a settings object using key/value pairs in the $setting_array.
*
@@ -63,6 +69,16 @@ class settings {
*/
public function __construct($setting_array = []) {
+ //try to use RAM cache by default
+ if (!isset($setting_array['allow_caching'])) {
+ $setting_array['allow_caching'] = true;
+ }
+
+ //track ram caching
+ if ($setting_array['allow_caching']) {
+ $this->apcu_enabled = function_exists('apcu_enabled') && apcu_enabled();
+ }
+
//open a database connection
if (empty($setting_array['database'])) {
$this->database = database::new();
@@ -150,12 +166,12 @@ class settings {
* @param string $uuid uuid of the setting if available. If set to an empty string then a new uuid will be created.
* @param string $category Category of the setting.
* @param string $subcategory Subcategory of the setting.
- * @param string $type Type of the setting (array, numeric, text, etc)
* @param string $value (optional) Value to set. Default is empty string.
+ * @param string $type Type of the setting (array, numeric, text, etc)
* @param bool $enabled (optional) True or False. Default is True.
* @param string $description (optional) Description. Default is empty string.
*/
- public function set(string $table_prefix, string $uuid, string $category, string $subcategory, string $type = 'text', string $value = "", bool $enabled = true, string $description = "") {
+ public function set(string $table_prefix, string $uuid, string $category, string $subcategory, string $value = "", string $type = 'text', bool $enabled = true, string $description = "") {
//set the table name
$table_name = $table_prefix.'_settings';
@@ -207,6 +223,15 @@ class settings {
*/
private function default_settings() {
+ //set the key for global defaults
+ $key = 'settings_global_' . $this->category;
+
+ //if the apcu extension is loaded get the already parsed array
+ if ($this->apcu_enabled && apcu_exists($key)) {
+ $this->settings = apcu_fetch($key);
+ return;
+ }
+
//get the default settings
$sql = "select * from v_default_settings ";
$sql .= "where default_setting_enabled = 'true' ";
@@ -223,17 +248,7 @@ class settings {
$subcategory = $row['default_setting_subcategory'];
if (isset($row['default_setting_value']) && $row['default_setting_value'] !== '') {
if ($name == "boolean") {
- if (gettype($row['default_setting_value']) === 'string') {
- if ($row['default_setting_value'] === 'true') {
- $this->settings[$category][$subcategory] = true;
- }
- else {
- $this->settings[$category][$subcategory] = false;
- }
- }
- elseif (gettype($row['default_setting_value']) === 'boolean') {
- $this->settings[$category][$subcategory] = $row['default_setting_value'];
- }
+ $this->settings[$category][$subcategory] = filter_var($row['default_setting_value'], FILTER_VALIDATE_BOOLEAN);
}
elseif ($name == "array") {
if (!isset($this->settings[$category][$subcategory]) || !is_array($this->settings[$category][$subcategory])) {
@@ -247,7 +262,11 @@ class settings {
}
}
}
- unset($sql, $result, $row);
+
+ //if the apcu extension is loaded store the result
+ if ($this->apcu_enabled) {
+ apcu_store($key, $this->settings);
+ }
}
/**
@@ -255,13 +274,22 @@ class settings {
* @access private
*/
private function domain_settings() {
-
- $sql = "select * from v_domain_settings ";
- $sql .= "where domain_uuid = :domain_uuid ";
- $sql .= "and domain_setting_enabled = 'true' ";
- $parameters['domain_uuid'] = $this->domain_uuid;
- $result = $this->database->select($sql, $parameters, 'all');
- unset($sql, $parameters);
+ $key = 'settings_domain_'.$this->domain_uuid;
+ $result = '';
+ //if the apcu extension is loaded get the cached database result
+ if ($this->apcu_enabled && apcu_exists($key)) {
+ $result = apcu_fetch($key);
+ } else {
+ $sql = "select * from v_domain_settings ";
+ $sql .= "where domain_uuid = :domain_uuid ";
+ $sql .= "and domain_setting_enabled = 'true' ";
+ $parameters['domain_uuid'] = $this->domain_uuid;
+ $result = $this->database->select($sql, $parameters, 'all');
+ //if the apcu extension is loaded store the result
+ if ($this->apcu_enabled) {
+ apcu_store($key, $result);
+ }
+ }
if (!empty($result)) {
//domain setting array types override the default settings set as type array
foreach ($result as $row) {
@@ -280,17 +308,7 @@ class settings {
$subcategory = $row['domain_setting_subcategory'];
if (isset($row['domain_setting_value']) && $row['domain_setting_value'] !== '') {
if ($name == "boolean") {
- if (gettype($row['domain_setting_value']) === 'string') {
- if ($row['domain_setting_value'] === 'true') {
- $this->settings[$category][$subcategory] = true;
- }
- else {
- $this->settings[$category][$subcategory] = false;
- }
- }
- elseif (gettype($row['domain_setting_value']) === 'boolean') {
- $this->settings[$category][$subcategory] = $row['domain_setting_value'];
- }
+ $this->settings[$category][$subcategory] = filter_var($row['domain_setting_value'], FILTER_VALIDATE_BOOLEAN);
}
if ($name == "array") {
if (!isset($this->settings[$category][$subcategory]) || !is_array($this->settings[$category][$subcategory])) {
@@ -305,7 +323,6 @@ class settings {
}
}
- unset($result, $row);
}
/**
@@ -314,15 +331,25 @@ class settings {
* @depends $this->domain_uuid
*/
private function user_settings() {
-
- $sql = "select * from v_user_settings ";
- $sql .= "where domain_uuid = :domain_uuid ";
- $sql .= "and user_uuid = :user_uuid ";
- $sql .= " order by user_setting_order asc ";
- $parameters['domain_uuid'] = $this->domain_uuid;
- $parameters['user_uuid'] = $this->user_uuid;
- $result = $this->database->select($sql, $parameters, 'all');
- if (is_array($result)) {
+ $key = 'settings_user_'.$this->user_uuid;
+ $result = '';
+ //if the apcu extension is loaded get the cached database result
+ if ($this->apcu_enabled && apcu_exists($key)) {
+ $result = apcu_fetch($key);
+ } else {
+ $sql = "select * from v_user_settings ";
+ $sql .= "where domain_uuid = :domain_uuid ";
+ $sql .= "and user_uuid = :user_uuid ";
+ $sql .= " order by user_setting_order asc ";
+ $parameters['domain_uuid'] = $this->domain_uuid;
+ $parameters['user_uuid'] = $this->user_uuid;
+ $result = $this->database->select($sql, $parameters, 'all');
+ //if the apcu extension is loaded store the result
+ if ($this->apcu_enabled) {
+ apcu_store($key, $result);
+ }
+ }
+ if (!empty($result)) {
foreach ($result as $row) {
if ($row['user_setting_enabled'] == 'true') {
$name = $row['user_setting_name'];
@@ -330,17 +357,7 @@ class settings {
$subcategory = $row['user_setting_subcategory'];
if (isset($row['user_setting_value']) && $row['user_setting_value'] !== '') {
if ($name == "boolean") {
- if (gettype($row['user_setting_value']) === 'string') {
- if ($row['user_setting_value'] === 'true') {
- $this->settings[$category][$subcategory] = true;
- }
- else {
- $this->settings[$category][$subcategory] = false;
- }
- }
- elseif (gettype($row['user_setting_value']) === 'boolean') {
- $this->settings[$category][$subcategory] = $row['user_setting_value'];
- }
+ $this->settings[$category][$subcategory] = filter_var($row['user_setting_value'], FILTER_VALIDATE_BOOLEAN);
}
elseif ($name == "array") {
$this->settings[$category][$subcategory][] = $row['user_setting_value'];
@@ -406,4 +423,34 @@ class settings {
}
}
}
+
+ /**
+ * Clears the settings cache
+ * @param string $type Empty clears all settings. Values can be global, domain, or user.
+ */
+ public static function clear_cache(string $type = '') {
+ if (function_exists('apcu_enabled') && apcu_enabled()) {
+ switch ($type) {
+ case 'all':
+ case '':
+ default:
+ $type = "";
+ break;
+ case 'global':
+ case 'domain':
+ case 'user':
+ $type .= "_";
+ break;
+ }
+ $cache = apcu_cache_info(false);
+ if (!empty($cache['cache_list'])) {
+ foreach ($cache['cache_list'] as $entry) {
+ $key = $entry['info'];
+ if (str_starts_with($key, 'settings_' . $type)) {
+ apcu_delete($key);
+ }
+ }
+ }
+ }
+ }
}
diff --git a/resources/fontawesome/fa_icons.php b/resources/fontawesome/fa_icons.php
index 9b2e128fed..558cea25d0 100644
--- a/resources/fontawesome/fa_icons.php
+++ b/resources/fontawesome/fa_icons.php
@@ -113,6 +113,6 @@ if (
!empty($font_awesome_icons) && is_array($font_awesome_icons)
) {
foreach ($font_awesome_icons as $icon) {
- echo " \n";
+ echo " \n";
}
}
\ No newline at end of file
diff --git a/resources/footer.php b/resources/footer.php
index 8a03f7edcd..f263b5d5b5 100644
--- a/resources/footer.php
+++ b/resources/footer.php
@@ -45,7 +45,7 @@
ob_end_clean(); //clean the buffer
//clear the template
- //if (isset($_SESSION['theme']['cache']['boolean']) && $_SESSION['theme']['cache']['boolean'] == "false") {
+ //if (!filter_var($_SESSION['theme']['cache']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
// $_SESSION["template_content"] = '';
//}
@@ -285,7 +285,7 @@
if (
$authenticated &&
file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH.'/app/session_timer/session_timer.php') &&
- $_SESSION['security']['session_timer_enabled']['boolean'] == 'true'
+ filter_var($_SESSION['security']['session_timer_enabled']['boolean'] ?? false, FILTER_VALIDATE_BOOL)
) {
include_once PROJECT_PATH.'app/session_timer/session_timer.php';
$view->assign('session_timer', $session_timer);
diff --git a/resources/php.php b/resources/php.php
index 705fbd29f8..ce524a9214 100644
--- a/resources/php.php
+++ b/resources/php.php
@@ -32,7 +32,7 @@
}
}
//regenerate sessions to avoid session id attacks such as session fixation
- if (array_key_exists('security',$_SESSION) && $_SESSION['security']['session_rotate']['boolean'] == "true") {
+ if (array_key_exists('security',$_SESSION) && filter_var($_SESSION['security']['session_rotate']['boolean'] ?? true, FILTER_VALIDATE_BOOL)) {
$_SESSION['session']['last_activity'] = time();
if (!isset($_SESSION['session']['created'])) {
$_SESSION['session']['created'] = time();
diff --git a/resources/require.php b/resources/require.php
index f1ddbd8b06..23495d6c71 100644
--- a/resources/require.php
+++ b/resources/require.php
@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane
- Portions created by the Initial Developer are Copyright (C) 2008-2023
+ Portions created by the Initial Developer are Copyright (C) 2008-2025
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -33,7 +33,7 @@
}
elseif (file_exists(getenv('SystemDrive') . DIRECTORY_SEPARATOR . 'ProgramData' . DIRECTORY_SEPARATOR . 'fusionpbx' . DIRECTORY_SEPARATOR . 'config.conf')) {
$config_file = getenv('SystemDrive') . DIRECTORY_SEPARATOR . 'ProgramData' . DIRECTORY_SEPARATOR . 'fusionpbx' . DIRECTORY_SEPARATOR . 'config.conf';
- }
+ }
elseif (file_exists(__DIR__ . '/config.php')) {
//set a custom config_file variable after the config.php has been validated
$file_content = trim(file_get_contents(__DIR__ . '/config.php'));
@@ -144,4 +144,44 @@
$_SESSION['domain']['language']['code'] = $_REQUEST['view_lang_code'];
}
+//change the domain
+ if (!empty($_GET["domain_uuid"]) && is_uuid($_GET["domain_uuid"]) && $_GET["domain_change"] == "true" && permission_exists('domain_select')) {
+
+ //connect to the database
+ $database = database::new();
+
+ //include domains
+ if (file_exists($_SERVER["PROJECT_ROOT"]."/app/domains/app_config.php") && !permission_exists('domain_all')) {
+ include_once "app/domains/domains.php";
+ }
+
+ //update the domain session variables
+ $domain_uuid = $_GET["domain_uuid"];
+ $_SESSION["previous_domain_uuid"] = $_SESSION['domain_uuid'];
+ $_SESSION['domain_uuid'] = $domain_uuid;
+
+ //get the domain details
+ $sql = "select * from v_domains ";
+ $sql .= "order by domain_name asc ";
+ $domains = $database->select($sql, null, 'all');
+ if (!empty($domains)) {
+ foreach($domains as $row) {
+ $_SESSION['domains'][$row['domain_uuid']] = $row;
+ }
+ }
+ unset($sql, $domains);
+
+ //update the domain session variables
+ $_SESSION["domain_name"] = $_SESSION['domains'][$domain_uuid]['domain_name'];
+ $_SESSION['domain']['template']['name'] = $_SESSION['domains'][$domain_uuid]['template_name'] ?? null;
+ $_SESSION["context"] = $_SESSION["domain_name"];
+
+ //clear the extension array so that it is regenerated for the selected domain
+ unset($_SESSION['extension_array']);
+
+ //set the setting arrays
+ $domain = new domains();
+ $domain->set();
+ }
+
?>
diff --git a/resources/templates/provision/grandstream/dp750/{$mac}.xml b/resources/templates/provision/grandstream/dp750/{$mac}.xml
index fdf95542fd..d9dcc91f9b 100644
--- a/resources/templates/provision/grandstream/dp750/{$mac}.xml
+++ b/resources/templates/provision/grandstream/dp750/{$mac}.xml
@@ -3095,6 +3095,7 @@
{elseif $grandstream_automatic_provisioning == 3}
2
{/if}
+{/if}
diff --git a/resources/templates/provision/grandstream/grp2612/{$mac}.xml b/resources/templates/provision/grandstream/grp2612/{$mac}.xml
index d6d6634ac2..ba1ea01ede 100644
--- a/resources/templates/provision/grandstream/grp2612/{$mac}.xml
+++ b/resources/templates/provision/grandstream/grp2612/{$mac}.xml
@@ -4565,7 +4565,7 @@
-
+ - {$row.device_key_value}
{/foreach}
diff --git a/resources/templates/provision/grandstream/grp2612w/{$mac}.xml b/resources/templates/provision/grandstream/grp2612w/{$mac}.xml
index 423013911b..7a6765af35 100644
--- a/resources/templates/provision/grandstream/grp2612w/{$mac}.xml
+++ b/resources/templates/provision/grandstream/grp2612w/{$mac}.xml
@@ -4560,7 +4560,7 @@
-
+ - {$row.device_key_value}
{/foreach}
diff --git a/resources/templates/provision/grandstream/grp2613/{$mac}.xml b/resources/templates/provision/grandstream/grp2613/{$mac}.xml
index 8fe7f212a0..ab148d963c 100644
--- a/resources/templates/provision/grandstream/grp2613/{$mac}.xml
+++ b/resources/templates/provision/grandstream/grp2613/{$mac}.xml
@@ -4566,7 +4566,7 @@
-
+ - {$row.device_key_value}
{/foreach}
diff --git a/resources/templates/provision/grandstream/grp2614/{$mac}.xml b/resources/templates/provision/grandstream/grp2614/{$mac}.xml
index d6d6634ac2..ba1ea01ede 100644
--- a/resources/templates/provision/grandstream/grp2614/{$mac}.xml
+++ b/resources/templates/provision/grandstream/grp2614/{$mac}.xml
@@ -4565,7 +4565,7 @@
-
+ - {$row.device_key_value}
{/foreach}
diff --git a/resources/templates/provision/grandstream/grp2615/{$mac}.xml b/resources/templates/provision/grandstream/grp2615/{$mac}.xml
index 01b07777d0..5311dec42e 100644
--- a/resources/templates/provision/grandstream/grp2615/{$mac}.xml
+++ b/resources/templates/provision/grandstream/grp2615/{$mac}.xml
@@ -4558,7 +4558,7 @@
-
+ - {$row.device_key_value}
{/foreach}
diff --git a/resources/templates/provision/grandstream/grp2616/{$mac}.xml b/resources/templates/provision/grandstream/grp2616/{$mac}.xml
index d6d6634ac2..ba1ea01ede 100644
--- a/resources/templates/provision/grandstream/grp2616/{$mac}.xml
+++ b/resources/templates/provision/grandstream/grp2616/{$mac}.xml
@@ -4565,7 +4565,7 @@
-
+ - {$row.device_key_value}
{/foreach}
diff --git a/resources/templates/provision/grandstream/gxp2130/{$mac}.xml b/resources/templates/provision/grandstream/gxp2130/{$mac}.xml
index 9162c1b7e3..efb75a3402 100644
--- a/resources/templates/provision/grandstream/gxp2130/{$mac}.xml
+++ b/resources/templates/provision/grandstream/gxp2130/{$mac}.xml
@@ -180,6 +180,7 @@
+
{if $row.sip_transport == ''}- 1
{/if}
{if $row.sip_transport == 'udp'}- 0
{/if}
{if $row.sip_transport == 'tcp'}- 1
{/if}
@@ -913,6 +914,7 @@
- {if $grandstream_lan_port_vlan == '0'}No{else}Yes{/if}
+
@@ -2136,7 +2138,11 @@
+ {if isset($grandstream_transfer_mode_via_vpk)}
+ - {$grandstream_transfer_mode_via_vpk}
+ {else}
- BlindTransfer
+ {/if}
- Yes
diff --git a/resources/templates/provision/grandstream/gxp2135/{$mac}.xml b/resources/templates/provision/grandstream/gxp2135/{$mac}.xml
index c17ee0a6e9..e0d1b4748f 100644
--- a/resources/templates/provision/grandstream/gxp2135/{$mac}.xml
+++ b/resources/templates/provision/grandstream/gxp2135/{$mac}.xml
@@ -38,7 +38,11 @@
- {$row.server_address}:{$row.sip_port}
{/if}
+ {if isset($row.server_address_secondary)}
- {$row.server_address_secondary}:{$row.sip_port}
+ {else}
+
+ {/if}
{if $row.sip_transport != 'dns srv' && isset($row.outbound_proxy_primary)}
@@ -176,6 +180,7 @@
+
{if $row.sip_transport == ''}- 1
{/if}
{if $row.sip_transport == 'udp'}- 0
{/if}
{if $row.sip_transport == 'tcp'}- 1
{/if}
@@ -909,6 +914,7 @@
- {if $grandstream_lan_port_vlan == '0'}No{else}Yes{/if}
+
@@ -2132,7 +2138,11 @@
+ {if isset($grandstream_transfer_mode_via_vpk)}
- {$grandstream_transfer_mode_via_vpk}
+ {else}
+ - BlindTransfer
+ {/if}
- Yes
diff --git a/resources/templates/provision/grandstream/gxp2140/{$mac}.xml b/resources/templates/provision/grandstream/gxp2140/{$mac}.xml
index bb5a7f2856..bfea8b4834 100644
--- a/resources/templates/provision/grandstream/gxp2140/{$mac}.xml
+++ b/resources/templates/provision/grandstream/gxp2140/{$mac}.xml
@@ -38,7 +38,11 @@
- {$row.server_address}:{$row.sip_port}
{/if}
+ {if isset($row.server_address_secondary)}
- {$row.server_address_secondary}:{$row.sip_port}
+ {else}
+
+ {/if}
{if $row.sip_transport != 'dns srv' && isset($row.outbound_proxy_primary)}
@@ -176,10 +180,11 @@
- {if $row.sip_transport == ''}- TCP
{/if}
- {if $row.sip_transport == 'udp'}- UDP
{/if}
- {if $row.sip_transport == 'tcp'}- TCP
{/if}
- {if $row.sip_transport == 'tls'}- Tls
{/if}
+
+ {if $row.sip_transport == ''}- 1
{/if}
+ {if $row.sip_transport == 'udp'}- 0
{/if}
+ {if $row.sip_transport == 'tcp'}- 1
{/if}
+ {if $row.sip_transport == 'tls'}- 2
{/if}
@@ -2133,7 +2138,11 @@
+ {if isset($grandstream_transfer_mode_via_vpk)}
+ - {$grandstream_transfer_mode_via_vpk}
+ {else}
- BlindTransfer
+ {/if}
- Yes
@@ -3318,4 +3327,4 @@
{/foreach}
-
\ No newline at end of file
+
diff --git a/resources/templates/provision/grandstream/gxp2160/{$mac}.xml b/resources/templates/provision/grandstream/gxp2160/{$mac}.xml
index 5bfc894586..5241c940a7 100644
--- a/resources/templates/provision/grandstream/gxp2160/{$mac}.xml
+++ b/resources/templates/provision/grandstream/gxp2160/{$mac}.xml
@@ -38,7 +38,11 @@
- {$row.server_address}:{$row.sip_port}
{/if}
+ {if isset($row.server_address_secondary)}
- {$row.server_address_secondary}:{$row.sip_port}
+ {else}
+
+ {/if}
{if $row.sip_transport != 'dns srv' && isset($row.outbound_proxy_primary)}
@@ -176,10 +180,11 @@
- {if $row.sip_transport == ''}- TCP
{/if}
- {if $row.sip_transport == 'udp'}- UDP
{/if}
- {if $row.sip_transport == 'tcp'}- TCP
{/if}
- {if $row.sip_transport == 'tls'}- Tls
{/if}
+
+ {if $row.sip_transport == ''}- 1
{/if}
+ {if $row.sip_transport == 'udp'}- 0
{/if}
+ {if $row.sip_transport == 'tcp'}- 1
{/if}
+ {if $row.sip_transport == 'tls'}- 2
{/if}
@@ -2133,7 +2138,11 @@
+ {if isset($grandstream_transfer_mode_via_vpk)}
+ - {$grandstream_transfer_mode_via_vpk}
+ {else}
- BlindTransfer
+ {/if}
- Yes
@@ -3318,4 +3327,4 @@
{/foreach}
-
\ No newline at end of file
+
diff --git a/resources/templates/provision/grandstream/gxp2170/{$mac}.xml b/resources/templates/provision/grandstream/gxp2170/{$mac}.xml
index 282c33c4d4..a7e742435a 100644
--- a/resources/templates/provision/grandstream/gxp2170/{$mac}.xml
+++ b/resources/templates/provision/grandstream/gxp2170/{$mac}.xml
@@ -2138,7 +2138,11 @@
+ {if isset($grandstream_transfer_mode_via_vpk)}
+ - {$grandstream_transfer_mode_via_vpk}
+ {else}
- BlindTransfer
+ {/if}
- Yes
diff --git a/resources/templates/provision/yealink/t19p/y000000000053.cfg b/resources/templates/provision/yealink/t19p/y000000000053.cfg
index 93adec6594..48803d0214 100644
--- a/resources/templates/provision/yealink/t19p/y000000000053.cfg
+++ b/resources/templates/provision/yealink/t19p/y000000000053.cfg
@@ -345,7 +345,7 @@ voice.tone.dial =
voice.tone.ring =
voice.tone.busy =
voice.tone.congestion =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.dialrecall =
voice.tone.record=
voice.tone.info =
diff --git a/resources/templates/provision/yealink/t20p/y000000000007.cfg b/resources/templates/provision/yealink/t20p/y000000000007.cfg
index f938d6b117..b69d260aa7 100644
--- a/resources/templates/provision/yealink/t20p/y000000000007.cfg
+++ b/resources/templates/provision/yealink/t20p/y000000000007.cfg
@@ -345,7 +345,7 @@ voice.tone.dial =
voice.tone.ring =
voice.tone.busy =
voice.tone.congestion =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.dialrecall =
voice.tone.record=
voice.tone.info =
diff --git a/resources/templates/provision/yealink/t21p/y000000000052.cfg b/resources/templates/provision/yealink/t21p/y000000000052.cfg
index 6d91512935..01e9623a7f 100644
--- a/resources/templates/provision/yealink/t21p/y000000000052.cfg
+++ b/resources/templates/provision/yealink/t21p/y000000000052.cfg
@@ -348,7 +348,7 @@ voice.tone.dial =
voice.tone.ring =
voice.tone.busy =
voice.tone.congestion =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.dialrecall =
voice.tone.record=
voice.tone.info =
diff --git a/resources/templates/provision/yealink/t22p/y000000000005.cfg b/resources/templates/provision/yealink/t22p/y000000000005.cfg
index 86489cb925..5dda16ef66 100644
--- a/resources/templates/provision/yealink/t22p/y000000000005.cfg
+++ b/resources/templates/provision/yealink/t22p/y000000000005.cfg
@@ -345,7 +345,7 @@ voice.tone.dial =
voice.tone.ring =
voice.tone.busy =
voice.tone.congestion =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.dialrecall =
voice.tone.record=
voice.tone.info =
diff --git a/resources/templates/provision/yealink/t23g/y000000000044.cfg b/resources/templates/provision/yealink/t23g/y000000000044.cfg
index 1eb3657b27..a8e323982a 100644
--- a/resources/templates/provision/yealink/t23g/y000000000044.cfg
+++ b/resources/templates/provision/yealink/t23g/y000000000044.cfg
@@ -388,7 +388,7 @@ voice.tone.dial =
voice.tone.ring =
voice.tone.busy =
voice.tone.congestion =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.dialrecall =
voice.tone.record=
voice.tone.info =
diff --git a/resources/templates/provision/yealink/t23p/y000000000044.cfg b/resources/templates/provision/yealink/t23p/y000000000044.cfg
index e739493964..31e2843ed9 100644
--- a/resources/templates/provision/yealink/t23p/y000000000044.cfg
+++ b/resources/templates/provision/yealink/t23p/y000000000044.cfg
@@ -388,7 +388,7 @@ voice.tone.dial =
voice.tone.ring =
voice.tone.busy =
voice.tone.congestion =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.dialrecall =
voice.tone.record=
voice.tone.info =
diff --git a/resources/templates/provision/yealink/t26p/y000000000004.cfg b/resources/templates/provision/yealink/t26p/y000000000004.cfg
index 5594ea9d5c..a81c89353a 100644
--- a/resources/templates/provision/yealink/t26p/y000000000004.cfg
+++ b/resources/templates/provision/yealink/t26p/y000000000004.cfg
@@ -345,7 +345,7 @@ voice.tone.dial =
voice.tone.ring =
voice.tone.busy =
voice.tone.congestion =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.dialrecall =
voice.tone.record=
voice.tone.info =
diff --git a/resources/templates/provision/yealink/t27g/y000000000069.cfg b/resources/templates/provision/yealink/t27g/y000000000069.cfg
index 25d9a79260..9eac3dcf25 100644
--- a/resources/templates/provision/yealink/t27g/y000000000069.cfg
+++ b/resources/templates/provision/yealink/t27g/y000000000069.cfg
@@ -415,7 +415,7 @@ voice.tone.dial =
voice.tone.ring =
voice.tone.busy =
voice.tone.congestion =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.dialrecall =
voice.tone.record=
voice.tone.info =
diff --git a/resources/templates/provision/yealink/t27p/y000000000045.cfg b/resources/templates/provision/yealink/t27p/y000000000045.cfg
index aa949f73c0..3ba6d69310 100644
--- a/resources/templates/provision/yealink/t27p/y000000000045.cfg
+++ b/resources/templates/provision/yealink/t27p/y000000000045.cfg
@@ -388,7 +388,7 @@ voice.tone.dial =
voice.tone.ring =
voice.tone.busy =
voice.tone.congestion =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.dialrecall =
voice.tone.record=
voice.tone.info =
diff --git a/resources/templates/provision/yealink/t28p/y000000000000.cfg b/resources/templates/provision/yealink/t28p/y000000000000.cfg
index 957b4b14a4..e551d48541 100644
--- a/resources/templates/provision/yealink/t28p/y000000000000.cfg
+++ b/resources/templates/provision/yealink/t28p/y000000000000.cfg
@@ -345,7 +345,7 @@ voice.tone.dial =
voice.tone.ring =
voice.tone.busy =
voice.tone.congestion =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.dialrecall =
voice.tone.record=
voice.tone.info =
diff --git a/resources/templates/provision/yealink/t31g/y000000000123.cfg b/resources/templates/provision/yealink/t31g/y000000000123.cfg
index 2be6e5b330..e8d856cbaf 100644
--- a/resources/templates/provision/yealink/t31g/y000000000123.cfg
+++ b/resources/templates/provision/yealink/t31g/y000000000123.cfg
@@ -345,7 +345,7 @@ voice.tone.dial =
voice.tone.ring =
voice.tone.busy =
voice.tone.congestion =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.dialrecall =
voice.tone.record=
voice.tone.info =
diff --git a/resources/templates/provision/yealink/t32g/y000000000032.cfg b/resources/templates/provision/yealink/t32g/y000000000032.cfg
index 4de4d68f80..1bae73dae1 100644
--- a/resources/templates/provision/yealink/t32g/y000000000032.cfg
+++ b/resources/templates/provision/yealink/t32g/y000000000032.cfg
@@ -345,7 +345,7 @@ voice.tone.dial =
voice.tone.ring =
voice.tone.busy =
voice.tone.congestion =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.dialrecall =
voice.tone.record=
voice.tone.info =
diff --git a/resources/templates/provision/yealink/t33g/y000000000124.cfg b/resources/templates/provision/yealink/t33g/y000000000124.cfg
index bd32331e85..b752b2892f 100644
--- a/resources/templates/provision/yealink/t33g/y000000000124.cfg
+++ b/resources/templates/provision/yealink/t33g/y000000000124.cfg
@@ -587,7 +587,7 @@ voice.tone.message =
voice.tone.stutter =
voice.tone.info =
voice.tone.dialrecall =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.congestion =
voice.tone.busy =
voice.tone.ring =
diff --git a/resources/templates/provision/yealink/t34w/y000000000171.cfg b/resources/templates/provision/yealink/t34w/y000000000171.cfg
index bad6f90653..60cd0820db 100644
--- a/resources/templates/provision/yealink/t34w/y000000000171.cfg
+++ b/resources/templates/provision/yealink/t34w/y000000000171.cfg
@@ -583,7 +583,7 @@ voice.tone.message =
voice.tone.stutter =
voice.tone.info =
voice.tone.dialrecall =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.congestion =
voice.tone.busy =
voice.tone.ring =
diff --git a/resources/templates/provision/yealink/t38g/y000000000038.cfg b/resources/templates/provision/yealink/t38g/y000000000038.cfg
index 2332790ae4..7d026b31ed 100644
--- a/resources/templates/provision/yealink/t38g/y000000000038.cfg
+++ b/resources/templates/provision/yealink/t38g/y000000000038.cfg
@@ -345,7 +345,7 @@ voice.tone.dial =
voice.tone.ring =
voice.tone.busy =
voice.tone.congestion =
-voice.tone.callwaiting =
+voice.tone.callwaiting ={$yealink_voice_tone_callwaiting}
voice.tone.dialrecall =
voice.tone.record=
voice.tone.info =
diff --git a/resources/templates/provision/yealink/t40g/y000000000076.cfg b/resources/templates/provision/yealink/t40g/y000000000076.cfg
index b98b1f2c47..38bb3217ca 100644
--- a/resources/templates/provision/yealink/t40g/y000000000076.cfg
+++ b/resources/templates/provision/yealink/t40g/y000000000076.cfg
@@ -389,7 +389,7 @@ voice.tone.dial =
voice.tone.ring =
voice.tone.busy =
voice.tone.congestion =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.dialrecall =
voice.tone.record=
voice.tone.info =
diff --git a/resources/templates/provision/yealink/t40p/y000000000054.cfg b/resources/templates/provision/yealink/t40p/y000000000054.cfg
index 3b28106b01..334b6b2b87 100644
--- a/resources/templates/provision/yealink/t40p/y000000000054.cfg
+++ b/resources/templates/provision/yealink/t40p/y000000000054.cfg
@@ -389,7 +389,7 @@ voice.tone.dial =
voice.tone.ring =
voice.tone.busy =
voice.tone.congestion =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.dialrecall =
voice.tone.record=
voice.tone.info =
diff --git a/resources/templates/provision/yealink/t41p/y000000000036.cfg b/resources/templates/provision/yealink/t41p/y000000000036.cfg
index 6c806ae80a..9bbb8eb370 100644
--- a/resources/templates/provision/yealink/t41p/y000000000036.cfg
+++ b/resources/templates/provision/yealink/t41p/y000000000036.cfg
@@ -389,7 +389,7 @@ voice.tone.dial =
voice.tone.ring =
voice.tone.busy =
voice.tone.congestion =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.dialrecall =
voice.tone.record=
voice.tone.info =
diff --git a/resources/templates/provision/yealink/t41s/y000000000068.cfg b/resources/templates/provision/yealink/t41s/y000000000068.cfg
index 2862ff4756..ef5f836658 100644
--- a/resources/templates/provision/yealink/t41s/y000000000068.cfg
+++ b/resources/templates/provision/yealink/t41s/y000000000068.cfg
@@ -506,7 +506,7 @@ voice.tone.message =
voice.tone.stutter =
voice.tone.info =
voice.tone.dialrecall =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.congestion =
voice.tone.busy =
voice.tone.ring =
diff --git a/resources/templates/provision/yealink/t42g/y000000000029.cfg b/resources/templates/provision/yealink/t42g/y000000000029.cfg
index 3bea4a228a..bd56c1c9d1 100644
--- a/resources/templates/provision/yealink/t42g/y000000000029.cfg
+++ b/resources/templates/provision/yealink/t42g/y000000000029.cfg
@@ -389,7 +389,7 @@ voice.tone.dial =
voice.tone.ring =
voice.tone.busy =
voice.tone.congestion =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.dialrecall =
voice.tone.record=
voice.tone.info =
diff --git a/resources/templates/provision/yealink/t42s/y000000000067.cfg b/resources/templates/provision/yealink/t42s/y000000000067.cfg
index 89daaa77f1..45ba6f99d8 100644
--- a/resources/templates/provision/yealink/t42s/y000000000067.cfg
+++ b/resources/templates/provision/yealink/t42s/y000000000067.cfg
@@ -514,7 +514,7 @@ voice.tone.message =
voice.tone.stutter =
voice.tone.info =
voice.tone.dialrecall =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.congestion =
voice.tone.busy =
voice.tone.ring =
diff --git a/resources/templates/provision/yealink/t42u/y000000000116.cfg b/resources/templates/provision/yealink/t42u/y000000000116.cfg
index c6a09572ee..965cdddcdf 100644
--- a/resources/templates/provision/yealink/t42u/y000000000116.cfg
+++ b/resources/templates/provision/yealink/t42u/y000000000116.cfg
@@ -390,7 +390,7 @@ voice.tone.dial =
voice.tone.ring =
voice.tone.busy =
voice.tone.congestion =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.dialrecall =
voice.tone.record=
voice.tone.info =
diff --git a/resources/templates/provision/yealink/t43u/y000000000107.cfg b/resources/templates/provision/yealink/t43u/y000000000107.cfg
index b39eb434bf..1c7c58c8e6 100644
--- a/resources/templates/provision/yealink/t43u/y000000000107.cfg
+++ b/resources/templates/provision/yealink/t43u/y000000000107.cfg
@@ -592,7 +592,7 @@ voice.tone.message =
voice.tone.stutter =
voice.tone.info =
voice.tone.dialrecall =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.congestion =
voice.tone.busy =
voice.tone.ring =
diff --git a/resources/templates/provision/yealink/t44w/y000000000174.cfg b/resources/templates/provision/yealink/t44w/y000000000174.cfg
index 3b86ac782b..26bd0f70f5 100644
--- a/resources/templates/provision/yealink/t44w/y000000000174.cfg
+++ b/resources/templates/provision/yealink/t44w/y000000000174.cfg
@@ -583,7 +583,7 @@ voice.tone.message =
voice.tone.stutter =
voice.tone.info =
voice.tone.dialrecall =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.congestion =
voice.tone.busy =
voice.tone.ring =
diff --git a/resources/templates/provision/yealink/t46g/y000000000028.cfg b/resources/templates/provision/yealink/t46g/y000000000028.cfg
index dbd99e8694..c6a9869f5b 100644
--- a/resources/templates/provision/yealink/t46g/y000000000028.cfg
+++ b/resources/templates/provision/yealink/t46g/y000000000028.cfg
@@ -415,7 +415,7 @@ voice.tone.dial =
voice.tone.ring =
voice.tone.busy =
voice.tone.congestion =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.dialrecall =
voice.tone.record=
voice.tone.info =
diff --git a/resources/templates/provision/yealink/t46s/y000000000066.cfg b/resources/templates/provision/yealink/t46s/y000000000066.cfg
index c5da815c47..385cff7030 100644
--- a/resources/templates/provision/yealink/t46s/y000000000066.cfg
+++ b/resources/templates/provision/yealink/t46s/y000000000066.cfg
@@ -504,7 +504,7 @@ voice.tone.message =
voice.tone.stutter =
voice.tone.info =
voice.tone.dialrecall =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.congestion =
voice.tone.busy =
voice.tone.ring =
diff --git a/resources/templates/provision/yealink/t46u/y000000000108.cfg b/resources/templates/provision/yealink/t46u/y000000000108.cfg
index 56e9b72bee..1e6c278c53 100644
--- a/resources/templates/provision/yealink/t46u/y000000000108.cfg
+++ b/resources/templates/provision/yealink/t46u/y000000000108.cfg
@@ -583,7 +583,7 @@ voice.tone.message =
voice.tone.stutter =
voice.tone.info =
voice.tone.dialrecall =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.congestion =
voice.tone.busy =
voice.tone.ring =
diff --git a/resources/templates/provision/yealink/t48g/y000000000035.cfg b/resources/templates/provision/yealink/t48g/y000000000035.cfg
index 63fcb73965..cbfd25d992 100644
--- a/resources/templates/provision/yealink/t48g/y000000000035.cfg
+++ b/resources/templates/provision/yealink/t48g/y000000000035.cfg
@@ -415,7 +415,7 @@ voice.tone.dial =
voice.tone.ring =
voice.tone.busy =
voice.tone.congestion =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.dialrecall =
voice.tone.record=
voice.tone.info =
diff --git a/resources/templates/provision/yealink/t48s/y000000000065.cfg b/resources/templates/provision/yealink/t48s/y000000000065.cfg
index 13eaa23b0a..4bf277a828 100644
--- a/resources/templates/provision/yealink/t48s/y000000000065.cfg
+++ b/resources/templates/provision/yealink/t48s/y000000000065.cfg
@@ -547,7 +547,7 @@ voice.tone.message =
voice.tone.stutter =
voice.tone.info =
voice.tone.dialrecall =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.congestion =
voice.tone.busy =
voice.tone.ring =
diff --git a/resources/templates/provision/yealink/t48u/y000000000109.cfg b/resources/templates/provision/yealink/t48u/y000000000109.cfg
index 2b78c228a6..5c72d90307 100644
--- a/resources/templates/provision/yealink/t48u/y000000000109.cfg
+++ b/resources/templates/provision/yealink/t48u/y000000000109.cfg
@@ -584,7 +584,7 @@ voice.tone.message =
voice.tone.stutter =
voice.tone.info =
voice.tone.dialrecall =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.congestion =
voice.tone.busy =
voice.tone.ring =
diff --git a/resources/templates/provision/yealink/t49g/y000000000051.cfg b/resources/templates/provision/yealink/t49g/y000000000051.cfg
index 71431e69ae..7840103ffb 100644
--- a/resources/templates/provision/yealink/t49g/y000000000051.cfg
+++ b/resources/templates/provision/yealink/t49g/y000000000051.cfg
@@ -348,7 +348,7 @@ voice.tone.dial =
voice.tone.ring =
voice.tone.busy =
voice.tone.congestion =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.dialrecall =
voice.tone.record=
voice.tone.info =
diff --git a/resources/templates/provision/yealink/t52s/y000000000074.cfg b/resources/templates/provision/yealink/t52s/y000000000074.cfg
index 212066fde5..99e35915da 100644
--- a/resources/templates/provision/yealink/t52s/y000000000074.cfg
+++ b/resources/templates/provision/yealink/t52s/y000000000074.cfg
@@ -513,7 +513,7 @@ voice.tone.message =
voice.tone.stutter =
voice.tone.info =
voice.tone.dialrecall =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.congestion =
voice.tone.busy =
voice.tone.ring =
diff --git a/resources/templates/provision/yealink/t53/y000000000095.cfg b/resources/templates/provision/yealink/t53/y000000000095.cfg
index 9e8d6c0898..39e8559d7c 100644
--- a/resources/templates/provision/yealink/t53/y000000000095.cfg
+++ b/resources/templates/provision/yealink/t53/y000000000095.cfg
@@ -577,7 +577,7 @@ voice.tone.message =
voice.tone.stutter =
voice.tone.info =
voice.tone.dialrecall =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.congestion =
voice.tone.busy =
voice.tone.ring =
diff --git a/resources/templates/provision/yealink/t53w/y000000000095.cfg b/resources/templates/provision/yealink/t53w/y000000000095.cfg
index 8de973caab..c90bc85e84 100644
--- a/resources/templates/provision/yealink/t53w/y000000000095.cfg
+++ b/resources/templates/provision/yealink/t53w/y000000000095.cfg
@@ -577,7 +577,7 @@ voice.tone.message =
voice.tone.stutter =
voice.tone.info =
voice.tone.dialrecall =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.congestion =
voice.tone.busy =
voice.tone.ring =
diff --git a/resources/templates/provision/yealink/t54s/y000000000070.cfg b/resources/templates/provision/yealink/t54s/y000000000070.cfg
index 26daf869c7..faaeb51d29 100644
--- a/resources/templates/provision/yealink/t54s/y000000000070.cfg
+++ b/resources/templates/provision/yealink/t54s/y000000000070.cfg
@@ -512,7 +512,7 @@ voice.tone.message =
voice.tone.stutter =
voice.tone.info =
voice.tone.dialrecall =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.congestion =
voice.tone.busy =
voice.tone.ring =
diff --git a/resources/templates/provision/yealink/t54w/y000000000096.cfg b/resources/templates/provision/yealink/t54w/y000000000096.cfg
index 038dee41d5..7ab6b92242 100644
--- a/resources/templates/provision/yealink/t54w/y000000000096.cfg
+++ b/resources/templates/provision/yealink/t54w/y000000000096.cfg
@@ -576,7 +576,7 @@ voice.tone.message =
voice.tone.stutter =
voice.tone.info =
voice.tone.dialrecall =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.congestion =
voice.tone.busy =
voice.tone.ring =
diff --git a/resources/templates/provision/yealink/t56a/y000000000056.cfg b/resources/templates/provision/yealink/t56a/y000000000056.cfg
index b4370cde62..26f43b88b9 100644
--- a/resources/templates/provision/yealink/t56a/y000000000056.cfg
+++ b/resources/templates/provision/yealink/t56a/y000000000056.cfg
@@ -406,7 +406,7 @@ voice.tone.dial =
voice.tone.ring =
voice.tone.busy =
voice.tone.congestion =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.dialrecall =
voice.tone.info =
voice.tone.stutter =
diff --git a/resources/templates/provision/yealink/t57w/y000000000097.cfg b/resources/templates/provision/yealink/t57w/y000000000097.cfg
index 1298611792..46ec0cfd82 100644
--- a/resources/templates/provision/yealink/t57w/y000000000097.cfg
+++ b/resources/templates/provision/yealink/t57w/y000000000097.cfg
@@ -575,7 +575,7 @@ voice.tone.message =
voice.tone.stutter =
voice.tone.info =
voice.tone.dialrecall =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.congestion =
voice.tone.busy =
voice.tone.ring =
diff --git a/resources/templates/provision/yealink/t58a/y000000000058.cfg b/resources/templates/provision/yealink/t58a/y000000000058.cfg
index a55d881d51..42b0c97b89 100644
--- a/resources/templates/provision/yealink/t58a/y000000000058.cfg
+++ b/resources/templates/provision/yealink/t58a/y000000000058.cfg
@@ -407,7 +407,7 @@ voice.tone.dial =
voice.tone.ring =
voice.tone.busy =
voice.tone.congestion =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.dialrecall =
voice.tone.info =
voice.tone.stutter =
diff --git a/resources/templates/provision/yealink/t58v/y000000000058.cfg b/resources/templates/provision/yealink/t58v/y000000000058.cfg
index d6f1d37cbb..bb0e9db32a 100644
--- a/resources/templates/provision/yealink/t58v/y000000000058.cfg
+++ b/resources/templates/provision/yealink/t58v/y000000000058.cfg
@@ -407,7 +407,7 @@ voice.tone.dial =
voice.tone.ring =
voice.tone.busy =
voice.tone.congestion =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.dialrecall =
voice.tone.info =
voice.tone.stutter =
diff --git a/resources/templates/provision/yealink/t58w/y000000000150.cfg b/resources/templates/provision/yealink/t58w/y000000000150.cfg
index 33088d15f4..cdc33e62bc 100644
--- a/resources/templates/provision/yealink/t58w/y000000000150.cfg
+++ b/resources/templates/provision/yealink/t58w/y000000000150.cfg
@@ -458,7 +458,7 @@ voice.tone.dial =
voice.tone.ring =
voice.tone.busy =
voice.tone.congestion =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
voice.tone.dialrecall =
voice.tone.info =
voice.tone.stutter =
diff --git a/resources/templates/provision/yealink/w60b/y000000000077.cfg b/resources/templates/provision/yealink/w60b/y000000000077.cfg
index 1355ac3120..08a3ea8e8c 100644
--- a/resources/templates/provision/yealink/w60b/y000000000077.cfg
+++ b/resources/templates/provision/yealink/w60b/y000000000077.cfg
@@ -486,7 +486,7 @@ voice.tone.country = {$yealink_voice_tone_country}
voice.tone.dial =
voice.tone.ring =
voice.tone.busy =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
#######################################################################################
diff --git a/resources/templates/provision/yealink/w70b/y000000000146.cfg b/resources/templates/provision/yealink/w70b/y000000000146.cfg
index 7aa9e79902..41b0ffc444 100644
--- a/resources/templates/provision/yealink/w70b/y000000000146.cfg
+++ b/resources/templates/provision/yealink/w70b/y000000000146.cfg
@@ -480,7 +480,7 @@ voice.tone.country = {$yealink_voice_tone_country}
voice.tone.dial =
voice.tone.ring =
voice.tone.busy =
-voice.tone.callwaiting =
+voice.tone.callwaiting = {$yealink_voice_tone_callwaiting}
#######################################################################################
diff --git a/resources/templates/provision/yealink/w80/directory.xml b/resources/templates/provision/yealink/w80/directory.xml
new file mode 100644
index 0000000000..86c7b6f8b5
--- /dev/null
+++ b/resources/templates/provision/yealink/w80/directory.xml
@@ -0,0 +1,91 @@
+
+{foreach $contacts as $row}
+{if $smarty.get.contacts == "users" && $row.category == "users"}
+
+{if $row.contact_organization && $row.contact_name_given && $row.contact_name_family}
+ {$row.contact_organization}, {$row.contact_name_given} {$row.contact_name_family}
+{elseif $row.contact_organization && $row.contact_name_given == "" && $row.contact_name_family == ""}
+ {$row.contact_organization}
+{elseif $row.contact_name_given && $row.contact_name_family && $row.contact_organization == ""}
+ {$row.contact_name_given} {$row.contact_name_family}
+{elseif $row.contact_name_given && $row.contact_name_family}
+ {$row.contact_name_given} {$row.contact_name_family}
+{elseif $row.contact_name_given}
+ {$row.contact_name_given}
+{elseif $row.contact_name_family}
+ {$row.contact_name_family}
+{/if}
+{foreach $row.numbers as $number}
+{if $number.phone_number}
+ {$number.phone_number}
+{else}
+ {$number.phone_extension}
+{/if}
+{/foreach}
+
+{elseif $smarty.get.contacts == "groups" && $row.category == "groups"}
+
+{if $row.contact_organization && $row.contact_name_given && $row.contact_name_family}
+ {$row.contact_organization}, {$row.contact_name_given} {$row.contact_name_family}
+{elseif $row.contact_organization && $row.contact_name_given == "" && $row.contact_name_family == ""}
+ {$row.contact_organization}
+{elseif $row.contact_name_given && $row.contact_name_family && $row.contact_organization == ""}
+ {$row.contact_name_given} {$row.contact_name_family}
+{elseif $row.contact_name_given && $row.contact_name_family}
+ {$row.contact_name_given} {$row.contact_name_family}
+{elseif $row.contact_name_given}
+ {$row.contact_name_given}
+{elseif $row.contact_name_family}
+ {$row.contact_name_family}
+{/if}
+{foreach $row.numbers as $number}
+{if $number.phone_number}
+ {$number.phone_number}
+{else}
+ {$number.phone_extension}
+{/if}
+{/foreach}
+
+{elseif $smarty.get.contacts == "extensions" && $row.category == "extensions"}
+
+{if $row.contact_name_given}
+ {$row.contact_name_given} {$row.contact_name_family}
+{else}
+ {$row.effective_caller_id_name}
+{/if}
+{if $row.phone_number}
+ {$row.phone_number}
+{else}
+ {$row.phone_extension}
+{/if}
+
+{elseif $smarty.get.contacts == "all"}
+
+{if $row.contact_organization && $row.contact_name_given && $row.contact_name_family}
+ {$row.contact_organization}, {$row.contact_name_given} {$row.contact_name_family}
+{elseif $row.contact_organization && $row.contact_name_given == "" && $row.contact_name_family == ""}
+ {$row.contact_organization}
+{elseif $row.contact_name_given && $row.contact_name_family && $row.contact_organization == ""}
+ {$row.contact_name_given} {$row.contact_name_family}
+{elseif $row.contact_name_given && $row.contact_name_family}
+ {$row.contact_name_given} {$row.contact_name_family}
+{elseif $row.contact_name_given}
+ {$row.contact_name_given}
+{elseif $row.contact_name_family}
+ {$row.contact_name_family}
+{/if}
+{if isset($row.numbers)}
+{foreach $row.numbers as $number}
+{if $number.phone_number}
+ {$number.phone_number}
+{else}
+ {$number.phone_extension}
+{/if}
+{/foreach}
+{else}
+ {$row.phone_extension}
+{/if}
+
+{/if}
+{/foreach}
+
diff --git a/resources/templates/provision/yealink/w80/favorite_setting.xml b/resources/templates/provision/yealink/w80/favorite_setting.xml
new file mode 100644
index 0000000000..ba7275358e
--- /dev/null
+++ b/resources/templates/provision/yealink/w80/favorite_setting.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/resources/templates/provision/yealink/w80/y000000000000.boot b/resources/templates/provision/yealink/w80/y000000000000.boot
new file mode 100644
index 0000000000..9c21b8e4b2
--- /dev/null
+++ b/resources/templates/provision/yealink/w80/y000000000000.boot
@@ -0,0 +1,9 @@
+#!version:1.0.0.1
+## The header above must appear as-is in the first line
+
+#include:config
+include:config "y000000000175"
+include:config "{$mac}.cfg"
+
+#overwrite_mode = 1
+overwrite_mode = {$yealink_overwrite_mode}
\ No newline at end of file
diff --git a/resources/templates/provision/yealink/w80/y000000000175.cfg b/resources/templates/provision/yealink/w80/y000000000175.cfg
new file mode 100644
index 0000000000..30334562a4
--- /dev/null
+++ b/resources/templates/provision/yealink/w80/y000000000175.cfg
@@ -0,0 +1,937 @@
+#!version:1.0.0.1
+
+##File header "#!version:1.0.0.1" can not be edited or deleted.##
+
+#######################################################################################
+## Network ##
+#######################################################################################
+static.network.internet_port.type =
+static.network.internet_port.ip =
+static.network.internet_port.mask =
+static.network.internet_port.gateway =
+static.network.static_dns_enable = 1{else}static.network.static_dns_enable = 0{/if}
+static.network.primary_dns = {$dns_server_primary}
+static.network.secondary_dns = {$dns_server_secondary}
+
+static.network.static_nat.enable = {if isset($yealink_static_nat)}1{else}0{/if}
+static.network.static_nat.addr = {$yealink_static_nat}
+static.ice.enable =
+static.sip.nat_stun.enable =
+static.sip.nat_stun.port = {if isset($stun_port)}{$stun_port}{else}3478{/if}
+static.sip.nat_stun.server =
+static.sip.nat_turn.enable =
+static.sip.nat_turn.server =
+static.sip.nat_turn.port =
+static.sip.nat_turn.username =
+static.sip.nat_turn.password =
+
+static.network.lldp.enable = {$yealink_lldp_enable}
+static.network.lldp.packet_interval = {$yealink_lldp_packet_interval}
+
+static.network.cdp.enable = {$yealink_cdp_enable}
+static.network.cdp.packet_interval = {$yealink_cdp_packet_interval}
+
+
+static.network.vlan.internet_port_enable = {$yealink_vlan_enable}
+static.network.vlan.internet_port_vid = {$yealink_vlan_id}
+static.network.vlan.internet_port_priority = {$yealink_vlan_cos}
+static.network.vlan.dhcp_enable =
+static.network.vlan.dhcp_option =
+static.network.vlan.vlan_change.enable =
+
+static.network.qos.audiotos =
+static.network.qos.signaltos =
+
+static.network.port.max_rtpport =
+static.network.port.min_rtpport =
+
+static.wui.http_enable =
+static.wui.https_enable =
+static.network.port.http =
+static.network.port.https =
+
+static.network.802_1x.mode =
+static.network.802_1x.eap_fast_provision_mode =
+static.network.802_1x.anonymous_identity =
+static.network.802_1x.identity =
+static.network.802_1x.md5_password =
+static.network.802_1x.root_cert_url =
+static.network.802_1x.client_cert_url =
+
+sip.reg_surge_prevention =
+
+#######################################################################################
+## OpenVPN ##
+#######################################################################################
+static.network.vpn_enable = {$yealink_network_vpn_enable}
+static.openvpn.url = {$yealink_openvpn_url}
+
+#######################################################################################
+## Network Other ##
+#######################################################################################
+static.network.dhcp_host_name =
+static.network.dhcp.option60type =
+static.network.attempt_expired_time =
+static.network.mtu_value =
+
+
+#######################################################################################
+## Features ##
+#######################################################################################
+call_waiting.enable = {$yealink_call_waiting}
+call_waiting.tone = {$yealink_call_waiting_tone}
+call_waiting.off_code =
+call_waiting.on_code =
+call_waiting.mode =
+
+features.key_as_send =
+sip.use_23_as_pound =
+features.busy_tone_delay =
+
+features.normal_refuse_code =
+features.dnd_refuse_code =
+
+sip.rfc2543_hold = {$yealink_rfc2543_hold}
+
+#Enable or disable the phone to keep sending the SIP messages to the outbound server; 0-Disabled, 1-Enabled (default);
+sip.use_out_bound_in_dialog =
+
+#Enable or disable the phone to deal the 180 SIP message after the 183 SIP message; 0-Disabled, 1-Enabled (default);
+phone_setting.is_deal180 =
+
+#Enable or disable the phone to save the call history; 0-Disabled, 1-Enabled (default);
+features.save_call_history =
+
+#######################################################################################
+## DTMF ##
+#######################################################################################
+features.dtmf.hide = {$yealink_dtmf_hide}
+features.dtmf.hide_delay =
+features.dtmf.duration =
+features.dtmf.volume =
+features.dtmf.repetition =
+
+forward.international.enable =
+
+features.fwd_diversion_enable =
+
+#Configure the overtime (in minutes) of logging web user interface. It ranges from 1 to 1000, the default value is 5.
+features.relog_offtime =
+features.call_num_filter =
+sip.trust_ctrl = {$yealink_trust_ctrl}
+features.voice_mail_tone_enable =
+features.voice_mail_alert.enable =
+features.reboot_in_talk_enable =
+features.caller_name_type_on_dialing =
+phone_setting.end_call_on_hook.enable =
+base.active_handset.number =
+
+features.call.dialtone_time_out =
+##v81 Add
+features.ringer_device.is_use_headset = {$yealink_headset_ringer}
+features.rtp_symmetric.enable =
+
+
+#######################################################################################
+## Transfer ##
+#######################################################################################
+#Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call;
+#0-Disabled, 1-Enabled (default);
+transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended}
+
+#Enable or disable the phone to complete the blind or attended transfer through on-hook;
+#0-Disabled (default), 1-Enabled;
+transfer.blind_tran_on_hook_enable = {$yealink_transfer_blind_on_hook}
+transfer.on_hook_trans_enable = {$yealink_transfer_onhook}
+
+
+#######################################################################################
+## Phone Lock ##
+#######################################################################################
+phone_setting.emergency.number = {$yealink_emergency_number}
+
+#######################################################################################
+## Power Led Settings ##
+#######################################################################################
+phone_setting.common_power_led_enable =
+phone_setting.ring_power_led_flash_enable =
+phone_setting.mail_power_led_flash_enable = 1
+phone_setting.missed_call_power_led_flash.enable = {$yealink_missed_call_power_led_flash_enable}
+
+#######################################################################################
+## Watch Dog ##
+#######################################################################################
+static.watch_dog.enable =
+
+#######################################################################################
+## Time&Date ##
+#######################################################################################
+local_time.dhcp_time = {$yealink_dhcp_time}
+local_time.manual_time_enable =
+local_time.time_zone = {$yealink_time_zone}
+local_time.time_zone_name = {$yealink_time_zone_name}
+local_time.summer_time = {$yealink_summer_time}
+local_time.dst_time_type = {$yealink_dst_type}
+local_time.start_time = {$yealink_time_zone_start_time}
+local_time.end_time = {$yealink_time_zone_end_time}
+local_time.offset_time = {$yealink_offset_time}
+local_time.manual_ntp_srv_prior =
+local_time.ntp_server1 = {$ntp_server_primary}
+local_time.ntp_server2 = {$ntp_server_secondary}
+local_time.interval = {$yealink_time_update}
+local_time.time_format = {$yealink_time_format}
+local_time.date_format = {$yealink_date_format}
+lcl.datetime.date.format =
+auto_dst.url = {$yealink_auto_dst_url}
+
+#######################################################################################
+## Call Display ##
+#######################################################################################
+phone_setting.called_party_info_display.enable =
+phone_setting.call_info_display_method = {$yealink_call_info_display_method}
+
+#######################################################################################
+## Base_Upgrade ##
+#######################################################################################
+static.firmware.url = {$yealink_firmware_url}/{$yealink_firmware_w80}
+
+#######################################################################################
+## Handset_upgrade ##
+#######################################################################################
+over_the_air.url =
+over_the_air.url.w53h = {$yealink_firmware_url}/{$yealink_w53h_handset_firmware_url}
+over_the_air.url.w56h = {$yealink_firmware_url}/{$yealink_w56h_handset_firmware_url}
+over_the_air.url.cp930w = {$yealink_firmware_url}/{$yealink_cp930w_firmware_url}
+over_the_air.url.cp935w = {$yealink_firmware_url}/{$yealink_cp935w_firmware_url}
+over_the_air.url.t41s_dd10k = {$yealink_firmware_url}/{$yealink_t41s_dd10k_firmware_url}
+over_the_air.url.w59r = {$yealink_firmware_url}/{$yealink_w59r_handset_firmware_url}
+over_the_air.url.w57r = {$yealink_firmware_url}/{$yealink_w57r_handset_firmware_url}
+over_the_air.url.w73h = {$yealink_firmware_url}/{$yealink_w73h_handset_firmware_url}
+over_the_air.url.w78h = {$yealink_firmware_url}/{$yealink_w78h_handset_firmware_url}
+over_the_air.base_trigger = 1
+over_the_air.handset_trigger =
+over_the_air.handset_tip = 1
+#W80B ADD
+over_the_air.mode = {$yealink_over_the_air_mode}
+
+#######################################################################################
+## Auto Provisioning ##
+#######################################################################################
+
+#Enable or disable the Plug and Play feature; 0-Disabled, 1-Enabled(default);
+static.auto_provision.pnp_enable =
+
+#Enable or disable the DHCP option mode; 0-Disabled, 1-Enabled (default);
+static.auto_provision.dhcp_option.enable =
+
+#Configure the custom DHCP option number. It ranges from 128 to 254.
+static.auto_provision.dhcp_option.list_user_options =
+
+#Configure the value (manufacturer of the device) of DHCP option 60.
+static.auto_provision.dhcp_option.option60_value =
+
+#Configure the URL of the auto provisioning server.
+static.auto_provision.server.url = {$yealink_provision_url}
+
+#Configure the username and password for downloading.
+static.auto_provision.server.username = {$http_auth_username}
+static.auto_provision.server.password = {$http_auth_password}
+
+static.auto_provision.attempt_expired_time =
+
+#Configure AES key (16 characters) for decrypting the common CFG file.
+static.auto_provision.aes_key_16.com =
+
+#Configure AES key (16 characters) for decrypting the MAC-Oriented CFG file.
+static.auto_provision.aes_key_16.mac =
+
+#Enable or disable the phone to check new configuration when powered on; 0-Disabled, 1-Enabled (default);
+static.auto_provision.power_on = {$yealink_autop_power_on}
+
+#Enable or disable the phone to check the new configuration repeatedly; 0-Disabled (default), 1-Enabled;
+static.auto_provision.repeat.enable = {$yealink_autop_repeat_enable}
+
+#Configure the interval (in minutes) the phone repeatedly checks the new configuration. The default is 1440.
+static.auto_provision.repeat.minutes = {$yealink_autop_repeat_minutes}
+
+#Enable or disable the phone to check the new configuration weekly; 0-Disabled (default), 1-Enabled;
+static.auto_provision.weekly.enable = {$yealink_autop_weekly_enable}
+
+static.auto_provision.weekly_upgrade_interval = {$yealink_autop_weekly_interval}
+static.auto_provision.inactivity_time_expire =
+
+#Configure the week time the phone checks the new configuration. Applicable when the auto provisioning mode is configured as weekly or power on + weekly.
+static.auto_provision.weekly.begin_time = {$yealink_autop_weekly_begin_time}
+static.auto_provision.weekly.end_time = {$yealink_autop_weekly_end_time}
+static.auto_provision.weekly.dayofweek = {$yealink_autop_weekly_dayofweek}
+
+static.auto_provision.flexible.enable =
+static.auto_provision.flexible.interval=
+static.auto_provision.flexible.begin_time =
+static.auto_provision.flexible.end_time =
+
+static.auto_provision.aes_key_in_file =
+static.auto_provision.encryption.config =
+
+static.auto_provision.url_wildcard.pn =
+static.auto_provision.reboot_force.enable =
+
+static.auto_provision.custom.protect =
+static.auto_provision.local_log.backup.enable =
+static.auto_provision.local_log.backup.path =
+static.auto_provision.local_log.backup.upload_period =
+static.auto_provision.local_log.backup.append =
+static.auto_provision.local_log.backup.append.limit_mode =
+static.auto_provision.local_log.backup.append.max_file_size =
+static.auto_provision.local_log.backup.bootlog.upload_wait_time =
+static.auto_provision.attempt_before_failed =
+static.auto_provision.retry_delay_after_file_transfer_failed =
+static.auto_provision.custom.sync =
+static.auto_provision.custom.sync.path =
+static.auto_provision.custom.upload_method =
+static.auto_provision.server.type =
+static.auto_provision.user_agent_mac.enable =
+static.auto_provision.update_file_mode =
+static.auto_provision.dns_resolv_nosys =
+static.auto_provision.dns_resolv_nretry =
+static.auto_provision.dns_resolv_timeout =
+
+#######################################################################################
+## All Base Diagnostics ##
+#######################################################################################
+static.diagnose.server.port =
+static.diagnose.server.username =
+static.diagnose.server.url =
+static.diagnose.server.password =
+static.diagnose.type =
+static.diagnose.pcap.max_size =
+static.diagnose.log.max_size =
+
+
+#######################################################################################
+## log Setting ##
+#######################################################################################
+static.local_log.enable =
+static.local_log.level =
+static.local_log.max_file_size =
+
+static.syslog.enable =
+static.syslog.server =
+static.syslog.server_port =
+static.syslog.transport_type =
+static.syslog.level =
+static.syslog.facility =
+static.syslog.prepend_mac_address.enable =
+
+
+#######################################################################################
+## Dial Plan ##
+#######################################################################################
+#Configure the replace rule. X ranges from 1 to 10;
+#dialplan.replace.prefix.x =
+#dialplan.replace.replace.x =
+#dialplan.replace.line_id.x =
+dialplan.replace.prefix.1 =
+dialplan.replace.replace.1 =
+dialplan.replace.line_id.1 =
+dialplan_replace_rule.url =
+
+###X ranges from 1 to 20
+###dialplan.dialnow.rule.X =
+###dialplan.dialnow.line_id.X =
+dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1}
+dialplan.dialnow.line_id.1 =
+phone_setting.dialnow_delay = {$yealink_dialplan_dialnow_delay}
+dialplan_dialnow.url =
+
+#Configure the area code.
+dialplan.area_code.code =
+dialplan.area_code.min_len =
+dialplan.area_code.max_len =
+
+#When applying the rule to multiple lines, each line ID separated by comma.
+#e.g. dialplan.area_code.line_id = 1, 2, 3
+dialplan.area_code.line_id =
+
+#Configure the block out number. X ranges from 1 to 10.
+#dialplan.block_out.number.x =
+dialplan.block_out.number.1 =
+
+#When applying the rule to multiple lines, each line ID separated by comma, e.g. 1,2,3.
+#dialplan.block_out.line_id.x =
+dialplan.block_out.line_id.1 =
+
+dialplan.emergency.enable =
+dialplan.emergency.asserted_id_source =
+dialplan.emergency.custom_asserted_id =
+dialplan.emergency.server.1.address =
+dialplan.emergency.server.1.port =
+dialplan.emergency.server.1.transport_type =
+dialplan.emergency.1.value =
+dialplan.emergency.1.server_priority =
+
+#######################################################################################
+## Echo Cancellation ##
+#######################################################################################
+voice.vad = {$yealink_voice_vad}
+voice.cng = {$yealink_voice_cng}
+
+#######################################################################################
+## Jitter Buffer ##
+#######################################################################################
+voice.jib.adaptive = {$yealink_jib_adaptive}
+voice.jib.min = {$yealink_jib_min}
+voice.jib.max = {$yealink_jib_max}
+voice.jib.normal = {$yealink_jib_normal}
+
+#######################################################################################
+## Tone ##
+#######################################################################################
+voice.tone.country = {$yealink_voice_tone_country}
+voice.tone.dial =
+voice.tone.ring =
+voice.tone.busy =
+voice.tone.callwaiting =
+
+#######################################################################################
+## TR069 ##
+#######################################################################################
+#The TR069 feature is only applicable to some designated firmware version.
+#All settings of TR069 require reboot.
+#Enable or disable the TR069 feature; 0-Disabled (default), 1-Enabled;
+static.managementserver.enable =
+static.managementserver.username =
+static.managementserver.password =
+static.managementserver.url =
+static.managementserver.periodic_inform_enable =
+static.managementserver.periodic_inform_interval =
+static.managementserver.connection_request_username =
+static.managementserver.connection_request_password =
+
+
+#######################################################################################
+## SIP Advanced ##
+#######################################################################################
+sip.timer_t1 =
+sip.timer_t2 =
+sip.timer_t4 =
+sip.listen_port = {$yealink_sip_listen_port}
+sip.tls_listen_port =
+sip.disp_incall_to_info =
+###DECT V83 Add
+sip.request_validation.source.list =
+sip.request_validation.digest.list =
+sip.request_validation.event =
+sip.request_validation.digest.realm =
+sip.send_response_by_request =
+sip.notify_reboot_enable =
+sip.requesturi.e164.addglobalprefix =
+sip.cid_source.preference =
+sip.mac_in_ua =
+
+#######################################################################################
+## Contacts ##
+#######################################################################################
+#Configure phonebook of HandsetX. X ranges from 1 to 100.
+handset.1.contact_list.url =
+
+###DECT V83 Add Shared Directory
+static.directory_setting.shared_contact.enable =
+shared_contact_list.url =
+
+#######################################################################################
+## Romote Phonebook ##
+#######################################################################################
+#Configure the access URL and dispaly name of the remote phonebook. X ranges from 1 to 5.
+remote_phonebook.data.1.url = {$yealink_remote_phonebook_1_url}
+remote_phonebook.data.1.name = {$yealink_remote_phonebook_1_name}
+remote_phonebook.display_name =
+
+features.remote_phonebook.enable = {$yealink_remote_phonebook_enable}
+features.remote_phonebook.flash_time =
+
+#######################################################################################
+## LDAP ##
+#######################################################################################
+##It enables or disables LDAP feature.0-Disabled,1-Enabled.
+##The default value is 0.
+ldap.enable = {$ldap_enable}
+
+ldap.customize_label =
+
+##It configures the criteria for searching the contact name attributes.
+##The default value is blank.
+ldap.name_filter = {$ldap_name_filter}
+
+##It configures the criteria for searching the contact number attributes.
+##The default value is blank.
+ldap.number_filter = {$ldap_number_filter}
+
+##The default value is 0,value of 0 to 2, respectively the ldap, ldap + StarTLS and ldaps
+ldap.tls_mode =
+
+##It configures the IP address or domain name of the LDAP server.
+##The default value is blank.
+ldap.host = {$ldap_host}
+
+##It configures the port of the LDAP server.
+##The default value is 389.Integer from 1 to 65535.
+ldap.port = {$ldap_port}
+
+##It configures the LDAP search base which corresponds to the location of the LDAP phonebook.
+##Example:ldap.base = dc=yealink,dc=cn.
+##The default value is blank.
+ldap.base = {$ldap_base}
+
+##It configures the user name for accessing the LDAP server.
+##The default value is blank.
+ldap.user = {$ldap_user}
+
+##It configures the password for accessing the LDAP server.
+##The default value is blank.
+ldap.password = {$ldap_password}
+
+##It configures the maximum of the search results returned by the LDAP server to be displayed.
+##The default value is 50.Integer from 1 to 32000.
+ldap.max_hits = {$ldap_max_hits}
+
+##It configures the name attributes of each record to be returned by the LDAP server.
+##Multiple attributes are separated by spaces.Example:ldap.name_attr =sn cn.
+##The default value is blank.
+ldap.name_attr = {$ldap_name_attr}
+
+##It configures the number attributes of each record to be returned by the LDAP server.
+##Multiple attributes are separated by spaces.Example:ldap.numb_attr = Mobile ipPhone.
+##The default value is blank.
+ldap.numb_attr = {$ldap_numb_attr}
+
+##It configures the display name of the contact record displayed on the LCD screen.
+##The default value is blank.
+ldap.display_name = {$ldap_display_name}
+
+##It configures the LDAP version.
+##The default value is 3.
+ldap.version = {$ldap_version}
+
+##It enables or disables the phone to perform an LDAP search when receiving an incoming call.
+##0-Disabled,1-Enabled.
+##The default value is 0.
+ldap.call_in_lookup = {$ldap_call_in_lookup}
+
+ldap.call_out_lookup = {$ldap_dial_lookup}
+
+##It enables or disables the phone to sort the search results in alphabetical order or numerical order.
+##0-Disabled,1-Enabled.
+##The default value is 0.
+ldap.ldap_sort = {$ldap_sort}
+
+##It is the electricity + start, automatic search + 00 the beginning and the beginning of the numbe
+##The default value is 0.(0-Disable,1-Enable )
+ldap.incoming_call_special_search.enable =
+
+#######################################################################################
+## XML_Phonebook ##
+#######################################################################################
+#X ranges from 1 to 8
+xml_phonebook.data.max_hits =
+xml_phonebook.data.x.password =
+xml_phonebook.data.x.username =
+xml_phonebook.data.x.name =
+xml_phonebook.data.x.url =
+
+
+#######################################################################################
+## Super Search ##
+#######################################################################################
+super_search.recent_call =
+super_search.url = {$yealink_super_search_url}
+search_in_dialing.local_directory.priority =
+search_in_dialing.local_directory.enable =
+search_in_dialing.history.priority =
+search_in_dialing.history.enable =
+search_in_dialing.remote_phone_book.priority =
+search_in_dialing.remote_phone_book.enable =
+search_in_dialing.ldap.priority =
+search_in_dialing.ldap.enable =
+search_in_dialing.bw_directory.priority =
+search_in_dialing.bw_directory.enable =
+
+
+directory.search_default_input_method =
+directory.search_type =
+
+phone_setting.ringing_timeout = {$yealink_ringing_timeout}
+phone_setting.ringback_timeout =
+
+
+#######################################################################################
+## Security Settings ##
+#######################################################################################
+#Set the password of the user or the administrator, the value format is: user:password or admin:password;
+#static.security.user_password = admin:admin
+#static.security.user_password =
+
+#static.security.user_name.user =
+#static.security.user_name.admin =
+
+{if isset($user_name) }
+static.security.user_name.user = {$user_name}
+static.security.user_password = {$user_name}:{$user_password}
+{/if}
+
+{if isset($admin_name) }
+static.security.user_name.admin = {$admin_name}
+static.security.user_password = {$admin_name}:{$admin_password}
+{/if}
+
+{if isset($var_name) }
+static.security.user_name.var = {$var_name}
+static.security.user_password = {$var_name}:{$var_password}
+{/if}
+
+
+base.pin_code =
+base.double_pin_code.enable =
+base.pin_code_for_register =
+wui.quick_login =
+wui.secure_domain_list =
+static.features.custom_factory_config.enable =
+static.security.default_ssl_method = {$yealink_security_default_ssl_method}
+static.security.server_ssl_method =
+
+
+static.security.var_enable =
+static.web_item_level.url =
+static.security.default_access_level =
+#static.security.user_name.var =
+
+#######################################################################################
+## Certificates ##
+#######################################################################################
+#Enable or disable the phone to only accept the certificates in the Trusted Certificates list;
+#0-Disabled, 1-Enabled (default);
+static.security.trust_certificates = {$yealink_trust_certificates}
+
+#0-Disabled (default), 1-Enabled;
+static.security.cn_validation =
+
+#0-Default Cert, 1-Custom Cert, 2-All Cert(default);
+static.security.ca_cert =
+
+static.trusted_certificates.url =
+#trusted_certificates.delete = http://localhost/all,delete all the trusted certificates;
+static.trusted_certificates.delete =
+
+static.security.dev_cert =
+
+static.server_certificates.url =
+#server_certificates.delete = http://localhost/all, delete the server certificate;
+static.server_certificates.delete =
+
+static.phone_setting.reserve_certs_enable =
+
+#######################################################################################
+## Language Settings ##
+#######################################################################################
+#Specify the web language, the valid values are: English, German, Italian and Turkish;
+#lang.wui =
+
+wui_lang.delete =
+wui_lang.url =
+lang.gui= {$yealink_language_gui}
+lang.wui= {$yealink_language_web}
+
+#######################################################################################
+## Customized Factory Configurations ##
+#######################################################################################
+#Configure the access URL for downloading the customized factory configurations;
+static.custom_factory_configuration.url =
+static.configuration.url =
+
+##It configures the access URL of the custom MAC-Oriented CFG file.
+##The default value is blank.
+static.custom_mac_cfg.url =
+
+
+
+#######################################################################################
+## Handset ##
+#######################################################################################
+
+static.auto_provision.handset_configured.enable =
+static.auto_provision.custom.handset.protect =
+
+#custom.handset.language: 0-English, 1-French, 2-German, 3-Italian, 4-Polish, 5-Portuguese, 6-Spanish, 7-Turkish, 8- Russian, 9-Czech (only for CP935W), 10-Swedish, 11-Slovak (only for CP935W)
+custom.handset.language= {$yealink_custom_handset_language}
+
+custom.handset.time_format =
+custom.handset.date_format =
+custom.handset.screen_saver.enable =
+custom.handset.backlight_in_charger.enable =
+custom.handset.backlight_out_of_charger.enable =
+custom.handset.keypad_light.enable =
+custom.handset.keypad_tone.enable =
+custom.handset.confirmation_tone.enable =
+custom.handset.low_battery_tone.enable =
+custom.handset.auto_answer.enable =
+
+custom.handset.defined_left_key.type =
+custom.handset.defined_right_key.type =
+custom.handset.defined_direction_left_key.type =
+custom.handset.defined_direction_right_key.type =
+custom.handset.defined_direction_up_key.type =
+custom.handset.defined_direction_down_key.type =
+custom.handset.defined_left_key.xml_url =
+custom.handset.defined_right_key.xml_url
+custom.handset.defined_direction_left_key.xml_url
+custom.handset.defined_direction_right_key.xml_url
+custom.handset.defined_direction_up_key.xml_url
+custom.handset.defined_direction_down_key.xml_url
+
+#It is only for W56H
+custom.handset.wallpaper =
+
+#######################################################################################
+## IPUI Registration ##
+#######################################################################################
+#X ranges from 1 to 100
+#handset.X.reg.enable =
+#handset.X.ipui =
+handset.1.ipui = {$yealink_handset_1_ipui}
+handset.2.ipui = {$yealink_handset_2_ipui}
+handset.3.ipui = {$yealink_handset_3_ipui}
+handset.4.ipui = {$yealink_handset_4_ipui}
+handset.5.ipui = {$yealink_handset_5_ipui}
+handset.6.ipui = {$yealink_handset_6_ipui}
+handset.7.ipui = {$yealink_handset_7_ipui}
+handset.8.ipui = {$yealink_handset_8_ipui}
+handset.9.ipui = {$yealink_handset_9_ipui}
+handset.10.ipui = {$yealink_handset_10_ipui}
+handset.11.ipui = {$yealink_handset_11_ipui}
+handset.12.ipui = {$yealink_handset_12_ipui}
+handset.13.ipui = {$yealink_handset_13_ipui}
+handset.14.ipui = {$yealink_handset_14_ipui}
+handset.15.ipui = {$yealink_handset_15_ipui}
+handset.16.ipui = {$yealink_handset_16_ipui}
+handset.17.ipui = {$yealink_handset_17_ipui}
+handset.18.ipui = {$yealink_handset_18_ipui}
+handset.19.ipui = {$yealink_handset_19_ipui}
+handset.20.ipui = {$yealink_handset_20_ipui}
+handset.21.ipui = {$yealink_handset_21_ipui}
+handset.22.ipui = {$yealink_handset_22_ipui}
+handset.23.ipui = {$yealink_handset_23_ipui}
+handset.24.ipui = {$yealink_handset_24_ipui}
+handset.25.ipui = {$yealink_handset_25_ipui}
+handset.26.ipui = {$yealink_handset_26_ipui}
+handset.27.ipui = {$yealink_handset_27_ipui}
+handset.28.ipui = {$yealink_handset_28_ipui}
+handset.29.ipui = {$yealink_handset_29_ipui}
+handset.30.ipui = {$yealink_handset_30_ipui}
+handset.31.ipui = {$yealink_handset_31_ipui}
+handset.32.ipui = {$yealink_handset_32_ipui}
+handset.33.ipui = {$yealink_handset_33_ipui}
+handset.34.ipui = {$yealink_handset_34_ipui}
+handset.35.ipui = {$yealink_handset_35_ipui}
+handset.36.ipui = {$yealink_handset_36_ipui}
+handset.37.ipui = {$yealink_handset_37_ipui}
+handset.38.ipui = {$yealink_handset_38_ipui}
+handset.39.ipui = {$yealink_handset_39_ipui}
+handset.40.ipui = {$yealink_handset_40_ipui}
+handset.41.ipui = {$yealink_handset_41_ipui}
+handset.42.ipui = {$yealink_handset_42_ipui}
+handset.43.ipui = {$yealink_handset_43_ipui}
+handset.44.ipui = {$yealink_handset_44_ipui}
+handset.45.ipui = {$yealink_handset_45_ipui}
+handset.46.ipui = {$yealink_handset_46_ipui}
+handset.47.ipui = {$yealink_handset_47_ipui}
+handset.48.ipui = {$yealink_handset_48_ipui}
+handset.49.ipui = {$yealink_handset_49_ipui}
+handset.50.ipui = {$yealink_handset_50_ipui}
+handset.51.ipui = {$yealink_handset_51_ipui}
+handset.52.ipui = {$yealink_handset_52_ipui}
+handset.53.ipui = {$yealink_handset_53_ipui}
+handset.54.ipui = {$yealink_handset_54_ipui}
+handset.55.ipui = {$yealink_handset_55_ipui}
+handset.56.ipui = {$yealink_handset_56_ipui}
+handset.57.ipui = {$yealink_handset_57_ipui}
+handset.58.ipui = {$yealink_handset_58_ipui}
+handset.59.ipui = {$yealink_handset_59_ipui}
+handset.60.ipui = {$yealink_handset_60_ipui}
+handset.61.ipui = {$yealink_handset_61_ipui}
+handset.62.ipui = {$yealink_handset_62_ipui}
+handset.63.ipui = {$yealink_handset_63_ipui}
+handset.64.ipui = {$yealink_handset_64_ipui}
+handset.65.ipui = {$yealink_handset_65_ipui}
+handset.66.ipui = {$yealink_handset_66_ipui}
+handset.67.ipui = {$yealink_handset_67_ipui}
+handset.68.ipui = {$yealink_handset_68_ipui}
+handset.69.ipui = {$yealink_handset_69_ipui}
+handset.70.ipui = {$yealink_handset_70_ipui}
+handset.71.ipui = {$yealink_handset_71_ipui}
+handset.72.ipui = {$yealink_handset_72_ipui}
+handset.73.ipui = {$yealink_handset_73_ipui}
+handset.74.ipui = {$yealink_handset_74_ipui}
+handset.75.ipui = {$yealink_handset_75_ipui}
+handset.76.ipui = {$yealink_handset_76_ipui}
+handset.77.ipui = {$yealink_handset_77_ipui}
+handset.78.ipui = {$yealink_handset_78_ipui}
+handset.79.ipui = {$yealink_handset_79_ipui}
+handset.80.ipui = {$yealink_handset_80_ipui}
+handset.81.ipui = {$yealink_handset_81_ipui}
+handset.82.ipui = {$yealink_handset_82_ipui}
+handset.83.ipui = {$yealink_handset_83_ipui}
+handset.84.ipui = {$yealink_handset_84_ipui}
+handset.85.ipui = {$yealink_handset_85_ipui}
+handset.86.ipui = {$yealink_handset_86_ipui}
+handset.87.ipui = {$yealink_handset_87_ipui}
+handset.88.ipui = {$yealink_handset_88_ipui}
+handset.89.ipui = {$yealink_handset_89_ipui}
+handset.90.ipui = {$yealink_handset_90_ipui}
+handset.91.ipui = {$yealink_handset_91_ipui}
+handset.92.ipui = {$yealink_handset_92_ipui}
+handset.93.ipui = {$yealink_handset_93_ipui}
+handset.94.ipui = {$yealink_handset_94_ipui}
+handset.95.ipui = {$yealink_handset_95_ipui}
+handset.96.ipui = {$yealink_handset_96_ipui}
+handset.97.ipui = {$yealink_handset_97_ipui}
+handset.98.ipui = {$yealink_handset_98_ipui}
+handset.99.ipui = {$yealink_handset_99_ipui}
+handset.100.ipui = {$yealink_handset_100_ipui}
+
+
+
+
+
+
+#######################################################################################
+## DNS ##
+#######################################################################################
+dns_cache_a.1.name =
+dns_cache_a.1.ip =
+dns_cache_a.1.ttl =
+dns_cache_srv.1.name =
+dns_cache_srv.1.port =
+dns_cache_srv.1.priority =
+dns_cache_srv.1.target =
+dns_cache_srv.1.weight =
+dns_cache_srv.1.ttl =
+dns_cache_naptr.1.name =
+dns_cache_naptr.1.order =
+dns_cache_naptr.1.preference =
+dns_cache_naptr.1.replace =
+dns_cache_naptr.1.service =
+dns_cache_naptr.1.ttl =
+
+################################################################
+# SIP Backup Server ##
+################################################################
+static.network.dns.ttl_enable =
+static.network.dns.last_cache_expired.enable=
+static.network.dns.last_cache_expired =
+static.network.dns.query_timeout =
+static.network.dns.retry_times =
+sip.dns_transport_type =
+sip.skip_redundant_failover_addr =
+
+#V80 Add
+features.barge_in_via_username.enable =
+
+#######################################################################################
+## Other ##
+#######################################################################################
+features.dnd.allow = {$yealink_dnd_allow}
+features.fwd.allow = {$yealink_fwd_allow}
+phone_setting.disable_account_without_username.enable =
+phone_setting.end_call_net_disconnect.enable =
+push_xml.sip_notify =
+phone_setting.warnings_display.mode =
+
+#######################################################################################
+## Broadsoft Setting ##
+#######################################################################################
+bw.enable =
+features.feature_key_sync.enable = {$yealink_feature_key_sync}
+bw.xsi.enable =
+sip.authentication_for_xsi =
+
+bw.xsi.call_log.enable =
+bw.xsi.call_log.multiple_accounts.enable =
+
+bw.xsi.directory.enable =
+bw_phonebook.group_enable =
+bw_phonebook.personal_enable =
+bw_phonebook.group_common_enable =
+bw_phonebook.enterprise_enable =
+bw_phonebook.enterprise_common_enable =
+bw_phonebook.group_displayname =
+bw_phonebook.personal_displayname =
+bw_phonebook.group_common_displayname =
+bw_phonebook.enterprise_displayname =
+bw_phonebook.enterprise_common_displayname =
+bw_phonebook.custom =
+directory.update_time_interval =
+
+#######################################################################################
+## Call Park ##
+#######################################################################################
+
+features.call_park.enable =
+features.call_park.group_enable =
+features.call_park.park_ring =
+features.call_park.park_visual_notify_enable =
+features.call_park.group_park_code =
+features.call_park.park_code =
+features.call_park.park_mode =
+features.call_park.park_retrieve_code =
+
+
+#######################################################################################
+## Base Registration ##
+#######################################################################################
+static.station.mode=
+features.dect_management.ip_address
+
+#* range from 1 to 30
+station.allowed.*.mac=
+station.allowed.*.name=
+station.allowed.*.sync.cluster=
+station.allowed.*.sync.level=
+station.*.name=
+station.*.active=
+station.*.sync.cluster=
+station.*.sync.level=
+station.*.sync.type=
+static.station.*.network.type=
+static.station.*.network.ip=
+static.station.*.network.gateway=
+static.station.*.network.mask=
+
+#* range from 1 to 10
+#template.*.name=
+#template.*.outbound.*.address=
+#template.*.outbound.*.port=
+#template.*.outbound.enable=
+#template.*.outbound.fallback_interval=
+#template.*.sip_server.*.address=
+#template.*.sip_server.*.expires=
+#template.*.sip_server.*.port=
+#template.*.sip_server.*.retry_counts=
+#template.*.sip_server.*.transport_type=
+
+template.1.name= FusionPBX
+template.1.outbound.1.address= {$row.outbound_proxy_primary}
+template.1.outbound.1.port= {$outbound_proxy_1_port}
+template.1.outbound.enable= {if isset($row.outbound_proxy_primary)}1{else}0{/if}
+template.1.outbound.fallback_interval= {$outbound_proxy_fallback_interval}
+template.1.sip_server.1.address= {$row.server_address}
+template.1.sip_server.1.expires= {$row.register_expires}
+template.1.sip_server.1.port= {$row.sip_port}
+template.1.sip_server.1.retry_counts= 3
+
+{if $account.{$row.line_number}.sip_transport == 'udp'}template.1.sip_server.1.transport_type= = 0{/if}
+{if $account.{$row.line_number}.sip_transport == 'tcp'}template.1.sip_server.1.transport_type= 1{/if}
+{if $account.{$row.line_number}.sip_transport == 'tls'}template.1.sip_server.1.transport_type= 2{/if}
+{if $account.{$row.line_number}.sip_transport == 'dns srv'}template.1.sip_server.1.transport_type= 3{/if}
+
+#W80B ADD
+features.media_transmit.enable=
diff --git a/resources/templates/provision/yealink/w80/{$mac}.cfg b/resources/templates/provision/yealink/w80/{$mac}.cfg
new file mode 100644
index 0000000000..a655db3a34
--- /dev/null
+++ b/resources/templates/provision/yealink/w80/{$mac}.cfg
@@ -0,0 +1,297 @@
+#!version:1.0.0.1
+
+##File header "#!version:1.0.0.1" can not be edited or deleted.##
+
+#Account.X Settings ,X Range from 1 to 100
+
+{foreach $lines as $row}
+
+#######################################################################################
+## Account1 Settings ##
+#######################################################################################
+
+#Enable or disable the account; 0-Disabled (default), 1-Enabled;
+#account.{$row.line_number}.enable =
+
+#Configure the label displayed on the LCD screen.
+account.{$row.line_number}.label = {$row.label}
+
+#Configure the display name.
+account.{$row.line_number}.display_name = {$row.display_name}
+
+#Configure the register user name.
+account.{$row.line_number}.user_name = {$row.user_id}@{$row.server_address}
+
+#Configure the username and password for register authentication.
+account.{$row.line_number}.auth_name = {$row.auth_id}
+account.{$row.line_number}.password = {$row.password}
+
+#W80B ADD
+account.{$row.line_number}.sip_server.template = 1
+account.{$row.line_number}.media_transmit.enable =
+
+#######################################################################################
+## Failback ##
+#######################################################################################
+account.{$row.line_number}.sip_server.1.failback_mode = 0
+account.{$row.line_number}.sip_server.1.failback_timeout = 3600
+account.{$row.line_number}.sip_server.1.register_on_enable = 0
+account.{$row.line_number}.sip_server.1.failback_subscribe.enable =
+account.{$row.line_number}.sip_server.1.invite_retry_counts =
+account.{$row.line_number}.sip_server.1.only_signal_with_registered =
+
+account.{$row.line_number}.sip_server.2.failback_mode =
+account.{$row.line_number}.sip_server.2.failback_timeout =
+account.{$row.line_number}.sip_server.2.register_on_enable =
+account.{$row.line_number}.sip_server.2.failback_subscribe.enable =
+account.{$row.line_number}.sip_server.2.invite_retry_counts =
+account.{$row.line_number}.sip_server.2.only_signal_with_registered =
+
+account.{$row.line_number}.naptr_build =
+account.{$row.line_number}.fallback.redundancy_type =
+account.{$row.line_number}.fallback.timeout = 10
+
+account.{$row.line_number}.dns_cache_type =
+account.{$row.line_number}.static_cache_pri =
+
+#######################################################################################
+## Basic ##
+#######################################################################################
+#Enable or disable the anonymous call feature; 0-Disabled (default), 1-Enabled;
+account.{$row.line_number}.anonymous_call =
+
+#Enable or disable the reject anonymous call feature; 0-Disabled (default), 1-Enabled;
+account.{$row.line_number}.reject_anonymous_call =
+
+#Configure the on code and off code of the anonymous call feature.
+account.{$row.line_number}.send_anonymous_code =
+account.{$row.line_number}.anonymous_call_oncode =
+account.{$row.line_number}.anonymous_call_offcode =
+
+#Configure the on code and off code of the reject anonymous call feature.
+account.{$row.line_number}.send_anonymous_rejection_code =
+account.{$row.line_number}.anonymous_reject_oncode =
+account.{$row.line_number}.anonymous_reject_offcode =
+
+
+#######################################################################################
+## Codec ##
+#######################################################################################
+account.{$row.line_number}.codec.g722.enable = {if isset($yealink_codec_g722_enable)}{$yealink_codec_g722_enable}{else}0{/if}
+
+account.{$row.line_number}.codec.g722.priority = {if isset($yealink_codec_g722_priority)}{$yealink_codec_g722_priority}{else}0{/if}
+
+account.{$row.line_number}.codec.g729.enable = {if isset($yealink_codec_g729_enable) && $yealink_codec_g729_enable}1{else}0{/if}
+account.{$row.line_number}.codec.g729.priority = {if isset($yealink_codec_g729_priority)}{$yealink_codec_g729_priority}{else}0{/if}
+
+account.{$row.line_number}.codec.g726_16.enable = {if isset($yealink_codec_g726_16_enable) && $yealink_codec_g726_16_enable}1{else}0{/if}
+account.{$row.line_number}.codec.g726_16.priority = {if isset($yealink_codec_g726_16_priority)}{$yealink_codec_g726_16_priority}{else}0{/if}
+
+account.{$row.line_number}.codec.g726_24.enable = {if isset($yealink_codec_g726_24_enable) && $yealink_codec_g726_24_enable}1{else}0{/if}
+account.{$row.line_number}.codec.g726_24.priority = {if isset($yealink_codec_g726_24_priority)}{$yealink_codec_g726_24_priority}{else}0{/if}
+
+account.{$row.line_number}.codec.g726_32.enable = {if isset($yealink_codec_g726_32_enable) && $yealink_codec_g726_32_enable}1{else}0{/if}
+account.{$row.line_number}.codec.g726_32.priority = {if isset($yealink_codec_g726_32_priority)}{$yealink_codec_g726_32_priority}{else}0{/if}
+
+account.{$row.line_number}.codec.g726_40.enable = {if isset($yealink_codec_g726_40_enable) && $yealink_codec_g726_40_enable}1{else}0{/if}
+account.{$row.line_number}.codec.g726_40.priority = {if isset($yealink_codec_g726_40_priority)}{$yealink_codec_g726_40_priority}{else}0{/if}
+
+account.{$row.line_number}.codec.ilbc.enable = {if isset($yealink_codec_ilbc_enable) && $yealink_codec_ilbc_enable}1{else}0{/if}
+account.{$row.line_number}.codec.ilbc.priority = {if isset($yealink_codec_iLBC_priority)}{$yealink_codec_iLBC_priority}{else}0{/if}
+
+account.{$row.line_number}.codec.pcmu.enable = {if isset($yealink_codec_pcmu_enable) && $yealink_codec_pcmu_enable}1{else}{0}{/if}
+account.{$row.line_number}.codec.pcmu.priority = {if isset($yealink_codec_pcmu_priority)}{$yealink_codec_pcmu_priority}{else}0{/if}
+
+account.{$row.line_number}.codec.pcma.enable = {if isset($yealink_codec_pcma_enable) && $yealink_codec_pcma_enable}1{else}{0}{/if}
+
+account.{$row.line_number}.codec.pcma.priority = {if isset($yealink_codec_pcma_priority)}{$yealink_codec_pcma_priority}{else}0{/if}
+
+
+account.{$row.line_number}.codec.opus.enable = {if isset($yealink_codec_opus_enable) && $yealink_codec_opus_enable}1{else}0{/if}
+account.{$row.line_number}.codec.opus.priority = {if isset($yealink_codec_opus_priority)}{$yealink_codec_opus_priority}{else}0{/if}
+
+#######################################################################################
+## NAT Settings ##
+#######################################################################################
+
+#Enable or disable the NAT traversal; 0-Disabled (default), 1-STUN;
+account.{$row.line_number}.nat.nat_traversal =
+
+#Enable or disable the NAT keep-alive; 0-Disabled, 1-Enabled (default);
+account.{$row.line_number}.nat.udp_update_enable = 3
+
+#Specify the keep-alive interval (in seconds), the default value is 30.
+account.{$row.line_number}.nat.udp_update_time = 30
+
+#Enable or disable the NAT Rport; 0-Disabled (default), 1-Enabled;
+account.{$row.line_number}.nat.rport = {$yealink_rport}
+
+#######################################################################################
+## Register Advanced ##
+#######################################################################################
+
+#Configure the period of BLF subscription(SCAćCall Park)
+account.{$row.line_number}.blf.subscribe_period =
+
+#Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO;
+account.{$row.line_number}.dtmf.type = {$yealink_dtmf_type}
+
+#Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101.
+account.{$row.line_number}.dtmf.dtmf_payload =
+
+#Configure the DTMF info type when using the SIP INFO; 0-Disabled, 1-DTMF-Relay (default), 2-DTMF, 3-Telephone-Event;
+account.{$row.line_number}.dtmf.info_type =
+
+#Enable or disable the 100 reliable retransmission; 0-Disabled, 1-Enabled (default);
+account.{$row.line_number}.100rel_enable = {$yealink_retransmission}
+
+#Enable or disable the phone to subscribe the register status; 0-Disabled (default), 1-Enabled;
+account.{$row.line_number}.subscribe_register =
+
+#Enable or disable the phone to subscribe the message waiting indicator; 0-Disabled (default), 1-Enabled;
+account.{$row.line_number}.subscribe_mwi =
+
+#Configure MWI subscribe expiry time (in seconds). It ranges from 0 to 84600, the default value is 3600.
+account.{$row.line_number}.subscribe_mwi_expires =
+
+#Enable or disable the phone to subscribe to the voicemail through the message waiting indicator; 0-Disabled (default), 1-Enabled;
+account.{$row.line_number}.subscribe_mwi_to_vm =
+
+voice_mail.number.1 = {$voicemail_number}
+
+account.{$row.line_number}.display_mwi.enable =
+
+#Configure the type of SIP header to carry the caller ID; 0-FROM (default), 1-PAI;
+account.{$row.line_number}.cid_source = {$yealink_cid_source}
+account.{$row.line_number}.cid_source_privacy =
+account.{$row.line_number}.cid_source_ppi =
+
+#Enable or disable the session timer; 0-Disabled (default), 1-Enabled;
+account.{$row.line_number}.session_timer.enable = {$yealink_session_timer}
+
+#Configure the refresh session timer interval (in seconds). It ranges from 1 to 9999.
+account.{$row.line_number}.session_timer.expires =
+
+#Configure the session timer refresher; 0-Uac (default), 1-Uas;
+account.{$row.line_number}.session_timer.refresher =
+
+#Enable or disable the "user=phone"; 0-Disabled (default), 1-Enabled;
+account.{$row.line_number}.enable_user_equal_phone =
+
+#Configure the way of encrypting the message; 0-Disabled (default), 1-Forced, 2-Negotiated;
+account.{$row.line_number}.srtp_encryption = {$yealink_srtp_encryption}
+
+#Configure the RTP packet time. The valid values are 0 (Disabled), 10, 20 (default), 30, 40, 50, 60.
+account.{$row.line_number}.ptime = 20
+
+account.{$row.line_number}.shared_line = {$shared_line_1}
+
+#Enable or disable the phone to send the MAC address in the Register message; 0-Disabled (default), 1-Enabled;
+account.{$row.line_number}.register_mac =
+
+#Enable or disable the phone to send the line number in the Register message; 0-Disabled, 1-Enabled (default);
+account.{$row.line_number}.register_line =
+
+#Configure the interval (in seconds) the phone retries to register when account fails to register. It ranges from 0 to 1800, the default value is 30.
+account.{$row.line_number}.reg_fail_retry_interval =
+
+account.{$row.line_number}.reg_failed_retry_min_time =
+account.{$row.line_number}.reg_failed_retry_max_time =
+
+#######################################################################################
+## Network Conference ##
+#######################################################################################
+account.{$row.line_number}.conf_type = {if $nway_conference == 'true'}2{elseif $nway_conference == 'false'}0{/if}
+account.{$row.line_number}.conf_uri = {if $nway_conference == 'true'}nway{$row.auth_id}@{$row.server_address}{/if}
+
+account.{$row.line_number}.sip_server_type =
+account.{$row.line_number}.unregister_on_reboot = 1
+
+
+#######################################################################################
+## Register Other ##
+#######################################################################################
+##DECT V81 Add
+account.{$row.line_number}.simultaneous_outgoing.num =
+
+account.{$row.line_number}.register_expires_overlap =
+account.{$row.line_number}.subscribe_expires_overlap =
+account.{$row.line_number}.auto_dial_enable =
+account.{$row.line_number}.auto_dial_num =
+account.{$row.line_number}.cp_source = {$yealink_cp_source}
+account.{$row.line_number}.transfer_refer_to_contact_header.enable =
+#V80 Add
+account.{$row.line_number}.custom_ua =
+account.{$row.line_number}.callpark_enable =
+account.{$row.line_number}.check_cseq.enable =
+account.{$row.line_number}.check_to_tag.enable =
+account.{$row.line_number}.hold_use_inactive =
+account.{$row.line_number}.line_seize.expires =
+account.{$row.line_number}.update_ack_while_dialing =
+account.{$row.line_number}.sub_fail_retry_interval =
+
+#######################################################################################
+## Call Forward ##
+#######################################################################################
+#Enable or disable the always forward, 0-Disabled(default), 1-Enabled;
+account.{$row.line_number}.always_fwd.enable =
+
+#Configure the target phonenumber that the phone will forward the call to;
+account.{$row.line_number}.always_fwd.target =
+
+#Configure the on/off code for always forward;
+account.{$row.line_number}.always_fwd.off_code =
+account.{$row.line_number}.always_fwd.on_code =
+
+
+#Enable or disable the busy forward, 0-Disabled(default), 1-Enabled;
+account.{$row.line_number}.busy_fwd.enable =
+account.{$row.line_number}.busy_fwd.target =
+
+account.{$row.line_number}.busy_fwd.off_code =
+account.{$row.line_number}.busy_fwd.on_code =
+
+
+#Enable or disable the no answer forward, 0-Disabled(default), 1-Enabled;
+#Configure the waiting ring times before forwarding, ranges from 0 to 20 (by default);
+account.{$row.line_number}.timeout_fwd.enable =
+account.{$row.line_number}.timeout_fwd.target =
+account.{$row.line_number}.timeout_fwd.timeout =
+
+account.{$row.line_number}.timeout_fwd.off_code =
+account.{$row.line_number}.timeout_fwd.on_code =
+
+#######################################################################################
+## DND ##
+#######################################################################################
+
+#Enable or disable the DND feautre; 0-Disabled (default), 1-Enabled;
+account.{$row.line_number}.dnd.enable =
+
+#Configure the DND on code and off code.
+account.{$row.line_number}.dnd.on_code =
+account.{$row.line_number}.dnd.off_code =
+
+#######################################################################################
+## Broadsoft XSI ##
+#######################################################################################
+
+##It configures the user name for XSI authentication.
+##The default value is blank.
+account.{$row.line_number}.xsi.user =
+
+##It configures the password for XSI authentication.
+##The default value is blank.
+account.{$row.line_number}.xsi.password =
+
+##It configures the access URL of the Xtended Services Platform server.
+##The default value is blank.
+account.{$row.line_number}.xsi.host =
+
+##It configures the server type of the Xtended Services Platform server.
+##The default value is http.
+account.{$row.line_number}.xsi.server_type =
+
+##It configures the server port of the Xtended Services Platform server.
+##The default value is 80.Integer from 1 to 65535
+account.{$row.line_number}.xsi.port =
diff --git a/themes/default/css.php b/themes/default/css.php
index 5437f172ed..f327288b98 100644
--- a/themes/default/css.php
+++ b/themes/default/css.php
@@ -146,7 +146,7 @@ $input_shadow_outer_color_focus = isset($_SESSION['theme']['input_shadow_outer_c
$input_toggle_style = $_SESSION['theme']['input_toggle_style']['text'] ?? 'switch_round';
$input_toggle_switch_background_color_true = $_SESSION['theme']['input_toggle_switch_background_color_true']['text'] ?? '#2e82d0';
$input_toggle_switch_background_color_false = $_SESSION['theme']['input_toggle_switch_background_color_false']['text'] ?? $input_border_color;
-$input_toggle_switch_handle_symbol = $_SESSION['theme']['input_toggle_switch_handle_symbol']['boolean'] ?? 'false';
+$input_toggle_switch_handle_symbol = filter_var($_SESSION['theme']['input_toggle_switch_handle_symbol']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
$input_toggle_switch_handle_color = $_SESSION['theme']['input_toggle_switch_handle_color']['text'] ?? '#ffffff';
$login_body_top = $_SESSION['theme']['login_body_top']['text'] ?? '50%';
$login_body_left = $_SESSION['theme']['login_body_left']['text'] ?? '50%';
@@ -317,7 +317,7 @@ $modal_message_color = $_SESSION['theme']['modal_message_color']['text'] ?? '#44
$modal_message_alignment = $_SESSION['theme']['modal_message_alignment']['text'] ?? 'left';
$modal_message_margin = $_SESSION['theme']['modal_message_margin']['text'] ?? '0 0 20px 0';
$audio_player_indicator_color = $_SESSION['theme']['audio_player_indicator_color']['text'] ?? '#b90004';
-$audio_player_waveform_enabled = $_SESSION['theme']['audio_player_waveform_enabled']['boolean'] ?? 'false';
+$audio_player_waveform_enabled = filter_var($_SESSION['theme']['audio_player_waveform_enabled']['boolean'] ?? true, FILTER_VALIDATE_BOOL);
$audio_player_waveform_height = $_SESSION['theme']['audio_player_waveform_height']['text'] ?? '70px';
$custom_css_code = $_SESSION['theme']['custom_css_code']['text'] ?? null;
@@ -354,29 +354,29 @@ if (!empty($_SESSION['theme'])) {
$background_images_enabled = false;
if (!empty($_SESSION['username'])) {
//logged in - use standard background images
- if (!empty($_SESSION['theme']['background_image_enabled']) && $_SESSION['theme']['background_image_enabled']['boolean'] == 'true' && is_array($_SESSION['theme']['background_image'])) {
+ if (filter_var($_SESSION['theme']['background_image_enabled']['boolean'] ?? false, FILTER_VALIDATE_BOOL) && is_array($_SESSION['theme']['background_image'])) {
$background_images_enabled = true;
$background_images = $_SESSION['theme']['background_image'];
}
//logged in - use standard background colors
- if (!empty($_SESSION['theme']['background_color_enabled']) && $_SESSION['theme']['background_color_enabled']['boolean'] == 'true' && !empty($_SESSION['theme']['background_color'][0]) && !empty($_SESSION['theme']['background_color'][1])) {
+ if (filter_var($_SESSION['theme']['background_color_enabled']['boolean'] ?? true, FILTER_VALIDATE_BOOL) && !empty($_SESSION['theme']['background_color'][0]) && !empty($_SESSION['theme']['background_color'][1])) {
$background_colors[0] = $_SESSION['theme']['background_color'][0];
$background_colors[1] = $_SESSION['theme']['background_color'][1];
}
- elseif (!empty($_SESSION['theme']['background_color_enabled']) && $_SESSION['theme']['background_color_enabled']['boolean'] == 'true' && !empty($_SESSION['theme']['background_color'][0])) {
+ elseif (filter_var($_SESSION['theme']['background_color_enabled']['boolean'] ?? true, FILTER_VALIDATE_BOOL) && !empty($_SESSION['theme']['background_color'][0])) {
$background_colors[0] = $_SESSION['theme']['background_color'][0];
}
}
else {
//not logged in - try using login background images
- if (isset($_SESSION['theme']['login_background_image_enabled']['boolean']) && $_SESSION['theme']['login_background_image_enabled']['boolean'] == 'true' && is_array($_SESSION['theme']['login_background_image'])) {
+ if (filter_var($_SESSION['theme']['login_background_image_enabled']['boolean'] ?? false, FILTER_VALIDATE_BOOL) && is_array($_SESSION['theme']['login_background_image'])) {
$background_images_enabled = true;
$background_images = $_SESSION['theme']['login_background_image'];
}
//otherwise, use standard background images
- if (!empty($_SESSION['theme']['background_image_enabled']['boolean']) && $_SESSION['theme']['background_image_enabled']['boolean'] == 'true' && is_array($_SESSION['theme']['background_image'])) {
+ if (filter_var($_SESSION['theme']['background_image_enabled']['boolean'] ?? true, FILTER_VALIDATE_BOOL) && is_array($_SESSION['theme']['background_image'])) {
$background_images_enabled = true;
$background_images = $_SESSION['theme']['background_image'];
}
@@ -389,11 +389,11 @@ else {
elseif (!empty($_SESSION['theme']['login_background_color']) && !empty($_SESSION['theme']['login_background_color'][0])) {
$background_colors[0] = $_SESSION['theme']['login_background_color'][0];
}
- elseif (!empty($_SESSION['theme']['background_color_enabled']) && $_SESSION['theme']['background_color_enabled']['boolean'] == 'true' && !empty($_SESSION['theme']['background_color'][0]) && !empty($_SESSION['theme']['background_color'][1])) {
+ elseif (filter_var($_SESSION['theme']['background_color_enabled']['boolean'] ?? true, FILTER_VALIDATE_BOOL) && !empty($_SESSION['theme']['background_color'][0]) && !empty($_SESSION['theme']['background_color'][1])) {
$background_colors[0] = $_SESSION['theme']['background_color'][0];
$background_colors[1] = $_SESSION['theme']['background_color'][1];
}
- elseif (!empty($_SESSION['theme']['background_color_enabled']) && $_SESSION['theme']['background_color_enabled']['boolean'] == 'true' && !empty($_SESSION['theme']['background_color'][0])) {
+ elseif (filter_var($_SESSION['theme']['background_color_enabled']['boolean'] ?? true, FILTER_VALIDATE_BOOL) && !empty($_SESSION['theme']['background_color'][0])) {
$background_colors[0] = $_SESSION['theme']['background_color'][0];
}
}
@@ -772,7 +772,6 @@ else { //default: white
display: inline-block;
font-size: 8pt;
margin: 0 0 0 8px;
- opacity: 0.30;
}
div.menu_side_sub > a.menu_side_item_sub > span.fas,
@@ -2188,6 +2187,7 @@ else { //default: white
-webkit-transition: all 0.25s ease;
-moz-transition: all 0.25s ease;
transition: all 0.25s ease;
+ vertical-align: middle;
}
input[type=text].list-search:focus {
@@ -3854,6 +3854,52 @@ else { //default: white
text-align: left;
}
+/* UPGRADE - SOURCE CODE PREVIEW ************************************************/
+
+ #source_preview_layer {
+ z-index: 999999;
+ position: absolute;
+ left: 0px;
+ top: 0px;
+ right: 0px;
+ bottom: 0px;
+ text-align: center;
+ vertical-align: middle;
+ }
+
+ #source_preview_container {
+ display: block;
+ overflow: auto;
+ background-color: =$modal_background_color?>;
+ padding: 25px 25px;
+ margin: auto 10%;
+ text-align: left;
+ box-shadow: =$modal_shadow?>;
+ border-radius: =$modal_corner_radius?>;
+ color: =$modal_message_color?>;
+ }
+
+ #source_preview_container div.title {
+ display: block;
+ font-weight: bold;
+ font-size: 120%;
+ font-family: =$modal_title_font?>;
+ color: =$modal_title_color?>;
+ text-align: =$modal_title_alignment?>;
+ margin: =$modal_title_margin?>;
+ }
+
+ #source_preview_container div.file_paths {
+ width: 100%;
+ max-height: 250px;
+ overflow: auto;
+ border: 1px solid =$table_row_border_color?>;
+ padding: 12px 15px;
+ background-color: =$table_row_background_color_light?>;
+ font-family: monospace; font-size: 85%;
+ color: green;
+ }
+
/* ACE EDITOR *******************************************************************/
div#editor {