Merge branch 'fusionpbx:master' into master

This commit is contained in:
n0obHere 2025-02-27 18:07:47 -05:00 committed by GitHub
commit 6d742f6b6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
163 changed files with 3521 additions and 1024 deletions

View File

@ -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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('access_control_add') || permission_exists('access_control_edit') || permission_exists('access_control_delete')) {
@ -254,3 +258,4 @@
require_once "resources/footer.php";
?>

View File

@ -126,7 +126,7 @@
$offset = $rows_per_page * $page;
//get the list
$sql = "select b.bridge_uuid, d.domain_name, b.bridge_name, b.bridge_destination, bridge_enabled, bridge_description ";
$sql = "select d.domain_uuid, b.bridge_uuid, d.domain_name, b.bridge_name, b.bridge_destination, bridge_enabled, bridge_description ";
$sql .= "from v_bridges as b, v_domains as d ";
$sql .= "where b.domain_uuid = d.domain_uuid ";
if (!empty($show) && $show == "all" && permission_exists('bridge_all')) {
@ -234,8 +234,12 @@
if (!empty($bridges)) {
$x = 0;
foreach ($bridges as $row) {
$list_row_url = '';
if (permission_exists('bridge_edit')) {
$list_row_url = "bridge_edit.php?id=".urlencode($row['bridge_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('bridge_add') || permission_exists('bridge_edit') || permission_exists('bridge_delete')) {

View File

@ -309,8 +309,12 @@
if (!empty($result)) {
$x = 0;
foreach ($result as $row) {
$list_row_url = '';
if (permission_exists('call_block_edit')) {
$list_row_url = "call_block_edit.php?id=".urlencode($row['call_block_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('call_block_add') || permission_exists('call_block_edit') || permission_exists('call_block_delete')) {
@ -405,3 +409,4 @@
require_once "resources/footer.php";
?>

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
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):
@ -557,7 +557,7 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
}
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-enabled']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";

View File

@ -45,4 +45,3 @@ $array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'user';
$y++;
?>

View File

@ -227,8 +227,12 @@
if (!empty($result)) {
$x = 0;
foreach($result as $row) {
$list_row_url = '';
if (permission_exists('call_broadcast_edit')) {
$list_row_url = "call_broadcast_edit.php?id=".urlencode($row['call_broadcast_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('call_broadcast_add') || permission_exists('call_broadcast_delete')) {
@ -286,3 +290,4 @@
require_once "resources/footer.php";
?>

View File

@ -128,6 +128,9 @@
$x = 0;
foreach($call_center_queues as $row) {
$list_row_url = PROJECT_PATH."/app/call_center_active/call_center_active.php?queue_name=".escape($row['call_center_queue_uuid'])."&name=".urlencode(escape($row['queue_name']));
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
echo " <td><a href='".$list_row_url."'>".escape($row['queue_name'])."</a></td>\n";
echo " <td>".escape($row['queue_extension'])."</td>\n";
@ -159,3 +162,4 @@
require_once "resources/footer.php";
?>

View File

@ -214,8 +214,12 @@
if (!empty($result)) {
$x = 0;
foreach($result as $row) {
$list_row_url = '';
if (permission_exists('call_center_agent_edit')) {
$list_row_url = "call_center_agent_edit.php?id=".urlencode($row['call_center_agent_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('call_center_agent_delete')) {
@ -290,3 +294,4 @@
require_once "resources/footer.php";
?>

View File

@ -227,8 +227,12 @@
if (!empty($result)) {
$x = 0;
foreach($result as $row) {
$list_row_url = '';
if (permission_exists('call_center_queue_edit')) {
$list_row_url = "call_center_queue_edit.php?id=".urlencode($row['call_center_queue_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('call_center_queue_add') || permission_exists('call_center_queue_delete')) {
@ -293,3 +297,4 @@
require_once "resources/footer.php";
?>

View File

@ -243,8 +243,12 @@
if (!empty($call_flows)) {
$x = 0;
foreach ($call_flows as $row) {
$list_row_url = '';
if (permission_exists('call_flow_edit')) {
$list_row_url = "call_flow_edit.php?id=".urlencode($row['call_flow_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('call_flow_add') || permission_exists('call_flow_edit') || permission_exists('call_flow_delete')) {
@ -311,3 +315,4 @@
require_once "resources/footer.php";
?>

View File

@ -241,7 +241,7 @@
}
}
if ($show !== 'all' && permission_exists('call_forward_all')) {
echo button::create(['type' => 'button', 'label' => $text['button-show_all'], 'icon' => $_SESSION['theme']['button_icon_all'], 'link' => '?show=all' . $param]);
echo button::create(['type' => 'button', 'label' => $text['button-show_all'], 'icon' => $_SESSION['theme']['button_icon_all'], 'link' => '?show=all' . (!empty($params) ? '&'.implode('&', $params) : null)]);
}
echo "<form id='form_search' class='inline' method='get'>\n";
if ($show == 'all' && permission_exists('call_forward_all')) {
@ -306,6 +306,9 @@
$x = 0;
foreach ($extensions as $row) {
$list_row_url = PROJECT_PATH . "/app/call_forward/call_forward_edit.php?id=" . $row['extension_uuid'] . "&return_url=" . urlencode($_SERVER['REQUEST_URI']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
echo "<tr class='list-row' href='" . $list_row_url . "'>\n";
if (!$is_included && $extensions) {
echo " <td class='checkbox'>\n";

View File

@ -229,8 +229,12 @@
if (!empty($conference_centers)) {
$x = 0;
foreach ($conference_centers as $row) {
$list_row_url = '';
if (permission_exists('conference_center_edit')) {
$list_row_url = "conference_center_edit.php?id=".$row['conference_center_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('conference_center_edit') || permission_exists('conference_center_delete')) {
@ -285,3 +289,4 @@
require_once "resources/footer.php";
?>

View File

@ -319,8 +319,12 @@
$participant_pin = substr($participant_pin, 0, 3) ."-". substr($participant_pin, 3, 3) ."-". substr($participant_pin, -3)."\n";
}
$list_row_url = '';
if (permission_exists('conference_room_edit')) {
$list_row_url = "conference_room_edit.php?id=".urlencode($row['conference_room_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('conference_room_add') || permission_exists('conference_room_edit') || permission_exists('conference_room_delete')) {
@ -508,3 +512,4 @@
require_once "resources/footer.php";
?>

View File

@ -231,8 +231,12 @@
if (!empty($conferences)) {
$x = 0;
foreach($conferences as $row) {
$list_row_url = '';
if (permission_exists('conference_edit')) {
$list_row_url = "conference_edit.php?id=".urlencode($row['conference_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('conference_add') || permission_exists('conference_edit') || permission_exists('conference_delete')) {
@ -301,3 +305,4 @@
require_once "resources/footer.php";
?>

View File

@ -195,8 +195,12 @@
$x = 0;
foreach($transactions as $row) {
if (empty($row['domain_name'])) { $row['domain_name'] = $text['label-global']; }
$list_row_url = '';
if (permission_exists('database_transaction_edit')) {
$list_row_url = "database_transaction_edit.php?id=".urlencode($row['database_transaction_uuid']).(!empty($page) ? "&page=".urlencode($page) : null).(!empty($search) ? "&search=".urlencode($search) : null);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
echo " <td>".escape($row['domain_name'])."&nbsp;</td>\n";
@ -225,3 +229,4 @@
require_once "resources/footer.php";
?>

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
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):
@ -462,7 +462,6 @@
}
//authorized specific dialplan_detail_type that are safe, sanitize all other values
$dialplan_detail_type = $settings->get('dialplan', 'destination', '');
switch ($dialplan_detail_type) {
case 'destination_number':
break;
@ -2098,7 +2097,7 @@
//enabled
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-destination_enabled']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";

View File

@ -157,6 +157,7 @@
$sql .= "and (";
$sql .= "lower(destination_type) like :search ";
$sql .= "or lower(destination_number) like :search ";
$sql .= "or lower(destination_cid_name_prefix) like :search ";
$sql .= "or lower(destination_context) like :search ";
$sql .= "or lower(destination_accountcode) like :search ";
if (permission_exists('outbound_caller_id_select')) {
@ -201,6 +202,7 @@
$sql .= " d.destination_area_code, ";
$sql .= " d.destination_number, ";
$sql .= " d.destination_actions, ";
$sql .= " d.destination_cid_name_prefix, ";
$sql .= " d.destination_context, ";
$sql .= " d.destination_caller_id_name, ";
$sql .= " d.destination_caller_id_number, ";
@ -221,6 +223,7 @@
$sql .= "and (";
$sql .= " lower(destination_type) like :search ";
$sql .= " or lower(destination_number) like :search ";
$sql .= " or lower(destination_cid_name_prefix) like :search ";
$sql .= " or lower(destination_context) like :search ";
$sql .= " or lower(destination_accountcode) like :search ";
if (permission_exists('outbound_caller_id_select')) {
@ -350,6 +353,9 @@
if (!$show == "all") {
echo "<th>". $text['label-destination_actions']."</th>";
}
if (permission_exists('destination_cid_name_prefix')) {
echo th_order_by('destination_cid_name_prefix', $text['label-destination_cid_name_prefix'], $order_by, $order, $param);
}
if (permission_exists("destination_context")) {
echo th_order_by('destination_context', $text['label-destination_context'], $order_by, $order, $param);
}
@ -369,8 +375,12 @@
foreach ($destinations as $row) {
//create the row link
$list_row_url = '';
if (permission_exists('destination_edit')) {
$list_row_url = "destination_edit.php?id=".urlencode($row['destination_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
//show the data
@ -412,6 +422,9 @@
if (!$show == "all") {
echo " <td class='overflow' style='min-width: 125px;'>".$row['actions']."&nbsp;</td>\n";
}
if (permission_exists("destination_cid_name_prefix")) {
echo " <td>".escape($row['destination_cid_name_prefix'])."&nbsp;</td>\n";
}
if (permission_exists("destination_context")) {
echo " <td>".escape($row['destination_context'])."&nbsp;</td>\n";
}
@ -450,3 +463,4 @@
require_once "resources/footer.php";
?>

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
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.
*/
@ -1101,7 +1101,7 @@
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo "<td class='vncell' width='30%' valign='top' align='left' nowrap='nowrap'>\n";
echo "<td class='vncellreq' width='30%' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-device_address']."\n";
echo "</td>\n";
echo "<td class='vtable' width='70%' align='left'>\n";
@ -1992,7 +1992,7 @@
if (permission_exists('device_enable')) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-device_enabled']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";

View File

@ -237,8 +237,12 @@
if (is_array($device_profiles) && @sizeof($device_profiles) != 0) {
$x = 0;
foreach($device_profiles as $row) {
$list_row_url = '';
if (permission_exists('device_profile_edit')) {
$list_row_url = "device_profile_edit.php?id=".urlencode($row['device_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('device_profile_add') || permission_exists('device_profile_edit') || permission_exists('device_profile_delete')) {
@ -298,3 +302,4 @@
require_once "resources/footer.php";
?>

View File

@ -211,8 +211,12 @@
unset ($vendor_function_groups);
//show the row of data
$list_row_url = '';
if (permission_exists('device_vendor_function_edit')) {
$list_row_url = "device_vendor_function_edit.php?device_vendor_uuid=".urlencode($row['device_vendor_uuid'])."&id=".urlencode($row['device_vendor_function_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('device_vendor_function_add') || permission_exists('device_vendor_function_edit') || permission_exists('device_vendor_function_delete')) {
@ -289,3 +293,4 @@
echo "</script>\n";
?>

View File

@ -178,8 +178,12 @@
if (is_array($result) && @sizeof($result) != 0) {
$x = 0;
foreach($result as $row) {
$list_row_url = '';
if (permission_exists('device_vendor_edit')) {
$list_row_url = "device_vendor_edit.php?id=".urlencode($row['device_vendor_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('device_vendor_edit') || permission_exists('device_vendor_delete')) {
@ -222,3 +226,4 @@
require_once "resources/footer.php";
?>

View File

@ -397,8 +397,12 @@
}
}
$list_row_url = '';
if (permission_exists('device_edit')) {
$list_row_url = "device_edit.php?id=".urlencode($row['device_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
$device_provisioned_method = '';
@ -419,7 +423,7 @@
echo " </td>\n";
}
if (!empty($_GET['show']) && $_GET['show'] == "all" && permission_exists('device_all')) {
echo " <td>".escape($domain_name)."</td>\n";
echo " <td>".escape($row['domain_name'])."</td>\n";
}
echo " <td class='no-wrap'>";
echo permission_exists('device_edit') ? "<a href='".$list_row_url."'>".escape(format_device_address($row['device_address']))."</a>" : escape(format_device_address($row['device_address']));
@ -473,3 +477,4 @@
require_once "resources/footer.php";
?>

View File

@ -551,9 +551,13 @@
$x = 0;
foreach ($dialplans as $row) {
$list_row_url = '';
if ($row['app_uuid'] == "4b821450-926b-175a-af93-a03c441818b1") {
if (permission_exists('time_condition_edit') || permission_exists('dialplan_edit')) {
$list_row_url = PROJECT_PATH."/app/time_conditions/time_condition_edit.php?id=".urlencode($row['dialplan_uuid']).(is_uuid($app_uuid) ? "&app_uuid=".urlencode($app_uuid) : null);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
}
else if (
@ -563,6 +567,9 @@
permission_exists('dialplan_edit')
) {
$list_row_url = "dialplan_edit.php?id=".urlencode($row['dialplan_uuid']).(is_uuid($app_uuid) ? "&app_uuid=".urlencode($app_uuid) : null);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
else {
unset($list_row_url);
@ -648,3 +655,4 @@
require_once "resources/footer.php";
?>

View File

@ -337,8 +337,12 @@
if (is_array($email_queue) && @sizeof($email_queue) != 0) {
$x = 0;
foreach ($email_queue as $row) {
$list_row_url = '';
if (permission_exists('email_queue_edit')) {
$list_row_url = "email_queue_edit.php?id=".urlencode($row['email_queue_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('email_queue_add') || permission_exists('email_queue_edit') || permission_exists('email_queue_delete')) {

View File

@ -189,8 +189,8 @@ echo "<tr class='list-header'>\n";
if (!empty($show) && $show == 'all' && permission_exists('emergency_logs_view_all')) {
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order);
}
echo "<th class='left'>".$text['label-emergency_time']."</th>\n";
echo "<th class='left'>".$text['label-emergency_date']."</th>\n";
echo "<th class='left'>".$text['label-emergency_time']."</th>\n";
echo "<th class='left'>".$text['label-emergency_extension']."</th>\n";
echo "<th class='left'>".$text['label-emergency_event']."</th>\n";
echo "</tr>\n";
@ -202,8 +202,8 @@ if (!empty($emergency_logs) && is_array($emergency_logs) && @sizeof($emergency_l
if (!empty($_GET['show']) && $_GET['show'] == 'all' && permission_exists('emergency_logs_view_all')) {
echo " <td>".escape($_SESSION['domains'][$row['domain_uuid']]['domain_name'])."</td>\n";
}
echo " <td>".escape($row['time_formatted'])."</td>\n";
echo " <td>".escape($row['date_formatted'])."</td>\n";
echo " <td>".escape($row['time_formatted'])."</td>\n";
echo " <td>".escape($row['extension'])."</td>\n";
echo " <td>".escape($row['event'])."</td>\n";
echo "</tr>\n";

View File

@ -244,8 +244,12 @@
if (is_array($event_guard_logs) && @sizeof($event_guard_logs) != 0) {
$x = 0;
foreach ($event_guard_logs as $row) {
$list_row_url = '';
if (permission_exists('event_guard_log_edit')) {
$list_row_url = "event_guard_log_edit.php?id=".urlencode($row['event_guard_log_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 "<tr class='list-row'>\n";
if (permission_exists('event_guard_log_add') || permission_exists('event_guard_log_edit') || permission_exists('event_guard_log_delete')) {

View File

@ -233,7 +233,7 @@
$p->add('event_guard_log_edit', 'temp');
$database->app_name = 'event guard';
$database->app_uuid = 'c5b86612-1514-40cb-8e2c-3f01a8f6f637';
$database->save($array);
$database->save($array, false);
//$message = $database->message;
$p->delete('event_guard_log_edit', 'temp');
unset($array);
@ -353,7 +353,7 @@
$p->add('event_guard_log_add', 'temp');
$database->app_name = 'event guard';
$database->app_uuid = 'c5b86612-1514-40cb-8e2c-3f01a8f6f637';
$database->save($array);
$database->save($array, false);
$p->delete('event_guard_log_add', 'temp');
//send debug information to the console

View File

@ -38,13 +38,56 @@
exit;
}
//initialize the database object
$database = database::new();
//get the domain and user UUIDs
$domain_uuid = $domain_uuid ?? '';
$user_uuid = $user_uuid ?? '';
//add multi-lingual support
$language = new text;
$text = $language->get();
//initialize the core objects
$domain_uuid = $_SESSION['domain_uuid'] ?? '';
$user_uuid = $_SESSION['user_uuid'] ?? '';
$config = config::load();
$database = database::new(['config' => $config]);
$domain_name = $database->select('select domain_name from v_domains where domain_uuid = :domain_uuid', ['domain_uuid' => $domain_uuid], 'column');
$settings = new settings(['database' => $database, 'domain_uuid' => $domain_uuid, 'user_uuid' => $user_uuid]);
//set defaults
$limit_extensions = $settings->get('limit', 'extensions', null);
$limit_devices = $settings->get('limit', 'devices', null);
$extension_limit_max = $settings->get('extension', 'limit_max', 5);
$extension_call_timeout = $settings->get('extension', 'call_timeout', 30);
$extension_max_registrations = $settings->get('extension', 'max_registrations', null);
$extension_password_length = $settings->get('extension', 'password_length', 20); //set default to 20
$extension_password_strength = $settings->get('extension', 'password_strength', 4); //set default to use numbers, Upper/Lowercase letters, special characters
$extension_user_record_default = $settings->get('extension', 'user_record_default', '');
$provision_path = $settings->get('provision', 'path', '');
$provision_line_label = $settings->get('provision','line_label', null);
$provision_line_display_name = $settings->get('provision','line_display_name', null);
$provision_outbound_proxy_primary = $settings->get('provision','outbound_proxy_primary', null);
$provision_outbound_proxy_secondary = $settings->get('provision','outbound_proxy_primary', null);
$provision_server_address_primary = $settings->get('provision','outbound_proxy_primary', null);
$provision_server_address_secondary = $settings->get('provision','outbound_proxy_primary', null);
$provision_line_sip_port = $settings->get('provision','line_sip_port', null);
$provision_line_sip_transport = $settings->get('provision','line_sip_transport', null);
$provision_line_register_expires = $settings->get('provision','line_register_expires', null);
$theme_input_toggle_style = $settings->get('theme','input_toggle_style', ''); //set default to empty string
$voicemail_password_length = $settings->get('voicemail', 'password_length', 6); //set default to 6
$voicemail_transcription_enabled_default = $settings->get('voicemail', 'transcription_enabled_default', false); //set default to false
$voicemail_enabled_default = $settings->get('voicemail', 'enabled_default', true);
$switch_voicemail = $settings->get('switch', 'voicemail', '/var/lib/freeswitch/storage/voicemail') . "/default/$domain_name";
$switch_extensions = $settings->get('switch', 'extensions', '/etc/freeswitch/directory');
$switch_sounds = $settings->get('switch', 'sounds', '/usr/share/freeswitch/sounds');
$transcribe_enabled = $settings->get('transcribe', 'enabled', false);
//cast to integers if they have values
if ($limit_extensions !== null) $limit_extensions = intval($limit_extensions);
if ($limit_devices !== null) $limit_devices = intval($limit_devices);
if ($extension_password_length !== null) $extension_password_length = intval($extension_password_length);
if ($extension_max_registrations !== null) $extension_max_registrations = intval($extension_max_registrations);
//set the action as an add or an update
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
$action = "update";
@ -57,16 +100,16 @@
//get total extension count from the database, check limit, if defined
if ($action == 'add') {
if (!empty($_SESSION['limit']['extensions']['numeric'])) {
$sql = "select count(*) ";
if ($limit_extensions > 0) {
$sql = "select count(extension_uuid) ";
$sql .= "from v_extensions ";
$sql .= "where domain_uuid = :domain_uuid ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$parameters['domain_uuid'] = $domain_uuid;
$total_extensions = $database->select($sql, $parameters, 'column');
unset($sql, $parameters);
if ($total_extensions >= $_SESSION['limit']['extensions']['numeric']) {
message::add($text['message-maximum_extensions'].' '.$_SESSION['limit']['extensions']['numeric'], 'negative');
if ($total_extensions >= $limit_extensions) {
message::add($text['message-maximum_extensions'].' '.$limit_extensions, 'negative');
header('Location: extensions.php'.(isset($page) && is_numeric($page) ? '?page='.$page : null));
exit;
}
@ -176,14 +219,14 @@
$user_uuid = $_POST["extension_users"][0]["user_uuid"] ?? null;
//device provisioning variables
if (is_array($_POST["devices"]) && @sizeof($_POST["devices"]) != 0) {
if (!empty($_POST["devices"])) {
//get the devices
$sql = "select count(device_uuid) from v_devices ";
$sql .= "where domain_uuid = :domain_uuid ";
if (!permission_exists('device_all') && !permission_exists('device_domain_all')) {
$sql .= "and device_user_uuid = :user_uuid ";
$parameters['user_uuid'] = $_SESSION['user_uuid'];
$parameters['user_uuid'] = $user_uuid;
}
$sql .= "order by device_address asc ";
$parameters['domain_uuid'] = $domain_uuid;
@ -195,8 +238,8 @@
!empty($device["device_address"]) &&
strtolower($device["device_address"]) == 'uuid' &&
(
!isset($_SESSION['limit']['devices']['numeric']) ||
$total_devices < $_SESSION['limit']['devices']['numeric']
$limit_devices === null ||
$total_devices < $limit_devices
)) {
$device_address = strtolower(uuid());
}
@ -229,7 +272,7 @@
$parameters['device_address'] = $device_address;
$row = $database->select($sql, $parameters, 'row');
if (is_array($row)) {
if ($_SESSION['domain_uuid'] == $row['domain_uuid']) {
if ($domain_uuid == $row['domain_uuid']) {
$device_uuid = $row['device_uuid'];
$device_domain_name = $row['device_domain_name'];
$device_unique = true;
@ -314,7 +357,7 @@
$domain_uuid = $_POST["domain_uuid"];
}
else {
$domain_uuid = $_SESSION['domain_uuid'];
$domain_uuid = $domain_uuid;
}
//validate the token
@ -345,10 +388,8 @@
}
//prevent users from bypassing extension limit by using range
if (!empty($_SESSION['limit']['extensions']['numeric'])) {
if (isset($total_extensions) && ($total_extensions ?? 0) + $range > $_SESSION['limit']['extensions']['numeric']) {
$range = $_SESSION['limit']['extensions']['numeric'] - $total_extensions;
}
if (isset($total_extensions) && ($total_extensions ?? 0) + $range > $limit_extensions) {
$range = $limit_extensions - $total_extensions;
}
//add or update the database
@ -416,8 +457,8 @@
}
//get the password length and strength
$password_length = $_SESSION["extension"]["password_length"]["numeric"];
$password_strength = $_SESSION["extension"]["password_strength"]["numeric"];
$password_length = $extension_password_length;
$password_strength = $extension_password_strength;
//extension does not exist add it
if ($action == "add" || $range > 1) {
@ -428,7 +469,7 @@
//prepare the values for mwi account
if (!empty($mwi_account) && strpos($mwi_account, '@') === false) {
$mwi_account .= "@".$_SESSION['domain_name'];
$mwi_account .= "@".$domain_name;
}
//generate a password
@ -492,7 +533,7 @@
}
else {
if ($action == "add") {
$array["extensions"][$i]["max_registrations"] = $_SESSION['extension']['max_registrations']['numeric'];
$array["extensions"][$i]["max_registrations"] = $extension_max_registrations;
}
}
if (permission_exists("extension_limit")) {
@ -504,7 +545,7 @@
}
else {
if ($action == "add") {
$array["extensions"][$i]["user_context"] = $_SESSION['domain_name'];
$array["extensions"][$i]["user_context"] = $domain_name;
}
}
if (permission_exists('extension_missed_call')) {
@ -605,11 +646,11 @@
}
//get the dislplay label
if ($_SESSION['provision']['line_label']['text'] == 'auto') {
if ($provision_line_label == 'auto') {
$line_label = $extension;
}
else {
$line_label = $_SESSION['provision']['line_label']['text'];
$line_label = $provision_line_label;
$line_label = str_replace("\${name}", $name, $line_label);
$line_label = str_replace("\${effective_caller_id_name}", $effective_caller_id_name, $line_label);
$line_label = str_replace("\${caller_id_name}", $effective_caller_id_name, $line_label);
@ -622,11 +663,11 @@
}
//get the dislplay name
if ($_SESSION['provision']['line_display_name']['text'] == 'auto') {
if ($provision_line_display_name == 'auto') {
$line_display_name = $name;
}
else {
$line_display_name = $_SESSION['provision']['line_display_name']['text'];
$line_display_name = $provision_line_display_name;
$line_display_name = str_replace("\${name}", $name, $line_display_name);
$line_display_name = str_replace("\${effective_caller_id_name}", $effective_caller_id_name, $line_display_name);
$line_display_name = str_replace("\${caller_id_name}", $effective_caller_id_name, $line_display_name);
@ -640,14 +681,14 @@
//send a message to the user the device is not unique
if (!$device_unique) {
$message = $text['message-duplicate'].(if_group("superadmin") && $_SESSION["domain_name"] != $device_domain_name ? ": ".$device_domain_name : null);
$message = $text['message-duplicate'].(if_group("superadmin") && $domain_name != $device_domain_name ? ": ".$device_domain_name : null);
message::add($message,'negative');
}
//build the devices array
if ($device_unique && $device_address != '000000000000') {
$array["devices"][$j]["device_uuid"] = $device_uuids[$d];
$array["devices"][$j]["domain_uuid"] = $_SESSION['domain_uuid'];
$array["devices"][$j]["domain_uuid"] = $domain_uuid;
$array["devices"][$j]["device_address"] = $device_address;
$array["devices"][$j]["device_label"] = $extension;
if (!empty($device_vendor)) {
@ -659,21 +700,21 @@
$array["devices"][$j]["device_enabled"] = "true";
$array["devices"][$j]["device_lines"][0]["device_uuid"] = $device_uuids[$d];
$array["devices"][$j]["device_lines"][0]["device_line_uuid"] = uuid();
$array["devices"][$j]["device_lines"][0]["domain_uuid"] = $_SESSION['domain_uuid'];
$array["devices"][$j]["device_lines"][0]["server_address"] = $_SESSION['domain_name'];
$array["devices"][$j]["device_lines"][0]["outbound_proxy_primary"] = $_SESSION['provision']['outbound_proxy_primary']['text'];
$array["devices"][$j]["device_lines"][0]["outbound_proxy_secondary"] = $_SESSION['provision']['outbound_proxy_secondary']['text'];
$array["devices"][$j]["device_lines"][0]["server_address_primary"] = $_SESSION['provision']['server_address_primary']['text'];
$array["devices"][$j]["device_lines"][0]["server_address_secondary"] = $_SESSION['provision']['server_address_secondary']['text'];
$array["devices"][$j]["device_lines"][0]["domain_uuid"] = $domain_uuid;
$array["devices"][$j]["device_lines"][0]["server_address"] = $domain_name;
if ($provision_outbound_proxy_primary !== null) $array["devices"][$j]["device_lines"][0]["outbound_proxy_primary"] = $provision_outbound_proxy_primary;
if ($provision_outbound_proxy_secondary !== null) $array["devices"][$j]["device_lines"][0]["outbound_proxy_secondary"] = $provision_outbound_proxy_secondary;
if ($provision_server_address_primary !== null) $array["devices"][$j]["device_lines"][0]["server_address_primary"] = $provision_server_address_primary;
if ($provision_server_address_secondary !== null) $array["devices"][$j]["device_lines"][0]["server_address_secondary"] = $provision_server_address_secondary;
$array["devices"][$j]["device_lines"][0]["label"] = $line_label;
$array["devices"][$j]["device_lines"][0]["display_name"] = $line_display_name;
$array["devices"][$j]["device_lines"][0]["user_id"] = $extension;
$array["devices"][$j]["device_lines"][0]["auth_id"] = $extension;
$array["devices"][$j]["device_lines"][0]["password"] = $password;
$array["devices"][$j]["device_lines"][0]["line_number"] = is_numeric($line_numbers[$d]) ? $line_numbers[$d] : '1';
$array["devices"][$j]["device_lines"][0]["sip_port"] = $_SESSION['provision']['line_sip_port']['text'];
$array["devices"][$j]["device_lines"][0]["sip_transport"] = $_SESSION['provision']['line_sip_transport']['text'];
$array["devices"][$j]["device_lines"][0]["register_expires"] = $_SESSION['provision']['line_register_expires']['text'];
if ($provision_line_sip_port !== null) $array["devices"][$j]["device_lines"][0]["sip_port"] = $provision_line_sip_port;
if ($provision_line_sip_transport !== null) $array["devices"][$j]["device_lines"][0]["sip_transport"] = $provision_line_sip_transport;
if ($provision_line_register_expires !== null) $array["devices"][$j]["device_lines"][0]["register_expires"] = $provision_line_register_expires;
$array["devices"][$j]["device_lines"][0]["enabled"] = "true";
}
@ -689,7 +730,7 @@
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/voicemails')) {
//set the voicemail password
if (empty($voicemail_password)) {
$voicemail_password = generate_password($_SESSION['voicemail']['password_length']['numeric'], 1);
$voicemail_password = generate_password($voicemail_password_length, 1);
}
//add the voicemail to the array
@ -711,8 +752,8 @@
$voicemail_uuid = uuid();
$voicemail_tutorial = 'true';
//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'];
if (!permission_exists('voicemail_transcription_enabled')) {
$voicemail_transcription_enabled = $voicemail_transcription_enabled_default;
}
}
@ -738,8 +779,8 @@
$array["voicemails"][$i]["voicemail_description"] = $description;
//make sure the voicemail directory exists
if (!file_exists($_SESSION['switch']['voicemail']['dir']."/default/".$_SESSION['domain_name']."/".$voicemail_id)) {
mkdir($_SESSION['switch']['voicemail']['dir']."/default/".$_SESSION['domain_name']."/".$voicemail_id, 0770, true);
if (!file_exists($switch_voicemail.'/'.$voicemail_id)) {
mkdir($switch_voicemail."/".$voicemail_id, 0770, true);
}
}
@ -772,8 +813,8 @@
$sql .= "and server_address = :server_address ";
$sql .= "and user_id = :user_id ";
$parameters['password'] = $password;
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$parameters['server_address'] = $_SESSION['domain_name'];
$parameters['domain_uuid'] = $domain_uuid;
$parameters['server_address'] = $domain_name;
$parameters['user_id'] = $extension;
$database->execute($sql, $parameters);
unset($sql, $parameters);
@ -786,7 +827,7 @@
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "and device_key_value = :device_key_value ";
$parameters['device_key_label'] = $effective_caller_id_name;
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$parameters['domain_uuid'] = $domain_uuid;
$parameters['device_key_value'] = $extension;
$database->execute($sql, $parameters);
unset($sql, $parameters);
@ -808,7 +849,7 @@
if (permission_exists('extension_add') || permission_exists('extension_edit')) {
//synchronize configuration
if (!empty($_SESSION['switch']['extensions']['dir']) && is_writable($_SESSION['switch']['extensions']['dir'])) {
if (is_writable($switch_extensions)) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension;
$ext->xml();
@ -816,12 +857,10 @@
}
//write the provision files
if (!empty($_SESSION['provision']['path']['text'])) {
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/provision')) {
$prov = new provision;
$prov->domain_uuid = $domain_uuid;
$response = $prov->write();
}
if (!empty($provision_path) && is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/provision')) {
$prov = new provision;
$prov->domain_uuid = $domain_uuid;
$response = $prov->write();
}
//clear the cache
@ -942,8 +981,8 @@
}
else {
$voicemail_file = $_SESSION['voicemail']['voicemail_file']['text'];
$voicemail_local_after_email = $_SESSION['voicemail']['keep_local']['boolean'];
$voicemail_file = $settings->get('voicemail', 'voicemail_file', 'attach');
$voicemail_local_after_email = $settings->get('voicemail','keep_local', true);
}
//get the device lines
@ -966,7 +1005,7 @@
$sql .= "where domain_uuid = :domain_uuid ";
if (!permission_exists('device_all') && !permission_exists('device_domain_all')) {
$sql .= "and device_user_uuid = :user_uuid ";
$parameters['user_uuid'] = $_SESSION['user_uuid'];
$parameters['user_uuid'] = $user_uuid;
}
$sql .= "order by device_address asc ";
$parameters['domain_uuid'] = $domain_uuid;
@ -1044,30 +1083,30 @@
$toll_allow = str_replace(':',',', $toll_allow ?? '');
//get installed languages
$language_paths = glob($_SESSION["switch"]['sounds']['dir']."/*/*/*");
$language_paths = glob($switch_sounds."/*/*/*");
foreach ($language_paths as $key => $path) {
$path = str_replace($_SESSION["switch"]['sounds']['dir'].'/', "", $path);
$path = str_replace($switch_sounds.'/', "", $path);
$path_array = explode('/', $path);
if (count($path_array) <> 3 || strlen($path_array[0]) <> 2 || strlen($path_array[1]) <> 2) {
unset($language_paths[$key]);
}
$language_paths[$key] = str_replace($_SESSION["switch"]['sounds']['dir']."/","",$language_paths[$key] ?? '');
$language_paths[$key] = str_replace($switch_sounds."/","",$language_paths[$key] ?? '');
if (empty($language_paths[$key])) {
unset($language_paths[$key]);
}
}
//set the defaults
if (empty($user_context)) { $user_context = $_SESSION['domain_name']; }
if (empty($max_registrations)) { $max_registrations = $_SESSION['extension']['max_registrations']['numeric'] ?? ''; }
if (empty($user_context)) { $user_context = $domain_name; }
if (empty($max_registrations)) { $max_registrations = $extension_max_registrations ?? ''; }
if (empty($accountcode)) { $accountcode = get_accountcode(); }
if (empty($limit_max)) { $limit_max = $_SESSION['extension']['limit_max']['numeric'] ?? 5; }
if (empty($limit_max)) { $limit_max = $extension_limit_max; }
if (empty($limit_destination)) { $limit_destination = '!USER_BUSY'; }
if (empty($call_timeout)) { $call_timeout = $_SESSION['extension']['call_timeout']['numeric'] ?? 30; }
if (empty($call_timeout)) { $call_timeout = $extension_call_timeout; }
if (empty($call_screen_enabled)) { $call_screen_enabled = 'false'; }
if (empty($user_record)) { $user_record = $_SESSION['extension']['user_record_default']['text']; }
if (empty($voicemail_transcription_enabled)) { $voicemail_transcription_enabled = $_SESSION['voicemail']['transcription_enabled_default']['boolean']; }
if (empty($voicemail_enabled)) { $voicemail_enabled = $_SESSION['voicemail']['enabled_default']['boolean']; }
if (empty($user_record)) { $user_record = $extension_user_record_default; }
if (empty($voicemail_transcription_enabled)) { $voicemail_transcription_enabled = $voicemail_transcription_enabled_default; }
if (empty($voicemail_enabled)) { $voicemail_enabled = $voicemail_enabled_default; }
if (empty($enabled)) { $enabled = 'true'; }
//create token
@ -1132,7 +1171,7 @@
}
echo "</div>\n";
echo " <div class='actions'>\n";
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','link'=>'extensions.php'.(isset($page) && is_numeric($page) ? '?page='.$page : null)]);
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$settings->get('theme', 'button_icon_back'),'id'=>'btn_back','link'=>'extensions.php'.(isset($page) && is_numeric($page) ? '?page='.$page : null)]);
if ($action == 'update') {
$button_margin = 'margin-left: 15px;';
if (permission_exists('xml_cdr_view')) {
@ -1144,14 +1183,14 @@
unset($button_margin);
}
if (permission_exists('extension_setting_view')) {
echo button::create(['type'=>'button','label'=>$text['button-settings'],'icon'=>$_SESSION['theme']['button_icon_settings'],'id'=>'btn_settings','style'=>'','link'=>PROJECT_PATH.'/app/extension_settings/extension_settings.php?id='.urlencode($extension_uuid)]);
echo button::create(['type'=>'button','label'=>$text['button-settings'],'icon'=>$settings->get('theme', 'button_icon_settings'),'id'=>'btn_settings','style'=>'','link'=>PROJECT_PATH.'/app/extension_settings/extension_settings.php?id='.urlencode($extension_uuid)]);
}
if (permission_exists('extension_copy')) {
echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','style'=>'margin-left: 15px;','onclick'=>"copy_extension();"]);
echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$settings->get('theme', 'button_icon_copy'),'id'=>'btn_copy','style'=>'margin-left: 15px;','onclick'=>"copy_extension();"]);
}
}
echo button::create(['type'=>'button','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','style'=>'margin-left: 15px;','onclick'=>'submit_form();']);
echo button::create(['type'=>'button','label'=>$text['button-save'],'icon'=>$settings->get('theme', 'button_icon_save'),'id'=>'btn_save','style'=>'margin-left: 15px;','onclick'=>'submit_form();']);
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
@ -1165,7 +1204,7 @@
echo "</td>\n";
echo "<td width='70%' class='vtable' align='left'>\n";
if ($action == "add" || permission_exists("extension_extension")) {
echo " <input class='formfld' type='text' name='extension' autocomplete='new-password' maxlength='255' value=\"".escape($extension ?? '')."\" required='required' placeholder=\"".($_SESSION['extension']['extension_range']['text'] ?? '')."\">\n";
echo " <input class='formfld' type='text' name='extension' autocomplete='new-password' maxlength='255' value=\"".escape($extension ?? '')."\" required='required' placeholder=\"".$settings->get('extension','extension_range','')."\">\n";
echo " <input type='text' style='display: none;' disabled='disabled'>\n"; //help defeat browser auto-fill
echo "<br />\n";
echo $text['description-extension']."\n";
@ -1270,7 +1309,7 @@
}
echo " </select>";
if ($action == "update") {
echo button::create(['type'=>'submit','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add']]);
echo button::create(['type'=>'submit','label'=>$text['button-add'],'icon'=>$settings->get('theme', 'button_icon_add')]);
}
echo " <br>\n";
}
@ -1404,7 +1443,7 @@
}
}
}
if (permission_exists('device_address_uuid') && (!isset($_SESSION['limit']['devices']['numeric']) || $total_devices < $_SESSION['limit']['devices']['numeric'])) {
if (permission_exists('device_address_uuid') && ($limit_devices === null || $total_devices < $limit_devices)) {
echo " <option disabled='disabled'></option>\n";
echo " <option value='UUID'>".$text['label-generate']."</option>\n";
}
@ -1439,7 +1478,7 @@
echo " </td>\n";
if (is_array($device_lines) && @sizeof($device_lines) != 0) {
echo " <td>\n";
echo button::create(['type'=>'submit','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add']]);
echo button::create(['type'=>'submit','label'=>$text['button-add'],'icon'=>$settings->get('theme', 'button_icon_add')]);
echo " </td>\n";
}
echo " </tr>\n";
@ -1788,7 +1827,7 @@
echo "</td>\n";
echo "</tr>\n";
if (permission_exists('voicemail_transcription_enabled') && ($_SESSION['transcribe']['enabled']['boolean'] ?? '') == "true") {
if (permission_exists('voicemail_transcription_enabled') && $transcribe_enabled) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-voicemail_transcription_enabled']."\n";
@ -1904,10 +1943,10 @@
echo " ".$text['label-call_group']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
if (!empty($_SESSION['call_group']['name']) && is_array($_SESSION['call_group']['name'])) {
if (!empty($settings->get('call_group', 'name')) && is_array($settings->get('call_group', 'name'))) {
echo " <select class='formfld' name='call_group'>\n";
echo " <option value=''></option>\n";
foreach ($_SESSION['call_group']['name'] as $name) {
foreach ($settings->get('call_group', 'name') as $name) {
if ($name == $call_group) {
echo " <option value='".escape($name)."' selected='selected'>".escape($name)."</option>\n";
}
@ -2271,7 +2310,7 @@
echo " ".$text['label-enabled']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
if (substr($_SESSION['theme']['input_toggle_style']['text'], 0, 6) == 'switch') {
if (substr($settings->get('theme', 'input_toggle_style'), 0, 6) == 'switch') {
echo " <label class='switch'>\n";
echo " <input type='checkbox' id='enabled' name='enabled' value='true' ".($enabled == 'true' ? "checked='checked'" : null).">\n";
echo " <span class='slider'></span>\n";
@ -2311,7 +2350,7 @@
echo "<input type='hidden' name='extension_uuid' value='".escape($extension_uuid)."'>\n";
echo "<input type='hidden' name='id' id='id' value='".escape($extension_uuid)."'>";
if (!permission_exists('extension_domain')) {
echo "<input type='hidden' name='domain_uuid' id='domain_uuid' value='".$_SESSION['domain_uuid']."'>";
echo "<input type='hidden' name='domain_uuid' id='domain_uuid' value='".$domain_uuid."'>";
}
echo "<input type='hidden' name='delete_type' id='delete_type' value=''>";
echo "<input type='hidden' name='delete_uuid' id='delete_uuid' value=''>";

View File

@ -339,8 +339,12 @@
if (is_array($extensions) && @sizeof($extensions) != 0) {
$x = 0;
foreach($extensions as $row) {
$list_row_url = '';
if (permission_exists('extension_edit')) {
$list_row_url = "extension_edit.php?id=".urlencode($row['extension_uuid']).(is_numeric($page) ? '&page='.urlencode($page) : null);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('extension_enabled') || permission_exists('extension_delete')) {
@ -447,3 +451,4 @@
require_once "resources/footer.php";
?>

View File

@ -312,7 +312,23 @@
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "The information contained in this facsimile is intended for the sole confidential use of the recipient(s) designated above, and may contain confidential and legally privileged information. If you are not the intended recipient, you are hereby notified that the review, disclosure, dissemination, distribution, copying, duplication in any form, and taking of any action in regards to the contents of this document - except with respect to its direct delivery to the intended recipient - is strictly prohibited. Please notify the sender immediately and destroy this cover sheet and all attachments. If stored or viewed electronically, please permanently delete it from your system.";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Notice displayed in the footer of the cover sheet.";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Default text to populate the Footer field of a new fax (displayed below the box on the cover sheet).";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "034a7f00-9455-4354-978e-7978d193f675";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "fax";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "cover_message";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Default text to populate the Message field of a new fax (displayed inside the box on the cover sheet).";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "760eb1ec-249a-4482-bdc4-3fd35d604db9";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "fax";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "cover_message_height";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "6.15";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the default height (inches) of the Message box on the cover sheet.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "e907df99-6b3a-4864-bd11-681888f20289";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "fax";
@ -320,7 +336,7 @@
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Default information displayed beneath the logo in the header of the cover sheet.";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Default text to populate the Header field of a new fax (displayed near the top of the cover sheet, beneath the logo).";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "8338a404-3966-416e-b4f9-a1ac36c37bd1";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "fax";

View File

@ -247,8 +247,12 @@
if (is_array($result) && @sizeof($result) != 0) {
$x = 0;
foreach ($result as $row) {
$list_row_url = '';
if (permission_exists('fax_extension_edit')) {
$list_row_url = "fax_edit.php?id=".urlencode($row['fax_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('fax_extension_add') || permission_exists('fax_extension_delete')) {
@ -325,3 +329,4 @@
require_once "resources/footer.php";
?>

View File

@ -433,7 +433,7 @@ if (!function_exists('fax_split_dtmf')) {
if (in_array($logo_fileext, ['gif','jpg','jpeg','png','bmp'])) {
if (file_exists($logo_dirname.'/'.$logo_filename)) {
$logo = $logo_dirname.'/'.$logo_filename;
$display_logo = true;
$display_logo = true;
}
else {
$raw = file_get_contents($logo);
@ -568,7 +568,13 @@ if (!function_exists('fax_split_dtmf')) {
unset($yn);
}
else {
$pdf->Rect($x + 0.5, $y + 3.4, 7.5, 6.25, 'D');
//determine cover message box height, and difference, to adjust footer position accordingly
$cover_message_height = $setting->get('fax','cover_message_height');
$cover_message_height = (float) ($cover_message_height ?? 6.15);
$height_difference = 6.15 - $cover_message_height;
// draw message box
$pdf->Rect($x + 0.5, $y + 3.4, 7.5, $cover_message_height, 'D');
$y = $pdf->GetY();
}
@ -577,7 +583,7 @@ if (!function_exists('fax_split_dtmf')) {
$pdf->SetAutoPageBreak(true, 0.6);
$pdf->SetTopMargin(0.6);
$pdf->SetFont("helvetica", "", 8);
$pdf->SetXY($x + 0.5, $y + 0.6);
$pdf->SetXY($x + 0.5, $y + 0.6 - (float) ($height_difference ?? 0));
$pdf->MultiCell(7.5, 0.75, $fax_footer, 0, 'C', false);
}
$pdf->SetAutoPageBreak(false);
@ -669,7 +675,7 @@ if (!function_exists('fax_split_dtmf')) {
}
exit;
}
//prepare variables send the fax
$mail_from_address = (!empty($setting->get('fax','smtp_from'))) ? $setting->get('fax','smtp_from') : $setting->get('email','smtp_from');
@ -746,7 +752,7 @@ if (!function_exists('fax_split_dtmf')) {
$fax_file = $dir_fax_sent."/".$fax_instance_uuid.".tif";
$common_variables = "fax_queue_uuid=".$fax_queue_uuid.",";
$common_variables .= "fax_uuid=" . $fax_uuid . ",";
//$common_variables .= "accountcode='".$fax_accountcode."',";
$common_variables .= "accountcode='".$fax_accountcode."',";
$common_variables .= "sip_h_accountcode='".$fax_accountcode."',";
$common_variables .= "domain_uuid=".$domain_uuid.",";
$common_variables .= "domain_name=".$domain_name.",";
@ -760,6 +766,8 @@ if (!function_exists('fax_split_dtmf')) {
if (!empty($provider_prefix)) {
$common_variables .= "provider_prefix='".$provider_prefix."',";
}
$common_variables .= "hangup_after_bridge=true,";
$common_variables .= "continue_on_fail=true,";
if (!empty($fax_numbers)) {
foreach ($fax_numbers as $fax_number) {
@ -940,7 +948,7 @@ if (!defined('STDIN')) {
}
if (is_array($contact_labels)) {
//sort by name(s)
asort($contact_labels, SORT_NATURAL);
asort($contact_labels, SORT_NATURAL);
}
}
@ -1015,7 +1023,7 @@ if (!defined('STDIN')) {
echo "</div>\n";
echo $text['description-2']." ".(permission_exists('fax_extension_view_domain') ? $text['description-3'] : null)."\n";
echo "<br /><br />\n";
if ($domain_enabled == false) {
echo "<div class='warning_bar'>".$text['notice-sending-disabled']."</div>\n";
}
@ -1160,7 +1168,7 @@ if (!defined('STDIN')) {
echo " ".$text['label-fax-message']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <textarea type='text' name='fax_message' class='formfld' ".$required." style='width: 65%; height: 175px;'></textarea>\n";
echo " <textarea type='text' name='fax_message' class='formfld' ".$required." style='width: 65%; height: 175px;'>".$setting->get('fax','cover_message')."</textarea>\n";
echo "<br />\n";
echo " ".$text['description-fax-message']."\n";
echo "</td>\n";
@ -1220,4 +1228,4 @@ function showgrid($pdf) {
}
}
*/
?>
?>

View File

@ -332,8 +332,12 @@
if (!empty($fax_queue)) {
$x = 0;
foreach ($fax_queue as $row) {
$list_row_url = '';
if ($permission['fax_queue_edit']) {
$list_row_url = "fax_queue_edit.php?id=".urlencode($row['fax_queue_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if ($permission['fax_queue_add'] || $permission['fax_queue_edit'] || $permission['fax_queue_delete']) {

View File

@ -224,6 +224,23 @@
//sending the fax
if ($fax_status == 'waiting' || $fax_status == 'trying' || $fax_status == 'busy') {
//get the provider_prefix from the domain_variables dialplan
$sql = "select dialplan_detail_data from v_dialplan_details ";
$sql .= "where dialplan_uuid in ( ";
$sql .= " select dialplan_uuid from v_dialplans ";
$sql .= " where dialplan_name = 'domain-variables' ";
$sql .= " and domain_uuid = :domain_uuid ";
$sql .= ") ";
$sql .= "and dialplan_detail_data like 'provider_prefix%' ";
$sql .= "and dialplan_detail_enabled = 'true' ";
$parameters['domain_uuid'] = $domain_uuid;
$row = $database->select($sql, $parameters, 'row');
$dialplan_detail_data = $row["dialplan_detail_data"];
unset($sql, $parameters, $row);
if (!empty($dialplan_detail_data)) {
$provider_prefix = explode('=', $dialplan_detail_data)[1];
}
//create event socket handle
$esl = event_socket::create();
if (!$esl->is_connected()) {
@ -310,6 +327,8 @@
$common_variables .= "fax_ident='" . escape_quote($fax_caller_id_number) . "',";
$common_variables .= "fax_header='" . escape_quote($fax_caller_id_name) . "',";
$common_variables .= "fax_file='" . escape_quote($fax_file) . "',";
$common_variables .= "hangup_after_bridge=true,";
$common_variables .= "continue_on_fail=true,";
//add the fax destination number variables
if ($local_destination) {
@ -317,9 +336,13 @@
$common_variables .= "sip_req_user=".$fax_number.",";
}
//prepare the fax command
$channel_variables["toll_allow"] = !empty($fax_toll_allow) ? $fax_toll_allow : null;
$route_array = outbound_route_to_bridge($domain_uuid, $fax_prefix . $fax_number, $channel_variables);
if (empty($route_array)) {
$route_array = outbound_route_to_bridge($domain_uuid, $fax_prefix . $fax_number, $channel_variables);
//send the internal call to the registered extension
if (count($route_array) == 0) {
//check for valid extension
$sql = "select count(extension_uuid) ";
@ -331,18 +354,36 @@
$extension_count = $database->select($sql, $parameters, 'column');
if ($extension_count > 0) {
//send the internal call to the registered extension
$route_array[] = "user/".$fax_number."@".$domain_name;
$fax_uri = "user/".$fax_number."@".$domain_name;
}
else {
$fax_uri = '';
$fax_status = 'failed';
}
}
}
else {
foreach($route_array as $key => $bridge) {
//add the bridge to the fax_uri, after first iteration add the delimiter
if ($key == 0) {
$fax_uri = $bridge;
}
else {
$fax_uri .= '|'.$bridge;
}
//add the provider_prefix
if (!empty($provider_prefix)) {
$fax_uri = preg_replace('/\${provider_prefix}/', $provider_prefix, $fax_uri);
}
//remove switch ${variables} from the bridge statement
$fax_uri = preg_replace('/\${[^}]+}/', '', $fax_uri);
}
}
//set the origination uuid
if (!is_uuid($origination_uuid)) {
$origination_uuid = uuid();
}
$origination_uuid = uuid();
//build a list of fax variables
$dial_string = $common_variables;
@ -364,21 +405,18 @@
//connect to event socket and send the command
if ($fax_status != 'failed' && file_exists($fax_file)) {
//send the fax and try another route if the fax fails
foreach($route_array as $route) {
$fax_command = "originate {" . $dial_string . ",fax_uri=".$route."}" . $route." &txfax('".$fax_file."')";
$fax_response = event_socket::api($fax_command);
$response = str_replace("\n", "", $fax_response);
$response = trim(str_replace("+OK", "", $response));
if (is_uuid($response)) {
//originate command accepted
$uuid = $response;
echo "uuid: ".$uuid."\n";
break;
}
else {
//originate command failed (-ERR INVALID_GATEWAY or other errors)
echo "response: ".$response."\n";
}
$fax_command = "originate {" . $dial_string . ",fax_uri=".$fax_uri."}" . $fax_uri." &txfax('".$fax_file."')";
$fax_response = event_socket::api($fax_command);
$response = str_replace("\n", "", $fax_response);
$response = trim(str_replace("+OK", "", $response));
if (is_uuid($response)) {
//originate command accepted
$uuid = $response;
echo "uuid: ".$uuid."\n";
}
else {
//originate command failed (-ERR INVALID_GATEWAY or other errors)
echo "response: ".$response."\n";
}
//set the fax file name without the extension

View File

@ -5,7 +5,7 @@
$apps[$x]['uuid'] = '16589224-c876-aeb3-f59f-523a1c0801f7';
$apps[$x]['category'] = 'Switch';
$apps[$x]['subcategory'] = '';
$apps[$x]['version'] = '2.0';
$apps[$x]['version'] = '2.1';
$apps[$x]['license'] = 'Mozilla Public License 1.1';
$apps[$x]['url'] = 'http://www.fusionpbx.com';
$apps[$x]['description']['en-us'] = "Queues are used to setup waiting lines for callers. Also known as FIFO Queues.";
@ -140,11 +140,31 @@
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'A feature code for the agent to login or logout of the Queue.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "fifo_strategy";
$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'] = "Select the strategy.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fifo_members';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fifo_timeout_seconds';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fifo_exit_key';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'numeric';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fifo_exit_action';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fifo_music';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
@ -268,4 +288,4 @@
//cache details
$apps[$x]['cache']['key'] = "dialplan.\${domain_name}";
?>
?>

View File

@ -324,6 +324,87 @@ $text['description-fifo_agent_queue']['zh-cn'] = "代理等待呼叫者或接听
$text['description-fifo_agent_queue']['ja-jp'] = "エージェントが発信者を待機したり、キューで待機中の通話に応答したりするためのキュー。";
$text['description-fifo_agent_queue']['ko-kr'] = "상담원이 발신자를 기다리거나 대기열에 대기 중인 전화를 받기 위한 대기열입니다.";
$text['label-strategy']['en-us'] = "Strategy";
$text['label-strategy']['en-gb'] = "Strategy";
$text['label-strategy']['ar-eg'] = "الاستراتيجية";
$text['label-strategy']['de-at'] = "Strategie";
$text['label-strategy']['de-ch'] = "Strategie";
$text['label-strategy']['de-de'] = "Strategie";
$text['label-strategy']['el-gr'] = "Στρατηγική";
$text['label-strategy']['es-cl'] = "Estrategia";
$text['label-strategy']['es-mx'] = "Estrategia";
$text['label-strategy']['fr-ca'] = "Stratégie";
$text['label-strategy']['fr-fr'] = "Stratégie";
$text['label-strategy']['he-il'] = "אסטרטגיה";
$text['label-strategy']['it-it'] = "Strategia";
$text['label-strategy']['ka-ge'] = "სტრატეგია";
$text['label-strategy']['nl-nl'] = "Strategie";
$text['label-strategy']['pl-pl'] = "Strategia";
$text['label-strategy']['pt-br'] = "Estratégia";
$text['label-strategy']['pt-pt'] = "Estratégia";
$text['label-strategy']['ro-ro'] = "Strategie";
$text['label-strategy']['ru-ru'] = "Стратегия";
$text['label-strategy']['sv-se'] = "Strategi";
$text['label-strategy']['uk-ua'] = "Стратегія";
$text['label-strategy']['tr-tr'] = "Strateji";
$text['label-strategy']['zh-cn'] = "战略";
$text['label-strategy']['ja-jp'] = "ストラテジー";
$text['label-strategy']['ko-kr'] = "전략";
$text['description-strategy']['en-us'] = "Select the ring strategy.";
$text['description-strategy']['en-gb'] = "Select the ring strategy.";
$text['description-strategy']['ar-eg'] = "اختيار استراتيجية الخاتم.";
$text['description-strategy']['de-at'] = "Wählen Sie eine Strategie.";
$text['description-strategy']['de-ch'] = "Wählen Sie eine Strategie.";
$text['description-strategy']['de-de'] = "Wählen Sie eine Strategie.";
$text['description-strategy']['el-gr'] = "Επιλέξτε τη στρατηγική του δακτυλίου.";
$text['description-strategy']['es-cl'] = "Ingrese la estrategia de llamado.";
$text['description-strategy']['es-mx'] = "Ingrese la estrategia de llamado.";
$text['description-strategy']['fr-ca'] = "Choisir la statégie de sonnerie.";
$text['description-strategy']['fr-fr'] = "Choisir la statégie de sonnerie.";
$text['description-strategy']['he-il'] = "בחר את אסטרטגיית החיוג";
$text['description-strategy']['it-it'] = "Selezionare la strategia di squillo.";
$text['description-strategy']['ka-ge'] = "აირჩიეთ ზარის სტრატეგია.";
$text['description-strategy']['nl-nl'] = "Kies de bel strategie.";
$text['description-strategy']['pl-pl'] = "Wybierz strategię";
$text['description-strategy']['pt-br'] = "Selecione a estraétia da fila";
$text['description-strategy']['pt-pt'] = "Escolha o tipo de estratégia de toque.";
$text['description-strategy']['ro-ro'] = "Selectați strategia de inel.";
$text['description-strategy']['ru-ru'] = "Выберите стратегию вызовов.";
$text['description-strategy']['sv-se'] = "Välj strategi för ringflöde.";
$text['description-strategy']['uk-ua'] = "Виберіть стратегію кільця.";
$text['description-strategy']['tr-tr'] = "Zil stratejisini seçin.";
$text['description-strategy']['zh-cn'] = "选择响铃策略。";
$text['description-strategy']['ja-jp'] = "リング戦略を選択します。";
$text['description-strategy']['ko-kr'] = "링 전략을 선택합니다.";
$text['message-strategy']['en-us'] = "Please provide: Strategy";
$text['message-strategy']['en-gb'] = "Please provide: Strategy";
$text['message-strategy']['ar-eg'] = "يرجى تقديم ما يلي: الاستراتيجية";
$text['message-strategy']['de-at'] = "Bitte geben Sie folgendes an: Strategie";
$text['message-strategy']['de-ch'] = "Bitte geben Sie folgendes an: Strategie";
$text['message-strategy']['de-de'] = "Bitte geben Sie folgendes an: Strategie";
$text['message-strategy']['el-gr'] = "Παρέχετε: Στρατηγική";
$text['message-strategy']['es-cl'] = "Por favor indique: Estrategia";
$text['message-strategy']['es-mx'] = "Por favor indique: Estrategia";
$text['message-strategy']['fr-ca'] = "Merci d'indiquer: Stratégie";
$text['message-strategy']['fr-fr'] = "Merci d'indiquer: Stratégie";
$text['message-strategy']['he-il'] = "נא לספק: אסטרטגיה";
$text['message-strategy']['it-it'] = "Prego fornire: Strategia";
$text['message-strategy']['ka-ge'] = "შეიყვანეთ: სტრატეგია";
$text['message-strategy']['nl-nl'] = "Geef aub.: Strategie";
$text['message-strategy']['pl-pl'] = "Wprowadź strategię";
$text['message-strategy']['pt-br'] = "Por favor indique: Estratégia";
$text['message-strategy']['pt-pt'] = "Por favor indique: Estratégia";
$text['message-strategy']['ro-ro'] = "Vă rugăm să furnizați: Strategie";
$text['message-strategy']['ru-ru'] = "Пожалуйста укажите: Стратегию";
$text['message-strategy']['sv-se'] = "Ange: Strategi";
$text['message-strategy']['uk-ua'] = "Будь ласка, заповніть: Стратегія";
$text['message-strategy']['tr-tr'] = "Lütfen sağlayın: Strateji";
$text['message-strategy']['zh-cn'] = "请提供:策略";
$text['message-strategy']['ja-jp'] = "提供してください: 戦略";
$text['message-strategy']['ko-kr'] = "제공하십시오: 전략";
$text['label-fifo_members']['en-us'] = "Agents";
$text['label-fifo_members']['en-gb'] = "Agents";
$text['label-fifo_members']['ar-eg'] = "عملاء";
@ -377,6 +458,7 @@ $text['description-fifo_members']['zh-cn'] = "代理是队列的成员。队列
$text['description-fifo_members']['ja-jp'] = "エージェントはキューのメンバーです。キュー内の通話は、対応可能なエージェントに分配されます。";
$text['description-fifo_members']['ko-kr'] = "에이전트는 대기열의 멤버입니다. 대기열의 통화는 사용 가능한 에이전트에게 분배됩니다.";
$text['label-fifo_music']['en-us'] = "Music";
$text['label-fifo_music']['en-gb'] = "Music";
$text['label-fifo_music']['ar-eg'] = "موسيقى";
@ -431,6 +513,162 @@ $text['description-fifo_music']['zh-cn'] = "选择排队等候时可以听到的
$text['description-fifo_music']['ja-jp'] = "キューで待機中に聞く保留音を選択します。";
$text['description-fifo_music']['ko-kr'] = "대기열에서 기다리는 동안 들을 수 있는 대기 음악을 선택하세요.";
$text['label-fifo_timeout_seconds']['en-us'] = 'Timeout';
$text['label-fifo_timeout_seconds']['en-gb'] = 'Timeout';
$text['label-fifo_timeout_seconds']['ar-eg'] = '';
$text['label-fifo_timeout_seconds']['de-at'] = '';
$text['label-fifo_timeout_seconds']['de-ch'] = '';
$text['label-fifo_timeout_seconds']['de-de'] = '';
$text['label-fifo_timeout_seconds']['el-gr'] = '';
$text['label-fifo_timeout_seconds']['es-cl'] = '';
$text['label-fifo_timeout_seconds']['es-mx'] = '';
$text['label-fifo_timeout_seconds']['fr-ca'] = '';
$text['label-fifo_timeout_seconds']['fr-fr'] = '';
$text['label-fifo_timeout_seconds']['he-il'] = '';
$text['label-fifo_timeout_seconds']['it-it'] = '';
$text['label-fifo_timeout_seconds']['nl-nl'] = '';
$text['label-fifo_timeout_seconds']['pl-pl'] = '';
$text['label-fifo_timeout_seconds']['pt-br'] = '';
$text['label-fifo_timeout_seconds']['pt-pt'] = '';
$text['label-fifo_timeout_seconds']['ro-ro'] = '';
$text['label-fifo_timeout_seconds']['ru-ru'] = '';
$text['label-fifo_timeout_seconds']['sv-se'] = '';
$text['label-fifo_timeout_seconds']['uk-ua'] = '';
$text['label-fifo_timeout_seconds']['tr-tr'] = '';
$text['label-fifo_timeout_seconds']['zh-cn'] = '';
$text['label-fifo_timeout_seconds']['ja-jp'] = '';
$text['label-fifo_timeout_seconds']['ko-kr'] = '';
$text['description-fifo_timeout_seconds']['en-us'] = 'Enter the queue timeout seconds. 0 means no queue timeout.';
$text['description-fifo_timeout_seconds']['en-gb'] = 'Enter the queue timeout seconds. 0 means no queue timeout.';
$text['description-fifo_timeout_seconds']['ar-eg'] = '';
$text['description-fifo_timeout_seconds']['de-at'] = '';
$text['description-fifo_timeout_seconds']['de-ch'] = '';
$text['description-fifo_timeout_seconds']['de-de'] = '';
$text['description-fifo_timeout_seconds']['el-gr'] = '';
$text['description-fifo_timeout_seconds']['es-cl'] = '';
$text['description-fifo_timeout_seconds']['es-mx'] = '';
$text['description-fifo_timeout_seconds']['fr-ca'] = '';
$text['description-fifo_timeout_seconds']['fr-fr'] = '';
$text['description-fifo_timeout_seconds']['he-il'] = '';
$text['description-fifo_timeout_seconds']['it-it'] = '';
$text['description-fifo_timeout_seconds']['nl-nl'] = '';
$text['description-fifo_timeout_seconds']['pl-pl'] = '';
$text['description-fifo_timeout_seconds']['pt-br'] = '';
$text['description-fifo_timeout_seconds']['pt-pt'] = '';
$text['description-fifo_timeout_seconds']['ro-ro'] = '';
$text['description-fifo_timeout_seconds']['ru-ru'] = '';
$text['description-fifo_timeout_seconds']['sv-se'] = '';
$text['description-fifo_timeout_seconds']['uk-ua'] = '';
$text['description-fifo_timeout_seconds']['tr-tr'] = '';
$text['description-fifo_timeout_seconds']['zh-cn'] = '';
$text['description-fifo_timeout_seconds']['ja-jp'] = '';
$text['description-fifo_timeout_seconds']['ko-kr'] = '';
$text['label-fifo_exit_key']['en-us'] = 'Exit Key';
$text['label-fifo_exit_key']['en-gb'] = 'Exit Key';
$text['label-fifo_exit_key']['ar-eg'] = '';
$text['label-fifo_exit_key']['de-at'] = '';
$text['label-fifo_exit_key']['de-ch'] = '';
$text['label-fifo_exit_key']['de-de'] = '';
$text['label-fifo_exit_key']['el-gr'] = '';
$text['label-fifo_exit_key']['es-cl'] = '';
$text['label-fifo_exit_key']['es-mx'] = '';
$text['label-fifo_exit_key']['fr-ca'] = '';
$text['label-fifo_exit_key']['fr-fr'] = '';
$text['label-fifo_exit_key']['he-il'] = '';
$text['label-fifo_exit_key']['it-it'] = '';
$text['label-fifo_exit_key']['nl-nl'] = '';
$text['label-fifo_exit_key']['pl-pl'] = '';
$text['label-fifo_exit_key']['pt-br'] = '';
$text['label-fifo_exit_key']['pt-pt'] = '';
$text['label-fifo_exit_key']['ro-ro'] = '';
$text['label-fifo_exit_key']['ru-ru'] = '';
$text['label-fifo_exit_key']['sv-se'] = '';
$text['label-fifo_exit_key']['uk-ua'] = '';
$text['label-fifo_exit_key']['tr-tr'] = '';
$text['label-fifo_exit_key']['zh-cn'] = '';
$text['label-fifo_exit_key']['ja-jp'] = '';
$text['label-fifo_exit_key']['ko-kr'] = '';
$text['description-fifo_exit_key']['en-us'] = 'Enter the number to exit the queue.';
$text['description-fifo_exit_key']['en-gb'] = 'Enter the number to exit the queue.';
$text['description-fifo_exit_key']['ar-eg'] = '';
$text['description-fifo_exit_key']['de-at'] = '';
$text['description-fifo_exit_key']['de-ch'] = '';
$text['description-fifo_exit_key']['de-de'] = '';
$text['description-fifo_exit_key']['el-gr'] = '';
$text['description-fifo_exit_key']['es-cl'] = '';
$text['description-fifo_exit_key']['es-mx'] = '';
$text['description-fifo_exit_key']['fr-ca'] = '';
$text['description-fifo_exit_key']['fr-fr'] = '';
$text['description-fifo_exit_key']['he-il'] = '';
$text['description-fifo_exit_key']['it-it'] = '';
$text['description-fifo_exit_key']['nl-nl'] = '';
$text['description-fifo_exit_key']['pl-pl'] = '';
$text['description-fifo_exit_key']['pt-br'] = '';
$text['description-fifo_exit_key']['pt-pt'] = '';
$text['description-fifo_exit_key']['ro-ro'] = '';
$text['description-fifo_exit_key']['ru-ru'] = '';
$text['description-fifo_exit_key']['sv-se'] = '';
$text['description-fifo_exit_key']['uk-ua'] = '';
$text['description-fifo_exit_key']['tr-tr'] = '';
$text['description-fifo_exit_key']['zh-cn'] = '';
$text['description-fifo_exit_key']['ja-jp'] = '';
$text['description-fifo_exit_key']['ko-kr'] = '';
$text['label-fifo_exit_action']['en-us'] = 'Exit Action';
$text['label-fifo_exit_action']['en-gb'] = 'Exit Action';
$text['label-fifo_exit_action']['ar-eg'] = '';
$text['label-fifo_exit_action']['de-at'] = '';
$text['label-fifo_exit_action']['de-ch'] = '';
$text['label-fifo_exit_action']['de-de'] = '';
$text['label-fifo_exit_action']['el-gr'] = '';
$text['label-fifo_exit_action']['es-cl'] = '';
$text['label-fifo_exit_action']['es-mx'] = '';
$text['label-fifo_exit_action']['fr-ca'] = '';
$text['label-fifo_exit_action']['fr-fr'] = '';
$text['label-fifo_exit_action']['he-il'] = '';
$text['label-fifo_exit_action']['it-it'] = '';
$text['label-fifo_exit_action']['nl-nl'] = '';
$text['label-fifo_exit_action']['pl-pl'] = '';
$text['label-fifo_exit_action']['pt-br'] = '';
$text['label-fifo_exit_action']['pt-pt'] = '';
$text['label-fifo_exit_action']['ro-ro'] = '';
$text['label-fifo_exit_action']['ru-ru'] = '';
$text['label-fifo_exit_action']['sv-se'] = '';
$text['label-fifo_exit_action']['uk-ua'] = '';
$text['label-fifo_exit_action']['tr-tr'] = '';
$text['label-fifo_exit_action']['zh-cn'] = '';
$text['label-fifo_exit_action']['ja-jp'] = '';
$text['label-fifo_exit_action']['ko-kr'] = '';
$text['description-fifo_exit_action']['en-us'] = 'Select where to route the caller when exiting the queue.';
$text['description-fifo_exit_action']['en-gb'] = 'Select where to route the caller when exiting the queue.';
$text['description-fifo_exit_action']['ar-eg'] = '';
$text['description-fifo_exit_action']['de-at'] = '';
$text['description-fifo_exit_action']['de-ch'] = '';
$text['description-fifo_exit_action']['de-de'] = '';
$text['description-fifo_exit_action']['el-gr'] = '';
$text['description-fifo_exit_action']['es-cl'] = '';
$text['description-fifo_exit_action']['es-mx'] = '';
$text['description-fifo_exit_action']['fr-ca'] = '';
$text['description-fifo_exit_action']['fr-fr'] = '';
$text['description-fifo_exit_action']['he-il'] = '';
$text['description-fifo_exit_action']['it-it'] = '';
$text['description-fifo_exit_action']['nl-nl'] = '';
$text['description-fifo_exit_action']['pl-pl'] = '';
$text['description-fifo_exit_action']['pt-br'] = '';
$text['description-fifo_exit_action']['pt-pt'] = '';
$text['description-fifo_exit_action']['ro-ro'] = '';
$text['description-fifo_exit_action']['ru-ru'] = '';
$text['description-fifo_exit_action']['sv-se'] = '';
$text['description-fifo_exit_action']['uk-ua'] = '';
$text['description-fifo_exit_action']['tr-tr'] = '';
$text['description-fifo_exit_action']['zh-cn'] = '';
$text['description-fifo_exit_action']['ja-jp'] = '';
$text['description-fifo_exit_action']['ko-kr'] = '';
$text['label-fifo_order']['en-us'] = "Order";
$text['label-fifo_order']['en-gb'] = "Order";
$text['label-fifo_order']['ar-eg'] = "طلب";
@ -755,6 +993,59 @@ $text['description-member_simultaneous']['zh-cn'] = "同时输入成员。";
$text['description-member_simultaneous']['ja-jp'] = "メンバー同時入力。";
$text['description-member_simultaneous']['ko-kr'] = "회원을 동시 입력하세요.";
$text['option-longest_idle_agent']['en-us'] = "Longest Idle Agent";
$text['option-longest_idle_agent']['en-gb'] = "Longest Idle Agent";
$text['option-longest_idle_agent']['ar-eg'] = "أطول عامل خامل";
$text['option-longest_idle_agent']['de-at'] = "Agent mit der höchsten Wartezeit";
$text['option-longest_idle_agent']['de-ch'] = "Agent mit der höchsten Wartezeit";
$text['option-longest_idle_agent']['de-de'] = "Agent mit der höchsten Wartezeit";
$text['option-longest_idle_agent']['el-gr'] = "Ο μακρύτερος πράκτορας σε αδράνεια";
$text['option-longest_idle_agent']['es-cl'] = "Agente desocupado por más tiempo";
$text['option-longest_idle_agent']['es-mx'] = "Agente desocupado por más tiempo";
$text['option-longest_idle_agent']['fr-ca'] = "Agent inactif le plus longtemps";
$text['option-longest_idle_agent']['fr-fr'] = "Agent inactif le plus longtemps";
$text['option-longest_idle_agent']['he-il'] = "סוכן הסרק הארוך ביותר";
$text['option-longest_idle_agent']['it-it'] = "Da più tempo libero";
$text['option-longest_idle_agent']['ka-ge'] = "ოპერატორი, რომელიც ყველაზე დიდხანს იყო უქმად";
$text['option-longest_idle_agent']['nl-nl'] = "Langst wachtende agent";
$text['option-longest_idle_agent']['pl-pl'] = "Najdlużej bezczynny agent";
$text['option-longest_idle_agent']['pt-br'] = "Agente desocupado há mais tempo";
$text['option-longest_idle_agent']['pt-pt'] = "Agente desocupado há mais tempo";
$text['option-longest_idle_agent']['ro-ro'] = "Cel mai lung agent inactiv";
$text['option-longest_idle_agent']['ru-ru'] = "Максимально незанятый оператор";
$text['option-longest_idle_agent']['sv-se'] = "Agent Längst Ledig";
$text['option-longest_idle_agent']['uk-ua'] = "Найдовше бездіяльний агент";
$text['option-longest_idle_agent']['zh-cn'] = "最长空闲代理";
$text['option-longest_idle_agent']['ja-jp'] = "最長アイドル エージェント";
$text['option-longest_idle_agent']['ko-kr'] = "가장 긴 유휴 에이전트";
$text['option-simultaneous']['en-us'] = "Simultaneous";
$text['option-simultaneous']['en-gb'] = "Simultaneous";
$text['option-simultaneous']['ar-eg'] = "بسيطة";
$text['option-simultaneous']['de-at'] = "gleichzeitig";
$text['option-simultaneous']['de-ch'] = "gleichzeitig";
$text['option-simultaneous']['de-de'] = "gleichzeitig";
$text['option-simultaneous']['el-gr'] = "Ταυτόχρονος";
$text['option-simultaneous']['es-cl'] = "Simultaneos";
$text['option-simultaneous']['es-mx'] = "Simultaneos";
$text['option-simultaneous']['fr-ca'] = "Simultané";
$text['option-simultaneous']['fr-fr'] = "Simultané";
$text['option-simultaneous']['he-il'] = "באותו הזמן";
$text['option-simultaneous']['it-it'] = "Parallelo";
$text['option-simultaneous']['ka-ge'] = "ერთდროული";
$text['option-simultaneous']['nl-nl'] = "Gelijktijdig";
$text['option-simultaneous']['pl-pl'] = "Jednoczesne";
$text['option-simultaneous']['pt-br'] = "Simultâneo";
$text['option-simultaneous']['pt-pt'] = "Simultâneo";
$text['option-simultaneous']['ro-ro'] = "Simultan";
$text['option-simultaneous']['ru-ru'] = "Одновременное";
$text['option-simultaneous']['sv-se'] = "Samtidig";
$text['option-simultaneous']['uk-ua'] = "Симулятор";
$text['option-simultaneous']['tr-tr'] = "Eş zamanlı";
$text['option-simultaneous']['zh-cn'] = "同时";
$text['option-simultaneous']['ja-jp'] = "同時に";
$text['option-simultaneous']['ko-kr'] = "동시";
$text['label-member_wrap_up_time']['en-us'] = "Wrap Up Time";
$text['label-member_wrap_up_time']['en-gb'] = "Wrap Up Time";
$text['label-member_wrap_up_time']['ar-eg'] = "وقت الختام";
@ -836,4 +1127,4 @@ $text['label-member_enabled']['zh-cn'] = "已启用";
$text['label-member_enabled']['ja-jp'] = "有効";
$text['label-member_enabled']['ko-kr'] = "활성화됨";
?>
?>

View File

@ -145,8 +145,8 @@
$sql .= "fifo_uuid, ";
$sql .= "fifo_name, ";
$sql .= "fifo_extension, ";
$sql .= "fifo_agent_queue, ";
$sql .= "fifo_agent_status, ";
$sql .= "fifo_agent_queue, ";
$sql .= "fifo_music, ";
$sql .= "u.domain_uuid, ";
$sql .= "d.domain_name, ";
@ -249,8 +249,8 @@
}
echo th_order_by('fifo_name', $text['label-fifo_name'], $order_by, $order);
echo th_order_by('fifo_extension', $text['label-fifo_extension'], $order_by, $order);
echo th_order_by('fifo_agent_queue', $text['label-fifo_agent_queue'], $order_by, $order);
echo th_order_by('fifo_agent_status', $text['label-fifo_agent_status'], $order_by, $order);
echo th_order_by('fifo_agent_queue', $text['label-fifo_agent_queue'], $order_by, $order);
echo th_order_by('fifo_order', $text['label-fifo_order'], $order_by, $order);
echo th_order_by('fifo_enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
echo " <th class='hide-sm-dn'>".$text['label-fifo_description']."</th>\n";
@ -264,6 +264,9 @@
foreach ($fifo as $row) {
if (permission_exists('fifo_edit')) {
$list_row_url = "fifo_edit.php?id=".urlencode($row['fifo_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('fifo_add') || permission_exists('fifo_edit') || permission_exists('fifo_delete')) {
@ -284,8 +287,8 @@
}
echo " </td>\n";
echo " <td>".escape($row['fifo_extension'])."</td>\n";
echo " <td>".escape($row['fifo_agent_queue'])."</td>\n";
echo " <td>".escape($row['fifo_agent_status'])."</td>\n";
echo " <td>".escape($row['fifo_agent_queue'])."</td>\n";
echo " <td>".escape($row['fifo_order'])."</td>\n";
if (permission_exists('fifo_edit')) {
echo " <td class='no-link center'>\n";
@ -319,4 +322,4 @@
//include the footer
require_once "resources/footer.php";
?>
?>

View File

@ -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;
}
@ -135,7 +142,11 @@
if (strlen($fifo_extension) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_extension']."<br>\n"; }
//if (strlen($fifo_agent_status) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_agent_status']."<br>\n"; }
//if (strlen($fifo_agent_queue) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_agent_queue']."<br>\n"; }
if (strlen($fifo_strategy) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_strategy']."<br>\n"; }
//if (strlen($fifo_members) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_members']."<br>\n"; }
//if (strlen($fifo_timeout_seconds) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_timeout_seconds']."<br>\n"; }
//if (strlen($fifo_exit_key) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_exit_key']."<br>\n"; }
//if (strlen($fifo_exit_action) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_exit_action']."<br>\n"; }
//if (strlen($fifo_music) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_music']."<br>\n"; }
if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-domain_uuid']."<br>\n"; }
if (strlen($fifo_order) == 0) { $msg .= $text['message-required']." ".$text['label-fifo_order']."<br>\n"; }
@ -177,6 +188,11 @@
$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_exit_key'] = $fifo_exit_key;
$array['fifo'][0]['fifo_music'] = $fifo_music;
$array['fifo'][0]['fifo_order'] = $fifo_order;
$array['fifo'][0]['fifo_enabled'] = $fifo_enabled;
@ -197,32 +213,85 @@
}
}
//send commands for agent login or agent logout
if (is_array($fifo_members)) {
foreach ($fifo_members as $row) {
//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::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 = "<extension name=\"".xml::sanitize($fifo_name)."\" continue=\"false\" uuid=\"".xml::sanitize($dialplan_uuid)."\">\n";
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".xml::sanitize($fifo_extension)."\$\" break=\"on-true\">\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_uuid=".$fifo_uuid."\" inline=\"true\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_music=".$fifo_music."\" inline=\"true\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_uuid=".xml::sanitize($fifo_uuid)."\" inline=\"true\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_music=".xml::sanitize($fifo_music)."\" inline=\"true\"/>\n";
if ($fifo_strategy == 'longest_idle_agent') {
$dialplan_xml .= " <action application=\"set\" data=\"fifo_strategy=waiting_longer\" inline=\"true\"/>\n";
}
if ($fifo_strategy == 'simultaneous') {
$dialplan_xml .= " <action application=\"set\" data=\"fifo_strategy=more_ppl\" inline=\"true\"/>\n";
}
/*
<action application="set" data="fifo_orbit_dialplan=XML"/>
<action application="set" data="fifo_orbit_context=default"/>
<action application="set" data="fifo_orbit_announce=digits/6.wav"/>
<action application="set" data="fifo_caller_exit_key=2"/>
<action application="set" data="fifo_caller_exit_to_orbit=true"/>
*/
if (!empty($fifo_exit_key)) {
$dialplan_xml .= " <action application=\"set\" data=\"fifo_caller_exit_key=".xml::sanitize($fifo_exit_key)."\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_orbit_dialplan=XML\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_orbit_context=".xml::sanitize($_SESSION['domain_name'])."\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_caller_exit_to_orbit=true\"/>\n";
}
if (!empty($fifo_orbit_exten)) {
$dialplan_xml .= " <action application=\"set\" data=\"fifo_orbit_exten=".xml::sanitize($fifo_orbit_exten)."\"/>\n";
}
$dialplan_xml .= " <action application=\"answer\" data=\"\"/>\n";
$dialplan_xml .= " <action application=\"fifo\" data=\"$queue_name in\"/>\n";
$dialplan_xml .= " <action application=\"fifo\" data=\"".xml::sanitize($queue_name)." in\"/>\n";
$dialplan_xml .= " </condition>\n";
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".$fifo_agent_status_xml."\$\" break=\"on-true\">\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_uuid=".$fifo_uuid."\" inline=\"true\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_name=$queue_name\" inline=\"true\"/>\n";
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".xml::sanitize($fifo_agent_status_xml)."\$\" break=\"on-true\">\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_uuid=".xml::sanitize($fifo_uuid)."\" inline=\"true\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_name=".xml::sanitize($queue_name)."\" inline=\"true\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"user_name=\${caller_id_number}@\${domain_name}\" inline=\"true\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"pin_number=\" inline=\"true\"/>\n";
$dialplan_xml .= " <action application=\"lua\" data=\"app/fifo/resources/scripts/member.lua\"/>\n";
$dialplan_xml .= " </condition>\n";
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".$fifo_agent_queue_xml."\$\" break=\"on-true\">\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_uuid=".$fifo_uuid."\" inline=\"true\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_music=".$fifo_music."\" inline=\"true\"/>\n";
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".xml::sanitize($fifo_agent_queue_xml)."\$\" break=\"on-true\">\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_uuid=".xml::sanitize($fifo_uuid)."\" inline=\"true\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"fifo_music=".xml::sanitize($fifo_music)."\" inline=\"true\"/>\n";
$dialplan_xml .= " <action application=\"answer\" data=\"\"/>\n";
$dialplan_xml .= " <action application=\"fifo\" data=\"$queue_name out wait\"/>\n";
$dialplan_xml .= " <action application=\"fifo\" data=\"".xml::sanitize($queue_name)." out wait\"/>\n";
$dialplan_xml .= " </condition>\n";
$dialplan_xml .= "</extension>\n";
@ -247,7 +316,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 +364,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 +378,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 +385,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 +414,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 +432,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 +463,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
@ -396,14 +485,11 @@
echo " <div class='heading'><b>".$text['title-fifo']."</b></div>\n";
echo " <div class='actions'>\n";
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$button_icon_back,'id'=>'btn_back','collapse'=>'hide-xs','style'=>'margin-right: 15px;','link'=>'fifo.php']);
// if ($action == 'update') {
// if (permission_exists('fifo_member_add')) {
// echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$button_icon_copy,'id'=>'btn_copy','name'=>'btn_copy','style'=>'display: none;','onclick'=>"modal_open('modal-copy','btn_copy');"]);
// }
// if (permission_exists('fifo_member_delete')) {
// echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$button_icon_delete,'id'=>'btn_delete','name'=>'btn_delete','style'=>'display: none; margin-right: 15px;','onclick'=>"modal_open('modal-delete','btn_delete');"]);
// }
// }
if ($action == 'update') {
if (permission_exists('fifo_member_delete')) {
echo button::create(['type'=>'submit','label'=>$text['button-delete'],'icon'=>$button_icon_delete,'id'=>'btn_delete','name'=>'action','value'=>'delete','style'=>'display: none; margin-right: 15px;']);
}
}
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$button_icon_save,'id'=>'btn_save','collapse'=>'hide-xs']);
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
@ -425,7 +511,7 @@
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo "<td width='30%' class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fifo_name']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
@ -468,6 +554,20 @@
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-strategy']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='fifo_strategy' onchange=\"getElementById('destination_delayorder').innerHTML = (this.selectedIndex == 1 || this.selectedIndex == 3) ? '".$text['label-destination_order']."' : '".$text['label-destination_delay']."';\">\n";
echo " <option value='longest_idle_agent' ".(($fifo_strategy == "'option-longest_idle_agent") ? "selected='selected'" : null).">".$text['option-longest_idle_agent']."</option>\n";
echo " <option value='simultaneous' ".(($fifo_strategy == "simultaneous") ? "selected='selected'" : null).">".$text['option-simultaneous']."</option>\n";
echo " </select>\n";
echo "<br />\n";
echo $text['description-strategy']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fifo_members']."\n";
@ -480,9 +580,9 @@
//echo " <th class='vtablereq'>".$text['label-member_simultaneous']."</th>\n";
echo " <th class='vtablereq'>".$text['label-member_wrap_up_time']."</th>\n";
echo " <th class='vtablereq'>".$text['label-member_enabled']."</th>\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 " <td class='vtable edit_delete_checkbox_all' onmouseover=\"swap_display('delete_label_details', 'delete_toggle_details');\" onmouseout=\"swap_display('delete_label_details', 'delete_toggle_details');\">\n";
echo " <span id='delete_label_details'>".$text['label-action']."</span>\n";
echo " <span id='delete_label_details'>".$text['label-delete']."</span>\n";
echo " <span id='delete_toggle_details'><input type='checkbox' id='checkbox_all_details' name='checkbox_all' onclick=\"edit_all_toggle('details'); checkbox_on_change(this);\"></span>\n";
echo " </td>\n";
}
@ -497,9 +597,9 @@
if (empty($row["member_wrap_up_time"])) { $row["member_wrap_up_time"] = '10'; }
echo " <tr>\n";
echo " <input type='hidden' name='fifo_members[$x][domain_uuid]' value=\"".escape($row["domain_uuid"])."\">\n";
echo " <input type='hidden' name='fifo_members[$x][fifo_uuid]' value=\"".escape($row["fifo_uuid"])."\">\n";
echo " <input type='hidden' name='fifo_members[$x][fifo_member_uuid]' value=\"".escape($row["fifo_member_uuid"])."\">\n";
echo " <input type='hidden' name='fifo_members[$x][domain_uuid]' value=\"".escape($row["domain_uuid"])."\">\n";
echo " <input type='hidden' name='fifo_members[$x][fifo_uuid]' value=\"".escape($row["fifo_uuid"])."\">\n";
echo " <input type='hidden' name='fifo_members[$x][fifo_member_uuid]' value=\"".escape($row["fifo_member_uuid"])."\">\n";
echo " <td class='formfld'>\n";
echo " $member_contact\n";
echo " </td>\n";
@ -526,7 +626,7 @@
echo " </select>\n";
}
echo " </td>\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 " <td class='vtable' style='text-align: center; padding-bottom: 3px;'>\n";
echo " <input type='checkbox' name='fifo_members[".$x."][checked]' value='true' class='chk_delete checkbox_details' onclick=\"checkbox_on_change(this);\">\n";
@ -546,16 +646,47 @@
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fifo_timeout_seconds']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
echo " <input class='formfld' type='text' name='fifo_timeout_seconds' maxlength='255' value='".escape($fifo_timeout_seconds)."'>\n";
echo "<br />\n";
echo $text['description-fifo_timeout_seconds']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fifo_exit_key']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
echo " <input class='formfld' type='text' name='fifo_exit_key' maxlength='255' value='".escape($fifo_exit_key)."'>\n";
echo "<br />\n";
echo $text['description-fifo_exit_key']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fifo_exit_action']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
$destination = new destinations;
echo $destination->select('dialplan', 'fifo_exit_action', $fifo_exit_action);
echo "<br />\n";
echo $text['description-fifo_exit_action']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fifo_music']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
//echo " <input class='formfld' type='text' name='fifo_music' maxlength='255' value='".escape($fifo_music)."'>\n";
$ringbacks = new ringbacks;
echo $ringbacks->select('fifo_music', $fifo_music ?? null);
echo "<br />\n";
echo $text['description-fifo_music']."\n";
echo "</td>\n";

View File

@ -980,7 +980,7 @@
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "flyingvoice_voice_vad";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "1";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set 1 = On, 0 = Off (default)";
$y++;

View File

@ -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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('gateway_add') || permission_exists('gateway_edit') || permission_exists('gateway_delete')) {
@ -391,3 +395,4 @@
require_once "resources/footer.php";
?>

View File

@ -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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('ivr_menu_add') || permission_exists('ivr_menu_edit') || permission_exists('ivr_menu_delete')) {
@ -298,3 +302,4 @@
require_once "resources/footer.php";
?>

View File

@ -205,6 +205,7 @@
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
echo "<div class='card'>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
@ -297,6 +298,7 @@
echo "</tr>\n";
echo "</table>";
echo "</div>";
echo "<br><br>";
if ($action == "update") {

View File

@ -202,8 +202,12 @@
echo "</tr>\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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('module_edit') || permission_exists('module_delete')) {
@ -283,3 +287,4 @@
require_once "resources/footer.php";
?>

View File

@ -74,4 +74,3 @@
}
?>

View File

@ -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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('number_translation_add') || permission_exists('number_translation_edit') || permission_exists('number_translation_delete')) {
@ -276,3 +280,4 @@
require_once "resources/footer.php";
?>

View File

@ -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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('phrase_add') || permission_exists('phrase_edit') || permission_exists('phrase_delete')) {
@ -273,3 +277,4 @@
require_once "resources/footer.php";
?>

View File

@ -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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('pin_number_add') || permission_exists('pin_number_edit') || permission_exists('pin_number_delete')) {
@ -241,3 +245,4 @@
require_once "resources/footer.php";
?>

View File

@ -802,20 +802,11 @@
//set the variables
$line_number = $row['line_number'];
$register_expires = $row['register_expires'];
$sip_transport = strtolower($row['sip_transport']);
$sip_port = $row['sip_port'];
$sip_transport = strtolower($row['sip_transport'] ?? 'tcp');
$sip_port = $row['sip_port'] ?? '5060';
//set defaults
if (empty($register_expires)) { $register_expires = "120"; }
if (empty($sip_transport)) { $sip_transport = "tcp"; }
if (!isset($sip_port)) {
if ($line_number == "" || $line_number == "1") {
$sip_port = "5060";
}
else {
$sip_port = "506".($line_number + 1);
}
}
//convert seconds to minutes for grandstream
if ($device_vendor == 'grandstream') {

View File

@ -529,8 +529,12 @@
echo "<tr class='list-row' id='recording_progress_bar_".escape($row['recording_uuid'])."' onclick=\"recording_seek(event,'".escape($row['recording_uuid'] ?? '')."')\" style='display: none;'><td id='playback_progress_bar_background_".escape($row['recording_uuid'])."' class='playback_progress_bar_background' style='padding: 0; border: none;' colspan='".$col_count."'><span class='playback_progress_bar' id='recording_progress_".escape($row['recording_uuid'])."'></span></td></tr>\n";
echo "<tr class='list-row' style='display: none;'><td></td></tr>\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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('recording_delete')) {
@ -710,3 +714,4 @@
}
?>

View File

@ -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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('ring_group_add') || permission_exists('ring_group_edit') || permission_exists('ring_group_delete')) {
@ -315,3 +319,4 @@
require_once "resources/footer.php";
?>

View File

@ -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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('sip_profile_add') || permission_exists('sip_profile_edit') || permission_exists('sip_profile_delete')) {
@ -239,3 +243,4 @@
require_once "resources/footer.php";
?>

View File

@ -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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('sofia_global_setting_add') || permission_exists('sofia_global_setting_edit') || permission_exists('sofia_global_setting_delete')) {
@ -261,3 +265,4 @@
require_once "resources/footer.php";
?>

View File

@ -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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('stream_add') || permission_exists('stream_edit') || permission_exists('stream_delete')) {
@ -315,3 +319,4 @@
require_once "resources/footer.php";
?>

View File

@ -11,6 +11,8 @@
<param name="sip-trace" value="no"/>
<param name="context" value="public"/>
<param name="rfc2833-pt" value="101"/>
<!-- RFC 5626 : Send reg-id and sip.instance -->
<param name="enable-rfc-5626" value="true" enabled="false"/>
<!-- port to bind to for sip traffic -->
<param name="sip-port" value="5060"/>
<param name="dialplan" value="XML"/>

View File

@ -83,6 +83,8 @@
<param name="context" value="public"/>
<param name="rfc2833-pt" value="101"/>
<!-- RFC 5626 : Send reg-id and sip.instance -->
<param name="enable-rfc-5626" value="true" enabled="false"/>
<!-- port to bind to for sip traffic -->
<param name="sip-port" value="5060"/>
<param name="dialplan" value="XML"/>

View File

@ -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();

View File

@ -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}", "<a href='"..link_address.."/app/voicemails/voicemail_messages.php?action=download&id="..id.."&voicemail_uuid="..db_voicemail_uuid.."&uuid="..uuid.."&t=bin'>"..text['label-download'].."</a>");
else
body = body:gsub("${message}", "<a href='"..link_address.."/app/voicemails/voicemail_messages.php?action=autoplay&id="..db_voicemail_uuid.."&uuid="..uuid.."&vm="..id.."'>"..text['label-listen'].."</a>");
end
--body = body:gsub(" ", "&nbsp;");
--body = body:gsub("%s+", "");
--body = body:gsub("&nbsp;", " ");
body = trim(body);
else
body = '<html><body>';
if (caller_id_name ~= nil and caller_id_name ~= caller_id_number) then
body = body .. caller_id_name .. '<br>';
end
body = body .. caller_id_number .. '<br>';
body = body .. message_date .. '<br>';
if (voicemail_file == "attach" and file) then
body = body .. '<br>' .. text['label-attached'];
elseif (voicemail_file == "link") then
body = body .. "<br><a href='"..link_address.."/app/voicemails/voicemail_messages.php?action=download&id="..id.."&voicemail_uuid="..db_voicemail_uuid.."&uuid="..uuid.."&t=bin'>"..text['label-download'].."</a>";
else
body = body .. "<br><a href='"..link_address.."/app/voicemails/voicemail_messages.php?action=autoplay&id="..db_voicemail_uuid.."&uuid="..uuid.."&vm="..id.."'>"..text['label-listen'].."</a>";
end
body = body .. '</body></html>';
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}", "<a href='"..link_address.."/app/voicemails/voicemail_messages.php?action=download&id="..id.."&voicemail_uuid="..db_voicemail_uuid.."&uuid="..uuid.."&t=bin'>"..text['label-download'].."</a>");
else
body = body:gsub("${message}", "<a href='"..link_address.."/app/voicemails/voicemail_messages.php?action=autoplay&id="..db_voicemail_uuid.."&uuid="..uuid.."&vm="..id.."'>"..text['label-listen'].."</a>");
end
--body = body:gsub(" ", "&nbsp;");
--body = body:gsub("%s+", "");
--body = body:gsub("&nbsp;", " ");
body = trim(body);
else
body = '<html><body>';
if (caller_id_name ~= nil and caller_id_name ~= caller_id_number) then
body = body .. caller_id_name .. '<br>';
end
body = body .. caller_id_number .. '<br>';
body = body .. message_date .. '<br>';
if (voicemail_file == "attach" and file) then
body = body .. '<br>' .. text['label-attached'];
elseif (voicemail_file == "link") then
body = body .. "<br><a href='"..link_address.."/app/voicemails/voicemail_messages.php?action=download&id="..id.."&voicemail_uuid="..db_voicemail_uuid.."&uuid="..uuid.."&t=bin'>"..text['label-download'].."</a>";
else
body = body .. "<br><a href='"..link_address.."/app/voicemails/voicemail_messages.php?action=autoplay&id="..db_voicemail_uuid.."&uuid="..uuid.."&vm="..id.."'>"..text['label-listen'].."</a>";
end
body = body .. '</body></html>';
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

View File

@ -21,8 +21,8 @@
echo "<div class='hud_box'>\n";
$c = 0;
$row_style["0"] = "row_style0";
$row_style["1"] = "row_style1";
$row_style['0'] = "row_style0";
$row_style['1'] = "row_style1";
//disk usage
if (PHP_OS == 'FreeBSD' || PHP_OS == 'Linux') {
@ -37,16 +37,16 @@
if (!empty($percent_disk_usage)) {
//add half doughnut chart
echo " <div class='hud_content' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_system_status_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"").">\n";
echo " <div class='hud_content' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_system_disk_usage_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"").">\n";
echo " <span class='hud_title'><a onclick=\"document.location.href='".PROJECT_PATH."/app/system/system.php'\">".$text['label-disk_usage']."</a></span>\n";
if (!isset($dashboard_chart_type) || $dashboard_chart_type == "doughnut") {
?>
<div class='hud_chart' style='width: 175px;'><canvas id='system_status_chart'></canvas></div>
<div class='hud_chart' style='width: 175px;'><canvas id='system_disk_usage_chart'></canvas></div>
<script>
const system_status_chart = new Chart(
document.getElementById('system_status_chart').getContext('2d'),
const system_disk_usage_chart = new Chart(
document.getElementById('system_disk_usage_chart').getContext('2d'),
{
type: 'doughnut',
data: {
@ -102,133 +102,60 @@
}
if ($dashboard_details_state != 'disabled') {
echo "<div class='hud_details hud_box' id='hud_system_status_details'>";
echo "<div class='hud_details hud_box' id='hud_system_disk_usage_details'>";
echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
echo "<tr>\n";
echo "<th class='hud_heading' width='50%'>".$text['label-item']."</th>\n";
echo "<th class='hud_heading' style='text-align: right;'>".$text['label-value']."</th>\n";
echo " <th class='hud_heading' width='50%'>".($text['label-mount_point'] ?? 'Mount Point')."</th>\n";
echo " <th class='hud_heading' style='text-align: center;'>".($text['label-size'] ?? 'Size')."</th>\n";
echo " <th class='hud_heading' style='text-align: center;'>".($text['label-used'] ?? 'Used')."</th>\n";
echo " <th class='hud_heading' style='text-align: right;'>".($text['label-available'] ?? 'Available')."</th>\n";
echo "</tr>\n";
//pbx version
echo "<tr class='tr_link_void'>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text'>".(isset($_SESSION['theme']['title']['text'])?$_SESSION['theme']['title']['text']:'FusionPBX')."</td>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: right;'>".software::version()."</td>\n";
echo "</tr>\n";
$c = ($c) ? 0 : 1;
//os uptime
if (stristr(PHP_OS, 'Linux')) {
$prefix = 'up ';
$linux_uptime = shell_exec('uptime -p');
$uptime = substr($linux_uptime, strlen($prefix));
if (!empty($uptime)) {
echo "<tr class='tr_link_void'>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text'>".$text['label-system_uptime']."</td>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: right;'>".$uptime."</td>\n";
echo "</tr>\n";
$c = ($c) ? 0 : 1;
}
}
//memory usage (for available memory, use "free | awk 'FNR == 3 {print $4/($3+$4)*100}'" instead)
if (stristr(PHP_OS, 'Linux')) {
$free = shell_exec("/usr/bin/which free");
$awk = shell_exec("/usr/bin/which awk");
$percent_memory = round((float)shell_exec(escapeshellcmd($free." | ".$awk." 'FNR == 3 {print $3/($3+$4)*100}'")), 1);
if (!empty($percent_memory)) {
echo "<tr class='tr_link_void'>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text'>".$text['label-memory_usage']."</td>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: right;'>".$percent_memory."%</td>\n";
echo "</tr>\n";
$c = ($c) ? 0 : 1;
}
}
//memory available
if (stristr(PHP_OS, 'Linux')) {
$result = trim(shell_exec('free -hw | grep \'Mem:\' | cut -d\' \' -f 55-64'));
if (!empty($result)) {
echo "<tr class='tr_link_void'>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text'>".$text['label-memory_available']."</td>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: right;'>".$result."</td>\n";
echo "</tr>\n";
$c = ($c) ? 0 : 1;
}
}
//disk usage
if (stristr(PHP_OS, 'Linux')) {
//calculated above
if (!empty($percent_disk_usage)) {
echo "<tr class='tr_link_void'>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text'>".$text['label-disk_usage']."</td>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: right;'>".$percent_disk_usage."%</td>\n";
echo "</tr>\n";
$c = ($c) ? 0 : 1;
}
}
//db connections
switch ($db_type) {
case 'pgsql':
$sql = "select count(*) from pg_stat_activity";
break;
case 'mysql':
$sql = "show status where `variable_name` = 'Threads_connected'";
break;
default:
unset($sql);
if (!empty($db_path) && !empty($dbfilename)) {
$tmp = shell_exec("lsof ".realpath($db_path).'/'.$dbfilename);
$tmp = explode("\n", $tmp);
$connections = sizeof($tmp) - 1;
if (permission_exists('system_view_hdd')) {
$system_information = [];
if (stristr(PHP_OS, 'Linux') || stristr(PHP_OS, 'FreeBSD')) {
$shell_result = shell_exec('df -hP');
if (!empty($shell_result)) {
$lines = explode("\n",$shell_result);
//name the columns
$column_names = preg_split("/[\s,]+/", $lines[0]);
$col_file_system = array_search('Filesystem', $column_names, true); //usually 0
$col_size = array_search('Size', $column_names, true); //usually 1
$col_used = array_search('Used', $column_names, true); //usually 2
$col_available = array_search('Avail', $column_names, true); //usually 3
$col_mount_point = array_search('Mounted', $column_names, true); //usually 5 but can be 4
//skip heading line by starting at 1
for ($i = 1; $i < count($lines); $i++) {
$line = $lines[$i];
$columns = preg_split("/[\s,]+/", $line);
$system_information['os']['disk'][$i-1]['file_system'] = $columns[$col_file_system];
$system_information['os']['disk'][$i-1][ 'size' ] = $columns[ $col_size ];
$system_information['os']['disk'][$i-1][ 'used' ] = $columns[ $col_used ];
$system_information['os']['disk'][$i-1][ 'available' ] = $columns[ $col_available ];
$system_information['os']['disk'][$i-1]['mount_point'] = $columns[$col_mount_point];
}
}
}
if (!empty($sql)) {
if (!isset($database)) { $database = new database; }
$connections = $database->select($sql, null, 'column');
unset($sql);
}
if (!empty($connections)) {
echo "<tr class='tr_link_void'>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text'>".$text['label-database_connections']."</td>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: right;'>".$connections."</td>\n";
echo "</tr>\n";
$c = ($c) ? 0 : 1;
}
foreach ($system_information['os']['disk'] as $disk) {
echo "<tr class='tr_link_void'>\n";
echo " <td valign='top' class='".$row_style[$c]." hud_text' style='text-align: left;'>".$disk['mount_point']."</td>\n";
echo " <td valign='top' class='".$row_style[$c]." hud_text' style='text-align: center;'>".$disk[ 'size' ]."</td>\n";
echo " <td valign='top' class='".$row_style[$c]." hud_text' style='text-align: center;'>".$disk[ 'used' ]."</td>\n";
echo " <td valign='top' class='".$row_style[$c]." hud_text' style='text-align: right;'>".$disk[ 'available' ]."</td>\n";
echo "</tr>\n";
$c = ($c) ? 0 : 1;
}
}
else if (stristr(PHP_OS, 'WIN')) {
//channel count
$esl = event_socket::create();
if ($esl->is_connected()) {
$tmp = event_socket::api('status');
$matches = Array();
preg_match("/(\d+)\s+session\(s\)\s+\-\speak/", $tmp, $matches);
$channels = !empty($matches[1]) ? $matches[1] : 0;
$tr_link = "href='".PROJECT_PATH."/app/calls_active/calls_active.php'";
echo "<tr ".$tr_link.">\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text'><a ".$tr_link.">".$text['label-channels']."</a></td>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: right;'>".$channels."</td>\n";
echo "</tr>\n";
$c = ($c) ? 0 : 1;
}
//registration count
if ($esl->is_connected() && file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/registrations/")) {
$registration = new registrations;
$registrations = $registration->count();
$tr_link = "href='".PROJECT_PATH."/app/registrations/registrations.php'";
echo "<tr ".$tr_link.">\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text'><a ".$tr_link.">".$text['label-registrations']."</a></td>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: right;'>".$registrations."</td>\n";
echo "</tr>\n";
$c = ($c) ? 0 : 1;
}
}
echo "</table>\n";
echo "</div>";
//$n++;
echo "<span class='hud_expander' onclick=\"$('#hud_system_status_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"><span class='fas fa-ellipsis-h'></span></span>";
echo "<span class='hud_expander' onclick=\"$('#hud_system_disk_usage_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"><span class='fas fa-ellipsis-h'></span></span>";
}
echo "</div>\n";

View File

@ -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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('time_condition_add') || permission_exists('time_condition_edit') || permission_exists('time_condition_delete')) {
@ -282,3 +286,4 @@
require_once "resources/footer.php";
?>

View File

@ -224,8 +224,12 @@
echo "</tr>\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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('var_add') || permission_exists('var_edit') || permission_exists('var_delete')) {
@ -283,3 +287,4 @@
require_once "resources/footer.php";
?>

View File

@ -437,8 +437,12 @@
echo "<tr class='list-row' id='recording_progress_bar_".escape($row['voicemail_greeting_uuid'])."' onclick=\"recording_seek(event,'".escape($row['voicemail_greeting_uuid'])."')\" style='display: none;'><td id='playback_progress_bar_background_".escape($row['voicemail_greeting_uuid'])."' class='playback_progress_bar_background' style='padding: 0; border: none;' colspan='".$col_count."'><span class='playback_progress_bar' id='recording_progress_".escape($row['voicemail_greeting_uuid'])."'></span></td></tr>\n";
echo "<tr class='list-row' style='display: none;'><td></td></tr>\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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('voicemail_greeting_delete')) {
@ -605,3 +609,4 @@
}
?>

View File

@ -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'] = "";
?>
?>

View File

@ -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'] = "نسخ";
@ -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'] = "이메일 재전송";
?>
?>

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
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):
@ -89,6 +89,7 @@
//set the variables from the HTTP values
$voicemail_id = $_POST["voicemail_id"];
$voicemail_id_previous = $_POST["voicemail_id_previous"];
$voicemail_password = $_POST["voicemail_password"];
$greeting_id = $_POST["greeting_id"];
$voicemail_options = $_POST["voicemail_options"];
@ -99,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;
@ -177,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;
@ -261,9 +246,21 @@
$p->delete('voicemail_option_add', 'temp');
$p->delete('voicemail_destination_add', 'temp');
//make sure the voicemail directory exists
//create or rename voicemail directory as needed
if (is_numeric($voicemail_id)) {
if (!file_exists($_SESSION['switch']['voicemail']['dir']."/default/".$_SESSION['domain_name']."/".$voicemail_id)) {
// old and new voicemail ids differ, old directory exists and new doesn't, rename directory
if (
!empty($voicemail_id_previous) && is_numeric($voicemail_id_previous) && $voicemail_id_previous != $voicemail_id &&
file_exists($_SESSION['switch']['voicemail']['dir']."/default/".$_SESSION['domain_name']."/".$voicemail_id_previous) &&
!file_exists($_SESSION['switch']['voicemail']['dir']."/default/".$_SESSION['domain_name']."/".$voicemail_id)
) {
rename(
$_SESSION['switch']['voicemail']['dir']."/default/".$_SESSION['domain_name']."/".$voicemail_id_previous, // previous
$_SESSION['switch']['voicemail']['dir']."/default/".$_SESSION['domain_name']."/".$voicemail_id // new
);
}
// new directory doesn't exist, create
else if (!file_exists($_SESSION['switch']['voicemail']['dir']."/default/".$_SESSION['domain_name']."/".$voicemail_id)) {
mkdir($_SESSION['switch']['voicemail']['dir']."/default/".$_SESSION['domain_name']."/".$voicemail_id, 0770);
}
}
@ -349,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"];
}
@ -358,7 +354,6 @@
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'];
}
//remove the spaces
@ -368,7 +363,6 @@
//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_tutorial)) { $voicemail_tutorial = 'false'; }
@ -560,6 +554,7 @@
echo "</td>\n";
echo "<td width='70%' class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='voicemail_id' maxlength='255' autocomplete='new-password' value='".escape($voicemail_id)."'>\n";
echo " <input type='hidden' name='voicemail_id_previous' value='".escape($voicemail_id)."'>\n";
echo " <input type='text' style='display: none;' disabled='disabled'>\n"; //help defeat browser auto-fill
echo "<br />\n";
echo $text['description-voicemail_id']."\n";
@ -879,10 +874,7 @@
echo "</tr>\n";
}
if (
permission_exists('voicemail_file') &&
permission_exists('voicemail_local_after_email')
) {
if (permission_exists('voicemail_file') && permission_exists('voicemail_local_after_email')) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-voicemail_local_after_email']."\n";
@ -956,38 +948,8 @@
echo " </tr>";
}
if (
permission_exists('voicemail_forward') &&
permission_exists('voicemail_local_after_forward') &&
!empty($voicemail_destinations_assigned) &&
is_array($voicemail_destinations_assigned)
) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-voicemail_local_after_forward']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
if (substr($_SESSION['theme']['input_toggle_style']['text'], 0, 6) == 'switch') {
echo " <label class='switch'>\n";
echo " <input type='checkbox' id='voicemail_local_after_forward' name='voicemail_local_after_forward' value='true' ".($voicemail_local_after_forward == 'true' ? "checked='checked'" : null).">\n";
echo " <span class='slider'></span> \n";
echo " </label>\n";
}
else {
echo " <select class='formfld' id='voicemail_local_after_forward' name='voicemail_local_after_forward'>\n";
echo " <option value='true'>".$text['option-true']."</option>\n";
echo " <option value='false' ".($voicemail_local_after_forward == 'false' ? "selected='selected'" : null).">".$text['option-false']."</option>\n";
echo " </select>\n";
}
echo "<br />\n";
echo $text['description-voicemail_local_after_forward']."\n";
echo "</td>\n";
echo "</tr>\n";
unset($voicemail_destinations_assigned);
}
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-voicemail_enabled']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
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):
@ -322,7 +322,7 @@
//show the content
echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['title-voicemail_messages']." (".$total_rows.")</b></div>\n";
echo " <div class='heading'><b>".$text['title-voicemail_messages']."</b><div class='count'>".number_format($total_rows)."</div></div>\n";
echo " <div class='actions'>\n";
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','link'=>$_SESSION['back'][$_SERVER['PHP_SELF']]]);
$margin_left = false;

View File

@ -297,8 +297,12 @@
if (is_array($voicemails) && sizeof($voicemails) != 0) {
$x = 0;
foreach ($voicemails as $row) {
$list_row_url = '';
if (permission_exists('voicemail_edit')) {
$list_row_url = "voicemail_edit.php?id=".urlencode($row['voicemail_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('voicemail_edit') || permission_exists('voicemail_delete')) {
@ -373,3 +377,4 @@
//include the footer
require_once "resources/footer.php";

View File

@ -339,6 +339,9 @@ if (!class_exists('xml_cdr')) {
//remove invalid numeric xml tags
$xml_string = preg_replace('/<\/?\d+>/', '', $xml_string);
//replace xml tag name <set api_hangup_hook> with <api_hangup_hook>
$xml_string = preg_replace('/(<\/?)(set )([^>]*>)/', '$1$3', $xml_string);
//disable xml entities
if (PHP_VERSION_ID < 80000) { libxml_disable_entity_loader(true); }
@ -352,12 +355,12 @@ if (!class_exists('xml_cdr')) {
//failed to load the XML, move the XML file to the failed directory
if (!empty($xml_cdr_dir)) {
if (!file_exists($xml_cdr_dir.'/failed')) {
if (!mkdir($xml_cdr_dir.'/failed', 0660, true)) {
if (!file_exists($xml_cdr_dir.'/failed/invalid_xml')) {
if (!mkdir($xml_cdr_dir.'/failed/invalid_xml', 0660, true)) {
die('Failed to create '.$xml_cdr_dir.'/failed');
}
}
rename($xml_cdr_dir.'/'.$this->file, $xml_cdr_dir.'/failed/'.$this->file);
rename($xml_cdr_dir.'/'.$this->file, $xml_cdr_dir.'/failed/invalid_xml/'.$this->file);
}
//return without saving the invalid xml
@ -645,8 +648,8 @@ if (!class_exists('xml_cdr')) {
$domain_uuid = urldecode($xml->variables->domain_uuid);
//sanitize the caller ID
$caller_id_name = preg_replace('#[^a-zA-Z 0-9\-\.]#', '', $caller_id_name);
$caller_id_number = preg_replace('#[^0-9\-]#', '', $caller_id_number);
$caller_id_name = preg_replace('#[^a-zA-Z0-9\-.\#*@ ]#', '', $caller_id_name);
$caller_id_number = preg_replace('#[^0-9\-\#\*]#', '', $caller_id_number);
//misc
$this->array[$key][0]['ring_group_uuid'] = urldecode($xml->variables->ring_group_uuid);
@ -1692,7 +1695,7 @@ if (!class_exists('xml_cdr')) {
//if http enabled is set to false then deny access
if (!defined('STDIN')) {
if ($this->settings->get('cdr', 'http_enabled') == "false") {
if ($this->settings->get('cdr', 'http_enabled') == false) {
openlog('FusionPBX', LOG_NDELAY, LOG_AUTH);
syslog(LOG_WARNING, '['.$_SERVER['REMOTE_ADDR'].'] XML CDR import default setting http_enabled is not enabled. Line: '.__line__);
closelog();

View File

@ -877,8 +877,12 @@
$content .= "<tr class='list-row' id='recording_progress_bar_".$row['xml_cdr_uuid']."' style='display: none;' onclick=\"recording_seek(event,'".escape($row['xml_cdr_uuid'])."')\"><td id='playback_progress_bar_background_".escape($row['xml_cdr_uuid'])."' class='playback_progress_bar_background' colspan='".$col_count."'><span class='playback_progress_bar' id='recording_progress_".$row['xml_cdr_uuid']."'></span></td></tr>\n";
$content .= "<tr class='list-row' style='display: none;'><td></td></tr>\n"; // dummy row to maintain alternating background color
}
$list_row_url = '';
if ($permission['xml_cdr_details']) {
$list_row_url = "xml_cdr_details.php?id=".urlencode($row['xml_cdr_uuid']).($_REQUEST['show'] ? "&show=all" : null);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
$content .= "<tr class='list-row' href='".$list_row_url."'>\n";
if (!$archive_request && $permission['xml_cdr_delete']) {
@ -1059,3 +1063,4 @@
require_once "resources/footer.php";
?>

View File

@ -88,8 +88,12 @@
$x = 0;
foreach ($contact_addresses as $row) {
$map_query = $row['address_street']." ".$row['address_extended'].", ".$row['address_locality'].", ".$row['address_region'].", ".$row['address_region'].", ".$row['address_postal_code'];
$list_row_url = '';
if (permission_exists('contact_address_edit')) {
$list_row_url = "contact_address_edit.php?contact_uuid=".urlencode($row['contact_uuid'])."&id=".urlencode($row['contact_address_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('contact_address_delete')) {
@ -123,3 +127,4 @@
}
?>

View File

@ -107,8 +107,12 @@
foreach ($contact_attachments as $row) {
$attachment_type = strtolower(pathinfo($row['attachment_filename'], PATHINFO_EXTENSION));
$attachment_type_label = $attachment_type == 'jpg' || $attachment_type == 'jpeg' || $attachment_type == 'gif' || $attachment_type == 'png' ? $text['label-image'] : $text['label-file'];
$list_row_url = '';
if (permission_exists('contact_attachment_edit')) {
$list_row_url = "contact_attachment_edit.php?contact_uuid=".urlencode($row['contact_uuid'])."&id=".urlencode($row['contact_attachment_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('contact_attachment_delete')) {
@ -147,3 +151,4 @@
}
?>

View File

@ -1574,7 +1574,7 @@ if ($_SESSION['contact']['permissions']['boolean'] == "true") {
}
if (permission_exists('contact_user_add')) {
echo " <div class='vtable' style='border-bottom: none;'>\n";
echo " <select name='contact_user_uuid' class='formfld' style='width: auto;'>\n";
echo " <select name='contact_user_uuid' class='formfld' style='width: 112px;'>\n";
echo " <option value=''></option>\n";
foreach ($users as $field) {
if (!empty($contact_users_assigned) && in_array($field['user_uuid'], array_column($contact_users_assigned, 'user_uuid'))) { continue; } //skip users already assigned
@ -1632,7 +1632,7 @@ if ($_SESSION['contact']['permissions']['boolean'] == "true") {
if (permission_exists('contact_group_add')) {
if (!empty($contact_groups_available)) {
echo " <div class='vtable' style='border-bottom: none;'>\n";
echo " <select name='contact_group_uuid' class='formfld' style='width: auto; margin-right: 3px;'>\n";
echo " <select name='contact_group_uuid' class='formfld' style='width: 112px;'>\n";
echo " <option value=''></option>\n";
foreach ($contact_groups_available as $field) {
if ($field['group_name'] == "superadmin" && !if_group("superadmin")) { continue; } //only show superadmin group to superadmins
@ -1788,10 +1788,10 @@ if (permission_exists('contact_phone_view')) {
echo " <div class='label'>\n";
echo " ".$text['label-phone_type']."\n";
echo " </div>\n";
echo " <div class='field no-wrap'>\n";
echo " <label style='padding-top: 2px; margin: 0;'><input type='checkbox' name='contact_phones[$x][phone_type_voice]' id='phone_type_voice' value='1' ".(($row['phone_type_voice']) ? "checked='checked'" : null)."> ".$text['label-voice']."</label>&nbsp;\n";
echo " <label style='padding-top: 2px; margin: 0;'><input type='checkbox' name='contact_phones[$x][phone_type_fax]' id='phone_type_fax' value='1' ".(($row['phone_type_fax']) ? "checked='checked'" : null)."> ".$text['label-fax']."</label>&nbsp;\n";
echo " <label style='padding-top: 2px; margin: 0;'><input type='checkbox' name='contact_phones[$x][phone_type_video]' id='phone_type_video' value='1' ".(($row['phone_type_video']) ? "checked='checked'" : null)."> ".$text['label-video']."</label>&nbsp;\n";
echo " <div class='field no-wrap' style='display: flex; flex-wrap: wrap; gap: 3px;'>\n";
echo " <label style='padding-top: 2px; margin: 0;'><input type='checkbox' name='contact_phones[$x][phone_type_voice]' id='phone_type_voice' value='1' ".(($row['phone_type_voice']) ? "checked='checked'" : null)."> ".$text['label-voice']."</label>\n";
echo " <label style='padding-top: 2px; margin: 0;'><input type='checkbox' name='contact_phones[$x][phone_type_fax]' id='phone_type_fax' value='1' ".(($row['phone_type_fax']) ? "checked='checked'" : null)."> ".$text['label-fax']."</label>\n";
echo " <label style='padding-top: 2px; margin: 0;'><input type='checkbox' name='contact_phones[$x][phone_type_video]' id='phone_type_video' value='1' ".(($row['phone_type_video']) ? "checked='checked'" : null)."> ".$text['label-video']."</label>\n";
echo " <label style='padding-top: 2px; margin: 0;'><input type='checkbox' name='contact_phones[$x][phone_type_text]' id='phone_type_text' value='1' ".(($row['phone_type_text']) ? "checked='checked'" : null)."> ".$text['label-text']."</label>\n";
echo " <br />\n";
//echo $text['description-phone_type']."\n";

View File

@ -239,6 +239,7 @@ if (!empty($_GET["contact_uuid"]) && is_uuid($_GET["contact_uuid"])) {
}
echo "<br /><br />\n";
echo "<div class='card'>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
@ -311,6 +312,7 @@ if (!empty($_GET["contact_uuid"]) && is_uuid($_GET["contact_uuid"])) {
echo "</tr>\n";
echo "</table>";
echo "</div>\n";
echo "<br><br>";
echo "<input type='hidden' name='contact_uuid' value='".escape($contact_uuid ?? '')."'>\n";

View File

@ -79,8 +79,12 @@
if (!empty($contact_emails)) {
$x = 0;
foreach ($contact_emails as $row) {
$list_row_url = '';
if (permission_exists('contact_email_edit')) {
$list_row_url = "contact_email_edit.php?contact_uuid=".urlencode($row['contact_uuid'])."&id=".urlencode($row['contact_email_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('contact_email_delete')) {
@ -110,3 +114,4 @@
}
?>

View File

@ -77,8 +77,12 @@
if (!empty($contact_extensions)) {
$x = 0;
foreach ($contact_extensions as $row) {
$list_row_url = '';
if (permission_exists('extension_edit')) {
$list_row_url = PROJECT_PATH.'/app/extensions/extension_edit.php?id='.urlencode($row['extension_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 "<tr class='list-row' href='".$list_row_url."' ".($row['url_primary'] ? "style='font-weight: bold;'" : null).">\n";
echo " <td>";
@ -109,3 +113,4 @@
}
?>

View File

@ -82,8 +82,12 @@
$contact_note = $row['contact_note'];
$contact_note = escape($contact_note);
$contact_note = str_replace("\n","<br />",$contact_note);
$list_row_url = '';
if (permission_exists('contact_note_add')) {
$list_row_url = "contact_note_edit.php?contact_uuid=".escape($row['contact_uuid'])."&id=".escape($row['contact_note_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('contact_note_delete')) {
@ -112,3 +116,4 @@
}
?>

View File

@ -93,8 +93,12 @@
if (!empty($contact_phones)) {
$x = 0;
foreach ($contact_phones as $row) {
$list_row_url = '';
if (permission_exists('contact_phone_edit')) {
$list_row_url = "contact_phone_edit.php?contact_uuid=".urlencode($row['contact_uuid'])."&id=".urlencode($row['contact_phone_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('contact_phone_delete')) {
@ -144,3 +148,4 @@
}
?>

View File

@ -93,8 +93,12 @@
if (!empty($contact_relations)) {
$x = 0;
foreach ($contact_relations as $row) {
$list_row_url = '';
if (permission_exists('contact_relation_edit')) {
$list_row_url = "contact_relation_edit.php?contact_uuid=".urlencode($contact_uuid)."&id=".urlencode($row['contact_relation_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('contact_relation_delete')) {
@ -124,3 +128,4 @@
}
?>

View File

@ -86,8 +86,12 @@
if (!empty($contact_settings)) {
$x = 0;
foreach ($contact_settings as $row) {
$list_row_url = '';
if (permission_exists('contact_setting_edit')) {
$list_row_url = "contact_setting_edit.php?contact_uuid=".urlencode($contact_uuid)."&id=".urlencode($row['contact_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('contact_setting_delete')) {
@ -133,3 +137,4 @@
}
?>

View File

@ -97,8 +97,12 @@
}
$tmp = explode(' ', $row['time_start']);
$time_start = $tmp[0];
$list_row_url = '';
if (permission_exists('contact_time_edit')) {
$list_row_url = "contact_time_edit.php?contact_uuid=".urlencode($row['contact_uuid'])."&id=".urlencode($row['contact_time_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('contact_time_delete')) {
@ -129,3 +133,4 @@
}
?>

View File

@ -81,8 +81,12 @@
if (!empty($contact_urls)) {
$x = 0;
foreach ($contact_urls as $row) {
$list_row_url = '';
if (permission_exists('contact_url_edit')) {
$list_row_url = "contact_url_edit.php?contact_uuid=".urlencode($row['contact_uuid'])."&id=".urlencode($row['contact_url_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('contact_url_delete')) {
@ -112,3 +116,4 @@
}
?>

View File

@ -396,6 +396,9 @@
$x = 0;
foreach($contacts as $row) {
$list_row_url = "contact_view.php?id=".urlencode($row['contact_uuid'])."&query_string=".urlencode($_SERVER["QUERY_STRING"]);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('contact_delete')) {
echo " <td class='checkbox'>\n";
@ -469,3 +472,5 @@
require_once "resources/footer.php";
?>

View File

@ -202,8 +202,12 @@
if (!empty($dashboard)) {
$x = 0;
foreach ($dashboard as $row) {
$list_row_url = '';
if (permission_exists('dashboard_edit')) {
$list_row_url = "dashboard_edit.php?id=".urlencode($row['dashboard_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('dashboard_add') || permission_exists('dashboard_edit') || permission_exists('dashboard_delete')) {
@ -256,3 +260,4 @@
require_once "resources/footer.php";
?>

View File

@ -18,7 +18,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2021-2024
Portions created by the Initial Developer are Copyright (C) 2021-2025
the Initial Developer. All Rights Reserved.
*/
@ -938,7 +938,7 @@
echo "</td>\n";
echo "</tr>\n";
}
if ($dashboard_chart_type == "icon") {
echo "<tr class='type_icon'>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
@ -1175,7 +1175,7 @@
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-dashboard_enabled']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";

View File

@ -200,3 +200,4 @@
require_once "resources/footer.php";
?>

View File

@ -46,7 +46,7 @@ $search = $_REQUEST['search'] ?? '';
$domain_uuid = $_GET['id'] ?? null;
//reload default settings
require "resources/classes/domains.php";
settings::clear_cache();
$domain = new domains();
$domain->set();

View File

@ -307,6 +307,9 @@
}
}
//clear domain apcu cache due to changes
settings::clear_cache('domain');
//redirect the browser
if ($action == "update") {
message::add($text['message-update']);

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
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):
@ -161,7 +161,7 @@
//show the content
echo "<div class='action_bar' id='action_bar_sub'>\n";
echo " <div class='heading'><b id='heading_sub'>".$domain_name." (".$num_rows.")</b></div>\n"; //$text['title-domain_settings']
echo " <div class='heading'><b id='heading_sub'>".$domain_name."</b><div class='count'>".number_format($num_rows)."</div></div>\n"; //$text['title-domain_settings']
echo " <div class='actions'>\n";
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'action_bar_sub_button_back','style'=>'','link'=>PROJECT_PATH.'/core/domains/domains.php']);
if (permission_exists('default_setting_view') && $num_rows) {

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2018 - 2022
Portions created by the Initial Developer are Copyright (C) 2018-2025
the Initial Developer. All Rights Reserved.
Contributor(s):
@ -39,47 +39,50 @@
}
//change the domain
if (!empty($_GET["domain_uuid"]) && is_uuid($_GET["domain_uuid"]) && $_GET["domain_change"] == "true") {
if (permission_exists('domain_select')) {
if (!empty($_GET["domain_uuid"]) && is_uuid($_GET["domain_uuid"]) && $_GET["domain_change"] == "true" && permission_exists('domain_select')) {
//update the domain session variables
$domain_uuid = $_GET["domain_uuid"];
$_SESSION["previous_domain_uuid"] = $_SESSION['domain_uuid'];
$_SESSION['domain_uuid'] = $domain_uuid;
//update the domain session variables
$domain_uuid = $_GET["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;
}
//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);
}
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"];
//validate the domain change
if (empty($_SESSION['domains'][$domain_uuid])) {
die("invalid domain");
}
//clear the extension array so that it is regenerated for the selected domain
unset($_SESSION['extension_array']);
//update the domain session variables
$_SESSION["previous_domain_uuid"] = $_SESSION['domain_uuid'];
$_SESSION['domain_uuid'] = $domain_uuid;
$_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"];
//set the setting arrays
$domain = new domains();
$domain->set();
//clear the extension array so that it is regenerated for the selected domain
unset($_SESSION['extension_array']);
//redirect the user
if (!empty($_SESSION["login"]["destination"])) {
// to default, or domain specific, login destination
header("Location: ".PROJECT_PATH.$_SESSION["login"]["destination"]["text"]);
}
else {
header("Location: ".PROJECT_PATH."/core/dashboard/");
}
exit;
}
//set the setting arrays
$domain = new domains();
$domain->set();
//redirect the user
if (!empty($_SESSION["login"]["destination"])) {
// to default, or domain specific, login destination
header("Location: ".PROJECT_PATH.$_SESSION["login"]["destination"]["text"]);
}
else {
header("Location: ".PROJECT_PATH."/core/dashboard/");
}
exit;
}
//check permission

View File

@ -29,7 +29,7 @@
$apps[$x]['menu'][$y]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
$apps[$x]['menu'][$y]['category'] = "internal";
$apps[$x]['menu'][$y]['icon'] = "";
$apps[$x]['menu'][$y]['path'] = "/app/email_templates/email_templates.php";
$apps[$x]['menu'][$y]['path'] = "/core/email_templates/email_templates.php";
$apps[$x]['menu'][$y]['order'] = "";
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
$y++;

View File

@ -257,8 +257,12 @@
if (!empty($result)) {
$x = 0;
foreach($result as $row) {
$list_row_url = '';
if (permission_exists('email_template_edit')) {
$list_row_url = "email_template_edit.php?id=".urlencode($row['email_template_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 "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('email_template_add') || permission_exists('email_template_edit') || permission_exists('email_template_delete')) {
@ -323,3 +327,4 @@
require_once "resources/footer.php";
?>

View File

Before

Width:  |  Height:  |  Size: 257 B

After

Width:  |  Height:  |  Size: 257 B

View File

Before

Width:  |  Height:  |  Size: 224 B

After

Width:  |  Height:  |  Size: 224 B

View File

Before

Width:  |  Height:  |  Size: 726 B

After

Width:  |  Height:  |  Size: 726 B

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
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):
@ -240,7 +240,7 @@
echo "<input type='hidden' name='menu_uuid' value='".escape($menu_uuid)."'>\n";
echo "<div class='action_bar' id='action_bar_sub'>\n";
echo " <div class='heading'><b id='heading_sub'>".$text['header-menu_items']." (<span id='num_rows'></span>)</b></div>\n";
echo " <div class='heading'><b id='heading_sub'>".$text['header-menu_items']."</b><div class='count'><span id='num_rows'></span></div></div>\n";
echo " <div class='actions'>\n";
echo button::create(['type'=>'button','id'=>'action_bar_sub_button_back','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'collapse'=>'hide-xs','style'=>'margin-right: 15px; display: none;','link'=>'menu.php']);
if (permission_exists('menu_item_add')) {

View File

@ -1701,4 +1701,110 @@ $text['button-preview']['zh-cn'] = "预览";
$text['button-preview']['ja-jp'] = "プレビュー";
$text['button-preview']['ko-kr'] = "시사";
?>
$text['label-update_auto_loader']['en-us'] = 'Update Auto Loader Cache';
$text['label-update_auto_loader']['en-gb'] = 'Update Auto Loader Cache';
$text['label-update_auto_loader']['ar-eg'] = 'تحديث ذاكرة التخزين المؤقتة للتحميل التلقائي';
$text['label-update_auto_loader']['de-at'] = 'AutoLoader-Cache aktualisieren';
$text['label-update_auto_loader']['de-ch'] = 'AutoLoader-Cache aktualisieren';
$text['label-update_auto_loader']['de-de'] = 'AutoLoader-Cache aktualisieren';
$text['label-update_auto_loader']['el-gr'] = 'Ενημερώστε την προσωρινή μνήμη Auto Loader';
$text['label-update_auto_loader']['es-cl'] = 'Actualizar la caché del cargador automático';
$text['label-update_auto_loader']['es-mx'] = 'Actualizar la caché del cargador automático';
$text['label-update_auto_loader']['fr-ca'] = 'Mettre à jour le cache du chargeur automatique';
$text['label-update_auto_loader']['fr-fr'] = 'Mettre à jour le cache du chargeur automatique';
$text['label-update_auto_loader']['he-il'] = 'עדכן את מטמון הטעינה האוטומטית';
$text['label-update_auto_loader']['it-it'] = 'Aggiorna la cache del caricatore automatico';
$text['label-update_auto_loader']['ka-ge'] = 'Auto Loader Cache-ის განახლება';
$text['label-update_auto_loader']['nl-nl'] = 'Auto Loader-cache bijwerken';
$text['label-update_auto_loader']['pl-pl'] = 'Aktualizuj pamięć podręczną Auto Loader';
$text['label-update_auto_loader']['pt-br'] = 'Atualizar cache do carregador automático';
$text['label-update_auto_loader']['pt-pt'] = 'Atualizar cache do carregador automático';
$text['label-update_auto_loader']['ro-ro'] = 'Actualizați memoria cache a încărcării automate';
$text['label-update_auto_loader']['ru-ru'] = 'Обновить кэш автозагрузчика';
$text['label-update_auto_loader']['sv-se'] = 'Uppdatera Auto Loader Cache';
$text['label-update_auto_loader']['uk-ua'] = 'Оновити кеш автозавантажувача';
$text['label-update_auto_loader']['tr-tr'] = 'Otomatik Yükleyici Önbelleğini Güncelle';
$text['label-update_auto_loader']['zh-cn'] = '更新自动加载器缓存';
$text['label-update_auto_loader']['ja-jp'] = 'オートローダーキャッシュの更新';
$text['label-update_auto_loader']['ko-kr'] = '자동 로더 캐시 업데이트';
$text['description-update_auto_loader']['en-us'] = 'Updates the auto_loader cache file to include any new classes added to the project';
$text['description-update_auto_loader']['en-gb'] = 'Updates the auto_loader cache file to include any new classes added to the project';
$text['description-update_auto_loader']['ar-eg'] = 'يقوم بتحديث ملف ذاكرة التخزين المؤقت لـ auto_loader ليشمل أي فئات جديدة تمت إضافتها إلى المشروع';
$text['description-update_auto_loader']['de-at'] = 'Aktualisiert die Auto_Loader-Cachedatei, um alle neuen Klassen einzuschließen, die dem Projekt hinzugefügt werden';
$text['description-update_auto_loader']['de-ch'] = 'Aktualisiert die Auto_Loader-Cachedatei, um alle neuen Klassen einzuschließen, die dem Projekt hinzugefügt werden';
$text['description-update_auto_loader']['de-de'] = 'Aktualisiert die Auto_Loader-Cachedatei, um alle neuen Klassen einzuschließen, die dem Projekt hinzugefügt werden';
$text['description-update_auto_loader']['el-gr'] = 'Ενημερώνει το αρχείο προσωρινής μνήμης auto_loader για να συμπεριλάβει τυχόν νέες κλάσεις που προστέθηκαν στο έργο';
$text['description-update_auto_loader']['es-cl'] = 'Actualiza el archivo de caché auto_loader para incluir cualquier clase nueva agregada al proyecto';
$text['description-update_auto_loader']['es-mx'] = 'Actualiza el archivo de caché auto_loader para incluir cualquier clase nueva agregada al proyecto';
$text['description-update_auto_loader']['fr-ca'] = 'Met à jour le fichier cache du chargeur automatique pour inclure toutes les nouvelles classes ajoutées au projet';
$text['description-update_auto_loader']['fr-fr'] = 'Met à jour le fichier cache du chargeur automatique pour inclure toutes les nouvelles classes ajoutées au projet';
$text['description-update_auto_loader']['he-il'] = 'מעדכן את קובץ המטמון auto_loader כך שיכלול כל מחלקות חדשות שנוספו לפרויקט';
$text['description-update_auto_loader']['it-it'] = 'Aggiorna il file di cache auto_loader per includere tutte le nuove classi aggiunte al progetto';
$text['description-update_auto_loader']['ka-ge'] = 'აახლებს auto_loader ქეში ფაილს, რათა შეიცავდეს პროექტში დამატებულ ნებისმიერ ახალ კლასს';
$text['description-update_auto_loader']['nl-nl'] = 'Werkt het auto_loader-cachebestand bij om alle nieuwe klassen op te nemen die aan het project zijn toegevoegd';
$text['description-update_auto_loader']['pl-pl'] = 'Aktualizuje plik pamięci podręcznej auto_loader, aby uwzględnić wszystkie nowe klasy dodane do projektu';
$text['description-update_auto_loader']['pt-br'] = 'Atualiza o arquivo de cache do auto_loader para incluir quaisquer novas classes adicionadas ao projeto';
$text['description-update_auto_loader']['pt-pt'] = 'Atualiza o arquivo de cache do auto_loader para incluir quaisquer novas classes adicionadas ao projeto';
$text['description-update_auto_loader']['ro-ro'] = 'Actualizează fișierul cache auto_loader pentru a include orice clase noi adăugate la proiect';
$text['description-update_auto_loader']['ru-ru'] = 'Обновляет файл кэша auto_loader, включая в него все новые классы, добавленные в проект.';
$text['description-update_auto_loader']['sv-se'] = 'Uppdaterar cachefilen för auto_loader för att inkludera alla nya klasser som lagts till i projektet';
$text['description-update_auto_loader']['uk-ua'] = 'Оновлює файл кешу auto_loader, щоб включити всі нові класи, додані до проекту';
$text['description-update_auto_loader']['tr-tr'] = 'Projeye eklenen tüm yeni sınıfları içerecek şekilde auto_loader önbellek dosyasını günceller';
$text['description-update_auto_loader']['zh-cn'] = '更新 auto_loader 缓存文件以包含添加到项目中的任何新类';
$text['description-update_auto_loader']['ja-jp'] = 'プロジェクトに追加された新しいクラスを含めるために auto_loader キャッシュ ファイルを更新します。';
$text['description-update_auto_loader']['ko-kr'] = '프로젝트에 추가된 모든 새 클래스를 포함하도록 auto_loader 캐시 파일을 업데이트합니다.';
$text['label-reloaded_classes']['en-us'] = 'Reloaded classes';
$text['label-reloaded_classes']['en-gb'] = 'Reloaded classes';
$text['label-reloaded_classes']['ar-eg'] = 'الفصول المعاد تحميلها';
$text['label-reloaded_classes']['de-at'] = 'Neu geladene Klassen';
$text['label-reloaded_classes']['de-ch'] = 'Neu geladene Klassen';
$text['label-reloaded_classes']['de-de'] = 'Neu geladene Klassen';
$text['label-reloaded_classes']['el-gr'] = 'Επαναφόρτωση τάξεων';
$text['label-reloaded_classes']['es-cl'] = 'Clases recargadas';
$text['label-reloaded_classes']['es-mx'] = 'Clases recargadas';
$text['label-reloaded_classes']['fr-ca'] = 'Classes rechargées';
$text['label-reloaded_classes']['fr-fr'] = 'Classes rechargées';
$text['label-reloaded_classes']['he-il'] = 'שיעורים שנטענו מחדש';
$text['label-reloaded_classes']['it-it'] = 'Classi ricaricate';
$text['label-reloaded_classes']['ka-ge'] = 'გადატვირთული კლასები';
$text['label-reloaded_classes']['nl-nl'] = 'Herladen klassen';
$text['label-reloaded_classes']['pl-pl'] = 'Klasy przeładowane';
$text['label-reloaded_classes']['pt-br'] = 'Classes recarregadas';
$text['label-reloaded_classes']['pt-pt'] = 'Classes recarregadas';
$text['label-reloaded_classes']['ro-ro'] = 'Cursuri reîncărcate';
$text['label-reloaded_classes']['ru-ru'] = 'Перезагруженные классы';
$text['label-reloaded_classes']['sv-se'] = 'Omladdade klasser';
$text['label-reloaded_classes']['uk-ua'] = 'Перезавантажені класи';
$text['label-reloaded_classes']['tr-tr'] = 'Yeniden yüklenen sınıflar';
$text['label-reloaded_classes']['zh-cn'] = '重新加载的类';
$text['label-reloaded_classes']['ja-jp'] = 'リロードされたクラス';
$text['label-reloaded_classes']['ko-kr'] = '다시 로드된 클래스';
$text['label-updated_cache']['en-us'] = 'Updated cache';
$text['label-updated_cache']['en-gb'] = 'Updated cache';
$text['label-updated_cache']['ar-eg'] = 'تم تحديث ذاكرة التخزين المؤقت';
$text['label-updated_cache']['de-at'] = 'Cache aktualisiert';
$text['label-updated_cache']['de-ch'] = 'Cache aktualisiert';
$text['label-updated_cache']['de-de'] = 'Cache aktualisiert';
$text['label-updated_cache']['el-gr'] = 'Ενημερώθηκε η προσωρινή μνήμη';
$text['label-updated_cache']['es-cl'] = 'Caché actualizado';
$text['label-updated_cache']['es-mx'] = 'Caché actualizado';
$text['label-updated_cache']['fr-ca'] = 'Cache mis à jour';
$text['label-updated_cache']['fr-fr'] = 'Cache mis à jour';
$text['label-updated_cache']['he-il'] = 'מטמון מעודכן';
$text['label-updated_cache']['it-it'] = 'Cache aggiornata';
$text['label-updated_cache']['ka-ge'] = 'განახლებულია ქეში';
$text['label-updated_cache']['nl-nl'] = 'Bijgewerkte cache';
$text['label-updated_cache']['pl-pl'] = 'Zaktualizowano pamięć podręczną';
$text['label-updated_cache']['pt-br'] = 'Cache atualizado';
$text['label-updated_cache']['pt-pt'] = 'Cache atualizado';
$text['label-updated_cache']['ro-ro'] = 'Cache actualizat';
$text['label-updated_cache']['ru-ru'] = 'Обновлен кэш';
$text['label-updated_cache']['sv-se'] = 'Uppdaterad cache';
$text['label-updated_cache']['uk-ua'] = 'Оновлений кеш';
$text['label-updated_cache']['tr-tr'] = 'Güncellenen önbellek';
$text['label-updated_cache']['zh-cn'] = '更新缓存';
$text['label-updated_cache']['ja-jp'] = 'キャッシュを更新しました';
$text['label-updated_cache']['ko-kr'] = '캐시 업데이트됨';

Some files were not shown because too many files have changed in this diff Show More