Merge branch 'master' into use_javascript_for_phrase_edit
This commit is contained in:
commit
b822acadb6
|
|
@ -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";
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,7 @@
|
|||
|
||||
/**
|
||||
* access controls class
|
||||
*
|
||||
* @method null download
|
||||
*/
|
||||
if (!class_exists('access_controls')) {
|
||||
|
||||
class access_controls {
|
||||
|
||||
/**
|
||||
|
|
@ -264,6 +260,3 @@ if (!class_exists('access_controls')) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
/**
|
||||
* Define the operator_panel class
|
||||
*/
|
||||
if (!class_exists('basic_operator_panel')) {
|
||||
class basic_operator_panel {
|
||||
|
||||
/**
|
||||
|
|
@ -245,6 +244,3 @@ if (!class_exists('basic_operator_panel')) {
|
|||
return $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@ if (is_array($activity)) {
|
|||
}
|
||||
else {
|
||||
//unregistered extension
|
||||
if (!empty($_SESSION['operator_panel']['show_unregistered']['boolean']) && $_SESSION['operator_panel']['show_unregistered']['boolean'] == 'true') {
|
||||
if (filter_var($_SESSION['operator_panel']['show_unregistered']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
$css_class = "ur_ext";
|
||||
}
|
||||
else {
|
||||
|
|
@ -551,7 +551,7 @@ if (is_array($activity)) {
|
|||
|
||||
if (in_array($extension, $_SESSION['user']['extensions'])) {
|
||||
$user_extensions[] = $block;
|
||||
} elseif (!empty($ext['call_group']) && filter_var($_SESSION['operator_panel']['group_extensions']['boolean'], FILTER_VALIDATE_BOOLEAN)) {
|
||||
} elseif (!empty($ext['call_group']) && filter_var($_SESSION['operator_panel']['group_extensions']['boolean'] ?? false, FILTER_VALIDATE_BOOLEAN)) {
|
||||
$grouped_extensions[$ext['call_group']][] = $block;
|
||||
} else {
|
||||
$other_extensions[] = $block;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
$show = $_GET["show"] ?? '';
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
|
||||
|
||||
//get the http post data
|
||||
if (!empty($_POST['bridges'])) {
|
||||
|
|
@ -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')) {
|
||||
|
|
@ -226,7 +226,7 @@
|
|||
echo th_order_by('bridge_destination', $text['label-bridge_destination'], $order_by, $order);
|
||||
echo th_order_by('bridge_enabled', $text['label-bridge_enabled'], $order_by, $order, null, "class='center'");
|
||||
echo " <th class='hide-sm-dn'>".$text['label-bridge_description']."</th>\n";
|
||||
if (permission_exists('bridge_edit') && !empty($list_row_edit_button) && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('bridge_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -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')) {
|
||||
|
|
@ -266,7 +270,7 @@
|
|||
}
|
||||
echo " </td>\n";
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['bridge_description'])."</td>\n";
|
||||
if (permission_exists('bridge_edit') && !empty($list_row_edit_button) && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('bridge_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'>\n";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
*/
|
||||
|
||||
//define the bridges class
|
||||
if (!class_exists('bridges')) {
|
||||
class bridges {
|
||||
|
||||
/**
|
||||
|
|
@ -255,6 +254,3 @@ if (!class_exists('bridges')) {
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
$show = $_GET["show"] ?? '';
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
|
||||
|
||||
//get posted data
|
||||
if (!empty($_POST['call_blocks'])) {
|
||||
|
|
@ -301,7 +301,7 @@
|
|||
echo th_order_by('call_block_enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
|
||||
echo th_order_by('insert_date', $text['label-date-added'], $order_by, $order, null, "class='shrink no-wrap'");
|
||||
echo "<th class='hide-md-dn pct-20'>".$text['label-description']."</th>\n";
|
||||
if (permission_exists('call_block_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('call_block_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -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')) {
|
||||
|
|
@ -381,7 +385,7 @@
|
|||
echo " </td>\n";
|
||||
echo " <td class='no-wrap'>".$row['date_formatted']." <span class='hide-sm-dn'>".$row['time_formatted']."</span></td>\n";
|
||||
echo " <td class='description overflow hide-md-dn'>".escape($row['call_block_description'])."</td>\n";
|
||||
if (permission_exists('call_block_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('call_block_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'>";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
@ -405,3 +409,4 @@
|
|||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
@ -674,6 +674,8 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
|||
echo modal::create(['id'=>'modal-block','type'=>'general','message'=>$text['confirm-block'],'actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_block','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_form_submit('form_list');"])]);
|
||||
}
|
||||
|
||||
echo "<div class='card'>\n";
|
||||
|
||||
foreach (['inbound','outbound'] as $direction) {
|
||||
echo "<table class='list' id='list_".$direction."' ".($direction == 'outbound' ? "style='display: none;'" : null).">\n";
|
||||
echo "<tr class='list-header'>\n";
|
||||
|
|
@ -754,6 +756,8 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
|||
echo "</table>\n";
|
||||
}
|
||||
|
||||
echo "</div>\n";
|
||||
|
||||
echo "<br />\n";
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
echo "</form>\n";
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@
|
|||
|
||||
/**
|
||||
* call block class
|
||||
*
|
||||
* @method null download
|
||||
*/
|
||||
if (!class_exists('call_block')) {
|
||||
class call_block {
|
||||
|
||||
/**
|
||||
|
|
@ -459,6 +456,3 @@ if (!class_exists('call_block')) {
|
|||
} //method
|
||||
|
||||
} //class
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -45,4 +45,3 @@ $array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'user';
|
|||
$y++;
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
$show = $_GET["show"] ?? '';
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
|
||||
|
||||
//get posted data
|
||||
if (!empty($_POST['call_broadcasts'])) {
|
||||
|
|
@ -219,7 +219,7 @@
|
|||
echo th_order_by('broadcast_concurrent_limit', $text['label-concurrent-limit'], $order_by, $order);
|
||||
echo th_order_by('broadcast_start_time', $text['label-start_time'], $order_by, $order);
|
||||
echo th_order_by('broadcast_description', $text['label-description'], $order_by, $order);
|
||||
if (permission_exists('call_broadcast_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('call_broadcast_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -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')) {
|
||||
|
|
@ -262,7 +266,7 @@
|
|||
}
|
||||
echo " <td>".escape($broadcast_start_time ?? '')."</td>\n";
|
||||
echo " <td class='description overflow hide-xs'>".escape($row['broadcast_description'])."</td>\n";
|
||||
if (permission_exists('call_broadcast_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('call_broadcast_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'>";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
@ -286,3 +290,4 @@
|
|||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -27,10 +27,7 @@
|
|||
|
||||
/**
|
||||
* call broadcast class
|
||||
*
|
||||
* @method null download
|
||||
*/
|
||||
if (!class_exists('call_broadcast')) {
|
||||
class call_broadcast {
|
||||
|
||||
/**
|
||||
|
|
@ -177,6 +174,3 @@ if (!class_exists('call_broadcast')) {
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -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";
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@
|
|||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "call_center";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "record_name";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "\${sip_from_user}-\${sip_to_user}-\${strftime(%Y)}\${strftime(%b)}\${strftime(%d)}.\${record_ext}";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "\${sip_from_user}-\${sip_to_user}-\${strftime(%Y)}\${strftime(%b)}\${strftime(%d)}-\${uuid}.\${record_ext}";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Custom name for call recording. Options: \${record_ext}, \${sip_from_user}, \${sip_to_user}, \${caller_id_number}, \${uuid}";
|
||||
$y++;
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
$text = $language->get();
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
|
||||
|
||||
//get posted data
|
||||
if (!empty($_POST['call_center_agents'])) {
|
||||
|
|
@ -206,7 +206,7 @@
|
|||
//echo th_order_by('agent_wrap_up_time', $text['label-wrap_up_time'], $order_by, $order);
|
||||
//echo th_order_by('agent_reject_delay_time', $text['label-reject_delay_time'], $order_by, $order);
|
||||
//echo th_order_by('agent_busy_delay_time', $text['label-busy_delay_time'], $order_by, $order);
|
||||
if (permission_exists('call_center_agent_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('call_center_agent_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -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')) {
|
||||
|
|
@ -266,7 +270,7 @@
|
|||
//echo " <td>".$row[agent_wrap_up_time]."</td>\n";
|
||||
//echo " <td>".$row[agent_reject_delay_time]."</td>\n";
|
||||
//echo " <td>".$row[agent_busy_delay_time]."</td>\n";
|
||||
if (permission_exists('call_center_agent_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('call_center_agent_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'>";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
@ -290,3 +294,4 @@
|
|||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
@ -42,6 +42,10 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//initialize database and settings
|
||||
$database = database::new();
|
||||
$settings = new settings(['database' => $database, $_SESSION['domain_uuid'] ?? '', $_SESSION['user_uuid'] ?? '']);
|
||||
|
||||
//set the defaults
|
||||
$queue_name = '';
|
||||
$queue_extension = '';
|
||||
|
|
@ -61,24 +65,24 @@
|
|||
$action = "add";
|
||||
}
|
||||
|
||||
//get the domain_uuid
|
||||
//get the domain details
|
||||
$domain_uuid = $_SESSION['domain_uuid'];
|
||||
$domain_name = $_SESSION['domain_name'];
|
||||
|
||||
//initialize the destinations object
|
||||
//initialize the destination object
|
||||
$destination = new destinations;
|
||||
|
||||
//get total call center queues count from the database, check limit, if defined
|
||||
if ($action == 'add') {
|
||||
if (!empty($_SESSION['limit']['call_center_queues']['numeric'])) {
|
||||
if (!empty($settings->get('limit','call_center_queues', ''))) {
|
||||
$sql = "select count(*) from v_call_center_queues ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
$database = new database;
|
||||
$total_call_center_queues = $database->select($sql, $parameters, 'column');
|
||||
unset($sql, $parameters);
|
||||
|
||||
if ($total_call_center_queues >= $_SESSION['limit']['call_center_queues']['numeric']) {
|
||||
message::add($text['message-maximum_queues'].' '.$_SESSION['limit']['call_center_queues']['numeric'], 'negative');
|
||||
if ($total_call_center_queues >= $settings->get('limit','call_center_queues', 0)) {
|
||||
message::add($text['message-maximum_queues'].' '.$settings->get('limit','call_center_queues', ''), 'negative');
|
||||
header('Location: call_center_queues.php');
|
||||
return;
|
||||
}
|
||||
|
|
@ -124,7 +128,7 @@
|
|||
$queue_context = $_POST["queue_context"];
|
||||
}
|
||||
else if ($action == 'add') {
|
||||
$queue_context = $_SESSION['domain_name'];
|
||||
$queue_context = $domain_name;
|
||||
}
|
||||
|
||||
//remove invalid characters
|
||||
|
|
@ -149,7 +153,6 @@
|
|||
$sql .= "and t.call_center_queue_uuid = q.call_center_queue_uuid; ";
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
$parameters['call_center_tier_uuid'] = $call_center_tier_uuid;
|
||||
$database = new database;
|
||||
$tiers = $database->select($sql, $parameters, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
|
|
@ -168,7 +171,7 @@
|
|||
if ($esl->is_connected()) {
|
||||
//callcenter_config tier del [queue_name] [agent_name]
|
||||
if (is_numeric($queue_extension) && is_uuid($call_center_agent_uuid)) {
|
||||
$cmd = "callcenter_config tier del ".$queue_extension."@".$_SESSION['domain_name']." ".$call_center_agent_uuid;
|
||||
$cmd = "callcenter_config tier del ".$queue_extension."@".$domain_name." ".$call_center_agent_uuid;
|
||||
$response = event_socket::api($cmd);
|
||||
}
|
||||
}
|
||||
|
|
@ -181,7 +184,6 @@
|
|||
$p = permissions::new();
|
||||
$p->add('call_center_tier_delete', 'temp');
|
||||
|
||||
$database = new database;
|
||||
$database->app_name = 'call_centers';
|
||||
$database->app_uuid = '95788e50-9500-079e-2807-fd530b0ea370';
|
||||
$database->delete($array);
|
||||
|
|
@ -205,7 +207,6 @@
|
|||
$sql = "select * from v_call_center_queues ";
|
||||
$sql .= "where call_center_queue_uuid = :call_center_queue_uuid ";
|
||||
$parameters['call_center_queue_uuid'] = $call_center_queue_uuid;
|
||||
$database = new database;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (!empty($row)) {
|
||||
//if (!permission_exists('call_center_queue_domain')) {
|
||||
|
|
@ -298,8 +299,8 @@
|
|||
|
||||
//add the recording path if needed
|
||||
if (!empty($queue_greeting)) {
|
||||
if (file_exists($_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$queue_greeting)) {
|
||||
$queue_greeting_path = $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$queue_greeting;
|
||||
if (file_exists($settings->get('switch','recordings', '').'/'.$domain_name.'/'.$queue_greeting)) {
|
||||
$queue_greeting_path = $settings->get('switch','recordings', '').'/'.$domain_name.'/'.$queue_greeting;
|
||||
}
|
||||
else {
|
||||
$queue_greeting_path = trim($queue_greeting);
|
||||
|
|
@ -371,8 +372,8 @@
|
|||
|
||||
//add definable export variables can be set in default settings
|
||||
$export_variables = 'call_center_queue_uuid,sip_h_Alert-Info';
|
||||
if (!empty($_SESSION['call_center']['export_vars'])) {
|
||||
foreach ($_SESSION['call_center']['export_vars'] as $export_variable) {
|
||||
if (!empty($settings->get('call_center','export_vars', []))) {
|
||||
foreach ($settings->get('call_center','export_vars', []) as $export_variable) {
|
||||
$export_variables .= ','.$export_variable;
|
||||
}
|
||||
}
|
||||
|
|
@ -413,7 +414,7 @@
|
|||
if (!empty($queue_cc_exit_keys)) {
|
||||
$dialplan_xml .= " <action application=\"set\" data=\"cc_exit_keys=".xml::sanitize($queue_cc_exit_keys)."\"/>\n";
|
||||
}
|
||||
$dialplan_xml .= " <action application=\"callcenter\" data=\"".xml::sanitize($queue_extension)."@".$_SESSION["domain_name"]."\"/>\n";
|
||||
$dialplan_xml .= " <action application=\"callcenter\" data=\"".xml::sanitize($queue_extension)."@".$domain_name."\"/>\n";
|
||||
if ($destination->valid($queue_timeout_app.':'.$queue_timeout_data)) {
|
||||
$dialplan_xml .= " <action application=\"".xml::sanitize($queue_timeout_app)."\" data=\"".xml::sanitize($queue_timeout_data)."\"/>\n";
|
||||
}
|
||||
|
|
@ -439,7 +440,6 @@
|
|||
$p->add("dialplan_edit", "temp");
|
||||
|
||||
//save to the data
|
||||
$database = new database;
|
||||
$database->app_name = 'call_centers';
|
||||
$database->app_uuid = '95788e50-9500-079e-2807-fd530b0ea370';
|
||||
$database->save($array);
|
||||
|
|
@ -457,7 +457,7 @@
|
|||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["domain_name"]);
|
||||
$cache->delete("dialplan:".$domain_name);
|
||||
|
||||
//clear the destinations session array
|
||||
if (isset($_SESSION['destinations']['array'])) {
|
||||
|
|
@ -496,19 +496,19 @@
|
|||
*/
|
||||
//add the agent
|
||||
if (is_numeric($queue_extension) && is_uuid($call_center_agent_uuid) && is_numeric($tier_level) && is_numeric($tier_position)) {
|
||||
$cmd = "callcenter_config tier add ".$queue_extension."@".$_SESSION["domain_name"]." ".$call_center_agent_uuid." ".$tier_level." ".$tier_position;
|
||||
$cmd = "callcenter_config tier add ".$queue_extension."@".$domain_name." ".$call_center_agent_uuid." ".$tier_level." ".$tier_position;
|
||||
$response = event_socket::api($cmd);
|
||||
}
|
||||
usleep(200);
|
||||
//agent set level
|
||||
if (is_numeric($queue_extension) && is_numeric($tier_level)) {
|
||||
$cmd = "callcenter_config tier set level ".$queue_extension."@".$_SESSION["domain_name"]." ".$call_center_agent_uuid." ".$tier_level;
|
||||
$cmd = "callcenter_config tier set level ".$queue_extension."@".$domain_name." ".$call_center_agent_uuid." ".$tier_level;
|
||||
$response = event_socket::api($cmd);
|
||||
}
|
||||
usleep(200);
|
||||
//agent set position
|
||||
if (is_numeric($queue_extension) && is_numeric($tier_position)) {
|
||||
$cmd = "callcenter_config tier set position ".$queue_extension."@".$_SESSION["domain_name"]." ".$tier_position;
|
||||
$cmd = "callcenter_config tier set position ".$queue_extension."@".$domain_name." ".$tier_position;
|
||||
$response = event_socket::api($cmd);
|
||||
}
|
||||
usleep(200);
|
||||
|
|
@ -538,7 +538,6 @@
|
|||
$sql .= "and call_center_queue_uuid = :call_center_queue_uuid ";
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
$parameters['call_center_queue_uuid'] = $call_center_queue_uuid;
|
||||
$database = new database;
|
||||
$call_center_queues = $database->select($sql, $parameters, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
|
|
@ -587,17 +586,16 @@
|
|||
$sql .= "order by tier_level asc, tier_position asc, a.agent_name asc";
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
$parameters['call_center_queue_uuid'] = $call_center_queue_uuid ?? null;
|
||||
$database = new database;
|
||||
$tiers = $database->select($sql, $parameters, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//add an empty row to the tiers array
|
||||
if (count($tiers) == 0) {
|
||||
$rows = $_SESSION['call_center']['agent_add_rows']['numeric'] ?? null;
|
||||
$rows = $settings->get('call_center','agent_add_rows', null);
|
||||
$id = 0;
|
||||
}
|
||||
if (count($tiers) > 0) {
|
||||
$rows = $_SESSION['call_center']['agent_edit_rows']['numeric'];
|
||||
$rows = $settings->get('call_center','agent_edit_rows', null);
|
||||
$id = count($tiers)+1;
|
||||
}
|
||||
for ($x = 0; $x < $rows; $x++) {
|
||||
|
|
@ -615,7 +613,6 @@
|
|||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "order by agent_name asc";
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
$database = new database;
|
||||
$agents = $database->select($sql, $parameters, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
|
|
@ -624,6 +621,7 @@
|
|||
$audio_files[0] = $sounds->get();
|
||||
unset($sounds);
|
||||
|
||||
//get the list of sounds
|
||||
if (permission_exists('call_center_announce_sound')) {
|
||||
$sounds = new sounds;
|
||||
$sounds->sound_types = ['recordings'];
|
||||
|
|
@ -646,7 +644,7 @@
|
|||
if (empty($queue_tier_rule_no_agent_no_wait)) { $queue_tier_rule_no_agent_no_wait = "true"; }
|
||||
if (empty($queue_discard_abandoned_after)) { $queue_discard_abandoned_after = "900"; }
|
||||
if (empty($queue_abandoned_resume_allowed)) { $queue_abandoned_resume_allowed = "false"; }
|
||||
if (empty($queue_context)) { $queue_context = $_SESSION['domain_name']; }
|
||||
if (empty($queue_context)) { $queue_context = $domain_name; }
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
|
|
@ -667,12 +665,8 @@
|
|||
}
|
||||
|
||||
//set the record_template
|
||||
if (empty($_SESSION['call_center']['record_name']['text'])) {
|
||||
$record_template = $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/archive/\${strftime(%Y)}/\${strftime(%b)}/\${strftime(%d)}/\${uuid}.\${record_ext}";
|
||||
}
|
||||
else {
|
||||
$record_template = $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/archive/".$_SESSION['call_center']['record_name']['text'];
|
||||
}
|
||||
$record_template = $settings->get('switch','recordings', '')."/".$domain_name."/archive/";
|
||||
$record_template .= $settings->get('call_center','record_name', "\${strftime(%Y)}/\${strftime(%b)}/\${strftime(%d)}/\${uuid}.\${record_ext}");
|
||||
|
||||
//show the content
|
||||
if (permission_exists('recording_play') || permission_exists('recording_download')) {
|
||||
|
|
@ -757,7 +751,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','style'=>'margin-right: 15px;','link'=>'call_center_queues.php']);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$settings->get('theme','button_icon_back', ''),'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'call_center_queues.php']);
|
||||
|
||||
if ($action == "update") {
|
||||
if (permission_exists('call_center_wallboard')) {
|
||||
|
|
@ -765,10 +759,10 @@
|
|||
}
|
||||
//echo button::create(['type'=>'button','label'=>$text['button-stop'],'icon'=>$_SESSION['theme']['button_icon_stop'],'link'=>'cmd.php?cmd=unload&id='.urlencode($call_center_queue_uuid)]);
|
||||
//echo button::create(['type'=>'button','label'=>$text['button-start'],'icon'=>$_SESSION['theme']['button_icon_start'],'link'=>'cmd.php?cmd=load&id='.urlencode($call_center_queue_uuid)]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-reload'],'icon'=>$_SESSION['theme']['button_icon_reload'],'link'=>'cmd.php?cmd=reload&id='.urlencode($call_center_queue_uuid)]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'style'=>'margin-right: 15px;','link'=>PROJECT_PATH.'/app/call_center_active/call_center_active.php?queue_name='.urlencode($call_center_queue_uuid)]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-reload'],'icon'=>$settings->get('theme','button_icon_reload', ''),'link'=>'cmd.php?cmd=reload&id='.urlencode($call_center_queue_uuid)]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-view'],'icon'=>$settings->get('theme','button_icon_view', ''),'style'=>'margin-right: 15px;','link'=>PROJECT_PATH.'/app/call_center_active/call_center_active.php?queue_name='.urlencode($call_center_queue_uuid)]);
|
||||
}
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save']);
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$settings->get('theme','button_icon_save', ''),'id'=>'btn_save']);
|
||||
echo " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
|
@ -791,7 +785,7 @@
|
|||
echo " ".$text['label-extension']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='number' name='queue_extension' maxlength='255' min='0' step='1' value=\"".escape($queue_extension)."\" required='required' placeholder=\"".($_SESSION['call_center']['extension_range']['text'] ?? '')."\">\n";
|
||||
echo " <input class='formfld' type='number' name='queue_extension' maxlength='255' min='0' step='1' value=\"".escape($queue_extension)."\" required='required' placeholder=\"".$settings->get('call_center','extension_range', '')."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-extension']."\n";
|
||||
echo "</td>\n";
|
||||
|
|
@ -818,8 +812,8 @@
|
|||
if ($key == 'recordings') {
|
||||
if (
|
||||
!empty($instance_value) &&
|
||||
($instance_value == $row["value"] || $instance_value == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'].'/'.$row["value"]) &&
|
||||
file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'].'/'.pathinfo($row["value"], PATHINFO_BASENAME))
|
||||
($instance_value == $row["value"] || $instance_value == $settings->get('switch','recordings', '')."/".$domain_name.'/'.$row["value"]) &&
|
||||
file_exists($settings->get('switch','recordings', '')."/".$domain_name.'/'.pathinfo($row["value"], PATHINFO_BASENAME))
|
||||
) {
|
||||
$selected = "selected='selected'";
|
||||
$playable = '../recordings/recordings.php?action=download&type=rec&filename='.pathinfo($row["value"], PATHINFO_BASENAME);
|
||||
|
|
@ -862,7 +856,7 @@
|
|||
case 'ogg' : $mime_type = 'audio/ogg'; break;
|
||||
}
|
||||
echo "<audio id='recording_audio_".$instance_id."' style='display: none;' preload='none' ontimeupdate=\"update_progress('".$instance_id."')\" onended=\"recording_reset('".$instance_id."');\" src='".($playable ?? '')."' type='".($mime_type ?? '')."'></audio>";
|
||||
echo button::create(['type'=>'button','title'=>$text['label-play'].' / '.$text['label-pause'],'icon'=>$_SESSION['theme']['button_icon_play'],'id'=>'recording_button_'.$instance_id,'style'=>'display: '.(!empty($mime_type) ? 'inline' : 'none'),'onclick'=>"recording_play('".$instance_id."', document.getElementById('".$instance_id."').value, document.getElementById('".$instance_id."').options[document.getElementById('".$instance_id."').selectedIndex].parentNode.getAttribute('data-type'))"]);
|
||||
echo button::create(['type'=>'button','title'=>$text['label-play'].' / '.$text['label-pause'],'icon'=>$settings->get('theme','button_icon_play', ''),'id'=>'recording_button_'.$instance_id,'style'=>'display: '.(!empty($mime_type) ? 'inline' : 'none'),'onclick'=>"recording_play('".$instance_id."', document.getElementById('".$instance_id."').value, document.getElementById('".$instance_id."').options[document.getElementById('".$instance_id."').selectedIndex].parentNode.getAttribute('data-type'))"]);
|
||||
unset($playable, $mime_type);
|
||||
}
|
||||
echo "<br />\n";
|
||||
|
|
@ -1318,8 +1312,8 @@
|
|||
if ($key == 'recordings') {
|
||||
if (
|
||||
!empty($instance_value) &&
|
||||
($instance_value == $row["value"] || $instance_value == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'].'/'.$row["value"]) &&
|
||||
file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'].'/'.pathinfo($row["value"], PATHINFO_BASENAME))
|
||||
($instance_value == $row["value"] || $instance_value == $settings->get('switch','recordings', '')."/".$domain_name.'/'.$row["value"]) &&
|
||||
file_exists($settings->get('switch','recordings', '')."/".$domain_name.'/'.pathinfo($row["value"], PATHINFO_BASENAME))
|
||||
) {
|
||||
$selected = "selected='selected'";
|
||||
$playable = '../recordings/recordings.php?action=download&type=rec&filename='.pathinfo($row["value"], PATHINFO_BASENAME);
|
||||
|
|
@ -1362,7 +1356,7 @@
|
|||
case 'ogg' : $mime_type = 'audio/ogg'; break;
|
||||
}
|
||||
echo "<audio id='recording_audio_".$instance_id."' style='display: none;' preload='none' ontimeupdate=\"update_progress('".$instance_id."')\" onended=\"recording_reset('".$instance_id."');\" src='".($playable ?? '')."' type='".($mime_type ?? '')."'></audio>";
|
||||
echo button::create(['type'=>'button','title'=>$text['label-play'].' / '.$text['label-pause'],'icon'=>$_SESSION['theme']['button_icon_play'],'id'=>'recording_button_'.$instance_id,'style'=>'display: '.(!empty($mime_type) ? 'inline' : 'none'),'onclick'=>"recording_play('".$instance_id."', document.getElementById('".$instance_id."').value, document.getElementById('".$instance_id."').options[document.getElementById('".$instance_id."').selectedIndex].parentNode.getAttribute('data-type'))"]);
|
||||
echo button::create(['type'=>'button','title'=>$text['label-play'].' / '.$text['label-pause'],'icon'=>$settings->get('theme','button_icon_play', ''),'id'=>'recording_button_'.$instance_id,'style'=>'display: '.(!empty($mime_type) ? 'inline' : 'none'),'onclick'=>"recording_play('".$instance_id."', document.getElementById('".$instance_id."').value, document.getElementById('".$instance_id."').options[document.getElementById('".$instance_id."').selectedIndex].parentNode.getAttribute('data-type'))"]);
|
||||
unset($playable, $mime_type);
|
||||
}
|
||||
echo "<br />\n";
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
$show = $_GET["show"] ?? '';
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
|
||||
|
||||
//get posted data
|
||||
if (!empty($_POST['call_center_queues']) && is_array($_POST['call_center_queues'])) {
|
||||
|
|
@ -219,7 +219,7 @@
|
|||
//echo th_order_by('queue_abandoned_resume_allowed', $text['label-abandoned_resume_allowed'], $order_by, $order);
|
||||
//echo th_order_by('queue_tier_rule_wait_multiply_level', $text['label-tier_rule_wait_multiply_level'], $order_by, $order);
|
||||
echo th_order_by('queue_description', $text['label-description'], $order_by, $order, null, "class='hide-sm-dn'");
|
||||
if (permission_exists('call_center_queue_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('call_center_queue_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -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')) {
|
||||
|
|
@ -269,7 +273,7 @@
|
|||
//echo " <td>".escape($row[queue_abandoned_resume_allowed])." </td>\n";
|
||||
//echo " <td>".escape($row[queue_tier_rule_wait_multiply_level])." </td>\n";
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['queue_description'])."</td>\n";
|
||||
if (permission_exists('call_center_queue_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('call_center_queue_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'>";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
@ -293,3 +297,4 @@
|
|||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -26,11 +26,8 @@
|
|||
|
||||
/**
|
||||
* cache class provides an abstracted cache
|
||||
*
|
||||
* @method string dialplan - builds the dialplan for call center
|
||||
*/
|
||||
//define the call center class
|
||||
if (!class_exists('call_center')) {
|
||||
class call_center {
|
||||
/**
|
||||
* define the variables
|
||||
|
|
@ -611,7 +608,6 @@
|
|||
} //method
|
||||
|
||||
} //class
|
||||
}
|
||||
|
||||
/*
|
||||
$o = new call_center;
|
||||
|
|
@ -625,5 +621,3 @@ $c->destination_number = "";
|
|||
$c->queue_cc_exit_keys = "";
|
||||
$c->dialplan();
|
||||
*/
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -27,8 +27,7 @@
|
|||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
require_once "resources/classes/waveform.php";
|
||||
|
||||
|
||||
use maximal\audio\Waveform;
|
||||
|
||||
//check permisions
|
||||
|
|
@ -96,8 +95,8 @@
|
|||
Waveform::$colorB = !empty($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) : [0,125,232,0.6]; // array rgba, right (b-leg) wave color
|
||||
Waveform::$backgroundColor = !empty($_SESSION['theme']['audio_player_waveform_color_background']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_background']['text']) : [0,0,0,0]; // array rgba, default: transparent
|
||||
Waveform::$axisColor = !empty($_SESSION['theme']['audio_player_waveform_color_axis']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_axis']['text']) : [0,0,0,0.3]; // array rgba
|
||||
Waveform::$singlePhase = empty($_SESSION['theme']['audio_player_waveform_single_phase']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] !== 'true' ? false : true; // positive phase only - left (a-leg) top, right (b-leg) bottom
|
||||
Waveform::$singleAxis = empty($_SESSION['theme']['audio_player_waveform_single_axis']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] !== 'false' ? true : false; // combine channels into single axis
|
||||
Waveform::$singlePhase = filter_var($_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] ?? false, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // positive phase only - left (a-leg) top, right (b-leg) bottom
|
||||
Waveform::$singleAxis = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? true, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // combine channels into single axis
|
||||
$height = !empty($_SESSION['theme']['audio_player_waveform_height']['text']) && is_numeric(str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text'])) ? 2.2 * (int) str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text']) : null;
|
||||
$wf = $waveform->getWaveform($temp_filename, 1600, $height ?? 180); // input: png filename returns boolean true/false, or 'base64' returns base64 string
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
$show = $_GET["show"] ?? '';
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
|
||||
|
||||
//get search
|
||||
$search = $_REQUEST['search'] ?? null;
|
||||
|
|
@ -235,7 +235,7 @@
|
|||
}
|
||||
echo th_order_by('call_flow_enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
|
||||
echo th_order_by('call_flow_description', $text['label-call_flow_description'], $order_by, $order, null, "class='hide-sm-dn'");
|
||||
if (permission_exists('call_flow_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('call_flow_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -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')) {
|
||||
|
|
@ -287,7 +291,7 @@
|
|||
echo escape($row['call_flow_enabled']);
|
||||
}
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['call_flow_description'])." </td>\n";
|
||||
if (permission_exists('call_flow_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('call_flow_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'>";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
@ -311,3 +315,4 @@
|
|||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
*/
|
||||
|
||||
//define the call_flows class
|
||||
if (!class_exists('call_flows')) {
|
||||
class call_flows {
|
||||
|
||||
/**
|
||||
|
|
@ -410,6 +409,3 @@ if (!class_exists('call_flows')) {
|
|||
} //method
|
||||
|
||||
} //class
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
require_once "resources/classes/waveform.php";
|
||||
|
||||
use maximal\audio\Waveform;
|
||||
|
||||
|
|
@ -96,8 +95,8 @@
|
|||
Waveform::$colorB = !empty($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) : [0,125,232,0.6]; // array rgba, right (b-leg) wave color
|
||||
Waveform::$backgroundColor = !empty($_SESSION['theme']['audio_player_waveform_color_background']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_background']['text']) : [0,0,0,0]; // array rgba, default: transparent
|
||||
Waveform::$axisColor = !empty($_SESSION['theme']['audio_player_waveform_color_axis']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_axis']['text']) : [0,0,0,0.3]; // array rgba
|
||||
Waveform::$singlePhase = empty($_SESSION['theme']['audio_player_waveform_single_phase']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] !== 'true' ? false : true; // positive phase only - left (a-leg) top, right (b-leg) bottom
|
||||
Waveform::$singleAxis = empty($_SESSION['theme']['audio_player_waveform_single_axis']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] !== 'false' ? true : false; // combine channels into single axis
|
||||
Waveform::$singlePhase = filter_var($_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] ?? false, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // positive phase only - left (a-leg) top, right (b-leg) bottom
|
||||
Waveform::$singleAxis = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? true, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // combine channels into single axis
|
||||
$height = !empty($_SESSION['theme']['audio_player_waveform_height']['text']) && is_numeric(str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text'])) ? 2.2 * (int) str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text']) : null;
|
||||
$wf = $waveform->getWaveform($temp_filename, 1600, $height ?? 180); // input: png filename returns boolean true/false, or 'base64' returns base64 string
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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')) {
|
||||
|
|
@ -296,8 +296,8 @@
|
|||
echo " <th>" . $text['label-dnd'] . "</th>\n";
|
||||
}
|
||||
echo " <th class='" . ($is_included ? 'hide-md-dn' : 'hide-sm-dn') . "'>" . $text['label-description'] . "</th>\n";
|
||||
$list_row_edit_button = $_SESSION['theme']['list_row_edit_button']['boolean'] ?? 'false';
|
||||
if ( $list_row_edit_button === 'true') {
|
||||
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
|
||||
if ($list_row_edit_button) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -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";
|
||||
|
|
@ -399,7 +402,7 @@
|
|||
echo " </td>\n";
|
||||
}
|
||||
echo " <td class='description overflow " . ($is_included ? 'hide-md-dn' : 'hide-sm-dn') . "'>" . escape($row['description']) . " </td>\n";
|
||||
if ($list_row_edit_button === 'true') {
|
||||
if ($list_row_edit_button) {
|
||||
echo " <td class='action-button'>";
|
||||
echo button::create(['type' => 'button', 'title' => $text['button-edit'], 'icon' => $_SESSION['theme']['button_icon_edit'], 'link' => $list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@
|
|||
*/
|
||||
|
||||
//send feature event notify to the phone
|
||||
if (!empty($_SESSION['device']['feature_sync']['boolean']) && $_SESSION['device']['feature_sync']['boolean'] == "true") {
|
||||
if (filter_var($_SESSION['device']['feature_sync']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
$ring_count = ceil($call_timeout / 6);
|
||||
$feature_event_notify = new feature_event_notify;
|
||||
$feature_event_notify->domain_name = $_SESSION['domain_name'];
|
||||
|
|
@ -358,7 +358,7 @@
|
|||
else {
|
||||
$feature_event_notify->forward_all_destination = $forward_all_destination;
|
||||
}
|
||||
|
||||
|
||||
if ($forward_busy_destination == "") {
|
||||
$feature_event_notify->forward_busy_destination = "0";
|
||||
}
|
||||
|
|
@ -421,7 +421,6 @@
|
|||
|
||||
//synchronize configuration
|
||||
if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) {
|
||||
require_once "app/extensions/resources/classes/extension.php";
|
||||
$ext = new extension;
|
||||
$ext->xml();
|
||||
unset($ext);
|
||||
|
|
@ -504,7 +503,7 @@
|
|||
}
|
||||
|
||||
//prepare the autocomplete
|
||||
if(!empty($_SESSION['follow_me']['follow_me_autocomplete']['boolean']) && $_SESSION['follow_me']['follow_me_autocomplete']['boolean'] == 'true') {
|
||||
if(filter_var($_SESSION['follow_me']['follow_me_autocomplete']['boolean'] ?? false, FILTER_VALIDATE_BOOLEAN)) {
|
||||
echo "<link rel=\"stylesheet\" href=\"".PROJECT_PATH."/resources/jquery/jquery-ui.min.css\" />\n";
|
||||
echo "<script src=\"".PROJECT_PATH."/resources/jquery/jquery-ui.min.js\"></script>\n";
|
||||
echo "<script type=\"text/javascript\">\n";
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@
|
|||
$p->delete('extension_edit', 'temp');
|
||||
|
||||
//send feature event notify to the phone
|
||||
if (!empty($_SESSION['device']['feature_sync']['boolean']) && $_SESSION['device']['feature_sync']['boolean'] == "true") {
|
||||
if (filter_var($_SESSION['device']['feature_sync']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
foreach ($extensions as $uuid => $extension) {
|
||||
$feature_event_notify = new feature_event_notify;
|
||||
$feature_event_notify->domain_name = $_SESSION['domain_name'];
|
||||
|
|
@ -248,7 +248,6 @@
|
|||
|
||||
//synchronize configuration
|
||||
if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) {
|
||||
require_once "app/extensions/resources/classes/extension.php";
|
||||
$ext = new extension;
|
||||
$ext->xml();
|
||||
unset($ext);
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@
|
|||
$p->delete('extension_edit', 'temp');
|
||||
|
||||
//send feature event notify to the phone
|
||||
if (!empty($_SESSION['device']['feature_sync']['boolean']) && $_SESSION['device']['feature_sync']['boolean'] == "true") {
|
||||
if (filter_var($_SESSION['device']['feature_sync']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
foreach ($extensions as $uuid => $extension) {
|
||||
$feature_event_notify = new feature_event_notify;
|
||||
$feature_event_notify->domain_name = $_SESSION['domain_name'];
|
||||
|
|
@ -261,7 +261,6 @@
|
|||
|
||||
//synchronize configuration
|
||||
if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) {
|
||||
require_once "app/extensions/resources/classes/extension.php";
|
||||
$ext = new extension;
|
||||
$ext->xml();
|
||||
unset($ext);
|
||||
|
|
|
|||
|
|
@ -405,7 +405,7 @@
|
|||
$p->delete('follow_me_edit', 'temp');
|
||||
|
||||
//send feature event notify to the phone
|
||||
if (!empty($_SESSION['device']['feature_sync']['boolean']) && $_SESSION['device']['feature_sync']['boolean'] == "true") {
|
||||
if (filter_var($_SESSION['device']['feature_sync']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
foreach ($extensions as $uuid => $extension) {
|
||||
$feature_event_notify = new feature_event_notify;
|
||||
$feature_event_notify->domain_name = $_SESSION['domain_name'];
|
||||
|
|
@ -426,7 +426,6 @@
|
|||
|
||||
//synchronize configuration
|
||||
if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) {
|
||||
require_once "app/extensions/resources/classes/extension.php";
|
||||
$ext = new extension;
|
||||
$ext->xml();
|
||||
unset($ext);
|
||||
|
|
|
|||
|
|
@ -45,4 +45,13 @@
|
|||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "90";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Number of days to retain the maintenance logs in the database.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "e329db05-2967-422a-a71f-d0175b083828";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "call_recordings";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "record_extension";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "mp3";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Call recording file format options: wav, mp3";
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -253,9 +253,6 @@
|
|||
if (is_array($call_recordings) && @sizeof($call_recordings) != 0) {
|
||||
$x = 0;
|
||||
foreach ($call_recordings as $row) {
|
||||
//add padding to the call recording length
|
||||
$call_recording_length_padding = (!empty($row['call_recording_length'])) ? str_pad($row['call_recording_length'], 2, '0', STR_PAD_LEFT) : '';
|
||||
|
||||
//playback progress bar
|
||||
if (permission_exists('call_recording_play')) {
|
||||
echo "<tr class='list-row' id='recording_progress_bar_".escape($row['call_recording_uuid'])."' style='display: none;' onclick=\"recording_seek(event,'".escape($row['call_recording_uuid'])."')\"><td id='playback_progress_bar_background_".escape($row['call_recording_uuid'])."' class='playback_progress_bar_background' colspan='".$col_count."'><span class='playback_progress_bar' id='recording_progress_".escape($row['call_recording_uuid'])."'></span></td>".(permission_exists('xml_cdr_details') ? "<td class='action-button' style='border-bottom: none !important;'></td>" : null)."</tr>\n";
|
||||
|
|
@ -301,7 +298,7 @@
|
|||
}
|
||||
echo " </td>\n";
|
||||
}
|
||||
echo " <td class='right overflow hide-sm-dn shrink'>".($row['call_recording_length'] <= 59 ? '0:' : null).escape($call_recording_length_padding)."</td>\n";
|
||||
echo " <td class='right overflow hide-sm-dn shrink'>".escape(gmdate("G:i:s", $row['call_recording_length']))."</td>\n";
|
||||
echo " <td class='overflow center no-wrap'>".escape($row['call_recording_date_formatted'])." <span class='hide-sm-dn'>".escape($row['call_recording_time_formatted'])."</span></td>\n";
|
||||
echo " <td class='left hide-sm-dn shrink'>".($row['call_direction'] != '' ? escape($text['label-'.$row['call_direction']]) : null)."</td>\n";
|
||||
if (permission_exists('xml_cdr_details')) {
|
||||
|
|
|
|||
|
|
@ -26,10 +26,7 @@
|
|||
|
||||
/**
|
||||
* call_recordings class
|
||||
*
|
||||
* @method null download
|
||||
*/
|
||||
if (!class_exists('call_recordings')) {
|
||||
class call_recordings {
|
||||
|
||||
/**
|
||||
|
|
@ -525,6 +522,3 @@ if (!class_exists('call_recordings')) {
|
|||
}
|
||||
|
||||
} //class
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
require_once "resources/classes/waveform.php";
|
||||
|
||||
use maximal\audio\Waveform;
|
||||
|
||||
|
|
@ -84,8 +83,8 @@
|
|||
Waveform::$colorB = !empty($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) : [0,125,232,0.6]; // array rgba, right (b-leg) wave color
|
||||
Waveform::$backgroundColor = !empty($_SESSION['theme']['audio_player_waveform_color_background']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_background']['text']) : [0,0,0,0]; // array rgba, default: transparent
|
||||
Waveform::$axisColor = !empty($_SESSION['theme']['audio_player_waveform_color_axis']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_axis']['text']) : [0,0,0,0.3]; // array rgba
|
||||
Waveform::$singlePhase = empty($_SESSION['theme']['audio_player_waveform_single_phase']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] !== 'true' ? false : true; // positive phase only - left (a-leg) top, right (b-leg) bottom
|
||||
Waveform::$singleAxis = empty($_SESSION['theme']['audio_player_waveform_single_axis']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] !== 'false' ? true : false; // combine channels into single axis
|
||||
Waveform::$singlePhase = filter_var($_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] ?? false, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // positive phase only - left (a-leg) top, right (b-leg) bottom
|
||||
Waveform::$singleAxis = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? true, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // combine channels into single axis
|
||||
$height = !empty($_SESSION['theme']['audio_player_waveform_height']['text']) && is_numeric(str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text'])) ? 2.2 * (int) str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text']) : null;
|
||||
$wf = $waveform->getWaveform($temp_filename, 1600, $height ?? 180); // input: png filename returns boolean true/false, or 'base64' returns base64 string
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,5 +56,16 @@
|
|||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_active_all";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_active_profile";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_active_application";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_active_codec";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_active_secure";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -198,19 +198,25 @@
|
|||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='if (this.checked) { refresh_stop(); } else { refresh_start(); } list_all_toggle();' ".(empty($rows) ? "style='visibility: hidden;'" : null).">\n";
|
||||
echo " </th>\n";
|
||||
}
|
||||
echo " <th class='hide-small'>".$text['label-profile']."</th>\n";
|
||||
//echo" <th>".$text['label-created']."</th>\n";
|
||||
if (permission_exists('call_active_profile')) {
|
||||
echo " <th class='hide-small'>".$text['label-profile']."</th>\n";
|
||||
}
|
||||
echo " <th>".$text['label-duration']."</th>\n";
|
||||
if ($show == 'all') {
|
||||
echo " <th>".$text['label-domain']."</th>\n";
|
||||
}
|
||||
//echo " <th>".$text['label-number']."</th>\n";
|
||||
echo " <th class='hide-small'>".$text['label-cid-name']."</th>\n";
|
||||
echo " <th>".$text['label-cid-number']."</th>\n";
|
||||
echo " <th>".$text['label-destination']."</th>\n";
|
||||
echo " <th class='hide-small hide-medium'>".$text['label-app']."</th>\n";
|
||||
echo " <th class='hide-small hide-medium'>".$text['label-codec']."</th>\n";
|
||||
echo " <th class='hide-small hide-medium'>".$text['label-secure']."</th>\n";
|
||||
if (permission_exists('call_active_application')) {
|
||||
echo " <th class='hide-small hide-medium'>".$text['label-app']."</th>\n";
|
||||
}
|
||||
if (permission_exists('call_active_codec')) {
|
||||
echo " <th class='hide-small hide-medium'>".$text['label-codec']."</th>\n";
|
||||
}
|
||||
if (permission_exists('call_active_secure')) {
|
||||
echo " <th class='hide-small hide-medium'>".$text['label-secure']."</th>\n";
|
||||
}
|
||||
if (permission_exists('call_active_eavesdrop') || permission_exists('call_active_hangup')) {
|
||||
echo " <th> </th>\n";
|
||||
}
|
||||
|
|
@ -269,7 +275,9 @@
|
|||
echo " <input type='hidden' name='calls[$x][uuid]' value='".escape($uuid)."' />\n";
|
||||
echo " </td>\n";
|
||||
}
|
||||
echo " <td class='hide-small'>".escape($sip_profile)." </td>\n";
|
||||
if (permission_exists('call_active_profile')) {
|
||||
echo " <td class='hide-small'>".escape($sip_profile)." </td>\n";
|
||||
}
|
||||
//echo " <td>".escape($created)." </td>\n";
|
||||
echo " <td>".escape($elapsed_time)."</td>\n";
|
||||
if ($show == 'all') {
|
||||
|
|
@ -279,9 +287,15 @@
|
|||
echo " <td class='hide-small'>".escape($cid_name)." </td>\n";
|
||||
echo " <td>".escape($cid_num)." </td>\n";
|
||||
echo " <td>".escape($dest)." </td>\n";
|
||||
echo " <td class='hide-small hide-medium' style='max-width: 200px; word-wrap: break-word;'>".(!empty($application) ? escape($application).":".escape($application_data) : null)." </td>\n";
|
||||
echo " <td class='hide-small hide-medium'>".escape($read_codec).":".escape($read_rate)." / ".escape($write_codec).":".escape($write_rate)." </td>\n";
|
||||
echo " <td class='hide-small hide-medium'>".escape($secure)." </td>\n";
|
||||
if (permission_exists('call_active_application')) {
|
||||
echo " <td class='hide-small hide-medium' style='max-width: 200px; word-wrap: break-word;'>".(!empty($application) ? escape($application).":".escape($application_data) : null)." </td>\n";
|
||||
}
|
||||
if (permission_exists('call_active_codec')) {
|
||||
echo " <td class='hide-small hide-medium'>".escape($read_codec).":".escape($read_rate)." / ".escape($write_codec).":".escape($write_rate)." </td>\n";
|
||||
}
|
||||
if (permission_exists('call_active_secure')) {
|
||||
echo " <td class='hide-small hide-medium'>".escape($secure)." </td>\n";
|
||||
}
|
||||
if (permission_exists('call_active_eavesdrop') || permission_exists('call_active_hangup')) {
|
||||
echo " <td class='button right' style='padding-right: 0;'>\n";
|
||||
//eavesdrop
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
$show = $_GET["show"] ?? '';
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
|
||||
|
||||
//get posted data
|
||||
if (!empty($_POST['conference_centers'])) {
|
||||
|
|
@ -221,7 +221,7 @@
|
|||
echo th_order_by('conference_center_pin_length', $text['label-conference_center_pin_length'], $order_by, $order, null, "class='center shrink'");
|
||||
echo th_order_by('conference_center_enabled', $text['label-conference_center_enabled'], $order_by, $order, null, "class='center'");
|
||||
echo th_order_by('conference_center_description', $text['label-conference_center_description'], $order_by, $order, null, "class='hide-sm-dn'");
|
||||
if (permission_exists('conference_center_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('conference_center_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -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')) {
|
||||
|
|
@ -262,7 +266,7 @@
|
|||
}
|
||||
echo " </td>\n";
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['conference_center_description'])." </td>\n";
|
||||
if (permission_exists('conference_center_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('conference_center_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'>";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
@ -285,3 +289,4 @@
|
|||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
$search = $_GET["search"] ?? null;
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
|
||||
|
||||
//get the http post data
|
||||
if (!empty($_POST['conference_rooms'])) {
|
||||
|
|
@ -300,7 +300,7 @@
|
|||
echo th_order_by('enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
|
||||
}
|
||||
echo th_order_by('description', $text['label-description'], $order_by, $order, null, "class='hide-sm-dn'");
|
||||
if (permission_exists('conference_room_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('conference_room_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -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')) {
|
||||
|
|
@ -486,7 +490,7 @@
|
|||
}
|
||||
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['description'])."</td>\n";
|
||||
if (permission_exists('conference_room_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('conference_room_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'>\n";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
@ -508,3 +512,4 @@
|
|||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
$text = $language->get();
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
|
||||
|
||||
//set variables from the http values
|
||||
$order_by = $_GET["order_by"] ?? '' ? $_GET["order_by"] : 'start_epoch';
|
||||
|
|
@ -152,7 +152,7 @@
|
|||
echo "<th>".$text['label-time']."</th>\n";
|
||||
echo th_order_by('start_epoch', $text['label-start'], $order_by, $order);
|
||||
echo th_order_by('end_epoch', $text['label-end'], $order_by, $order);
|
||||
if (permission_exists('conference_session_details') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('conference_session_details') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -191,7 +191,7 @@
|
|||
echo " <td>".$time_difference." </td>\n";
|
||||
echo " <td>".$start_date." </td>\n";
|
||||
echo " <td>".$end_date." </td>\n";
|
||||
if (permission_exists('conference_session_details') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('conference_session_details') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'>\n";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
$text = $language->get();
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
|
||||
|
||||
//get the http post data
|
||||
if (!empty($_POST['conference_sessions'])) {
|
||||
|
|
@ -172,7 +172,7 @@
|
|||
echo th_order_by('profile', $text['label-profile'], $order_by, $order);
|
||||
//echo th_order_by('recording', $text['label-recording'], $order_by, $order);
|
||||
echo "<th>".$text['label-tools']."</th>\n";
|
||||
if ($list_row_edit_button == 'true') {
|
||||
if ($list_row_edit_button) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -232,7 +232,7 @@
|
|||
echo "</table>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
if ($list_row_edit_button == 'true') {
|
||||
if ($list_row_edit_button) {
|
||||
echo " <td class='action-button'>\n";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
|
|||
*/
|
||||
|
||||
//define the conference centers class
|
||||
if (!class_exists('conference_centers')) {
|
||||
class conference_centers {
|
||||
|
||||
/**
|
||||
|
|
@ -800,7 +799,7 @@ if (!class_exists('conference_centers')) {
|
|||
|
||||
|
||||
} //class
|
||||
}
|
||||
|
||||
|
||||
//example conference center
|
||||
/*
|
||||
|
|
@ -814,5 +813,3 @@ if (!class_exists('conference_centers')) {
|
|||
$result = $conference_center->rooms();
|
||||
print_r($result);
|
||||
*/
|
||||
|
||||
?>
|
||||
|
|
@ -27,7 +27,6 @@
|
|||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
require_once "resources/classes/waveform.php";
|
||||
|
||||
use maximal\audio\Waveform;
|
||||
|
||||
|
|
@ -96,8 +95,8 @@
|
|||
Waveform::$colorB = !empty($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_b_leg']['text']) : [0,125,232,0.6]; // array rgba, right (b-leg) wave color
|
||||
Waveform::$backgroundColor = !empty($_SESSION['theme']['audio_player_waveform_color_background']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_background']['text']) : [0,0,0,0]; // array rgba, default: transparent
|
||||
Waveform::$axisColor = !empty($_SESSION['theme']['audio_player_waveform_color_axis']['text']) ? color_to_rgba_array($_SESSION['theme']['audio_player_waveform_color_axis']['text']) : [0,0,0,0.3]; // array rgba
|
||||
Waveform::$singlePhase = empty($_SESSION['theme']['audio_player_waveform_single_phase']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] !== 'true' ? false : true; // positive phase only - left (a-leg) top, right (b-leg) bottom
|
||||
Waveform::$singleAxis = empty($_SESSION['theme']['audio_player_waveform_single_axis']['boolean']) || $_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] !== 'false' ? true : false; // combine channels into single axis
|
||||
Waveform::$singlePhase = filter_var($_SESSION['theme']['audio_player_waveform_single_phase']['boolean'] ?? false, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // positive phase only - left (a-leg) top, right (b-leg) bottom
|
||||
Waveform::$singleAxis = filter_var($_SESSION['theme']['audio_player_waveform_single_axis']['boolean'] ?? true, FILTER_VALIDATE_BOOL) ? 'true': 'false'; // combine channels into single axis
|
||||
$height = !empty($_SESSION['theme']['audio_player_waveform_height']['text']) && is_numeric(str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text'])) ? 2.2 * (int) str_replace('px','',$_SESSION['theme']['audio_player_waveform_height']['text']) : null;
|
||||
$wf = $waveform->getWaveform($temp_filename, 1600, $height ?? 180); // input: png filename returns boolean true/false, or 'base64' returns base64 string
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
$text = $language->get();
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
|
||||
|
||||
//get the http post data
|
||||
if (!empty($_POST['conference_control_details'])) {
|
||||
|
|
@ -163,7 +163,7 @@
|
|||
echo th_order_by('control_action', $text['label-control_action'], $order_by, $order, null, null, $param);
|
||||
echo th_order_by('control_data', $text['label-control_data'], $order_by, $order, null, "class='pct-50 hide-xs'", $param);
|
||||
echo th_order_by('control_enabled', $text['label-control_enabled'], $order_by, $order, null, "class='center'", $param);
|
||||
if (permission_exists('conference_control_detail_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('conference_control_detail_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -200,7 +200,7 @@
|
|||
echo $text['label-'.$row['control_enabled']];
|
||||
}
|
||||
echo " </td>\n";
|
||||
if (permission_exists('conference_control_detail_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('conference_control_detail_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'>\n";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
$text = $language->get();
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
|
||||
|
||||
//get the http post data
|
||||
if (!empty($_POST['conference_controls'])) {
|
||||
|
|
@ -179,7 +179,7 @@
|
|||
echo th_order_by('control_name', $text['label-control_name'], $order_by, $order);
|
||||
echo th_order_by('control_enabled', $text['label-control_enabled'], $order_by, $order, null, "class='center shrink'");
|
||||
echo " <th class='hide-sm-dn'>".$text['label-control_description']."</th>\n";
|
||||
if (permission_exists('conference_control_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('conference_control_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -215,7 +215,7 @@
|
|||
}
|
||||
echo " </td>\n";
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['control_description'])."</td>\n";
|
||||
if (permission_exists('conference_control_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('conference_control_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'>\n";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
|
|||
|
|
@ -26,12 +26,7 @@
|
|||
|
||||
/**
|
||||
* conference_controls class
|
||||
*
|
||||
* @method null delete
|
||||
* @method null toggle
|
||||
* @method null copy
|
||||
*/
|
||||
if (!class_exists('conference_controls')) {
|
||||
class conference_controls {
|
||||
|
||||
/**
|
||||
|
|
@ -426,6 +421,3 @@ if (!class_exists('conference_controls')) {
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
$text = $language->get();
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
|
||||
|
||||
//get the http post data
|
||||
if (!empty($_POST['conference_profile_params'])) {
|
||||
|
|
@ -152,7 +152,7 @@
|
|||
echo th_order_by('profile_param_value', $text['label-profile_param_value'], $order_by, $order, null, "class='pct-40'", $param);
|
||||
echo th_order_by('profile_param_enabled', $text['label-profile_param_enabled'], $order_by, $order, null, "class='center'", $param);
|
||||
echo th_order_by('profile_param_description', $text['label-profile_param_description'], $order_by, $order, null, "class='hide-sm-dn'", $param);
|
||||
if (permission_exists('conference_profile_param_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('conference_profile_param_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -189,7 +189,7 @@
|
|||
}
|
||||
echo " </td>\n";
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['profile_param_description'])." </td>\n";
|
||||
if (permission_exists('conference_profile_param_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('conference_profile_param_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'>\n";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
$search = $_GET["search"] ?? '';
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
|
||||
|
||||
//get the http post data
|
||||
if (!empty($_POST['conference_profiles'])) {
|
||||
|
|
@ -175,7 +175,7 @@
|
|||
echo th_order_by('profile_name', $text['label-profile_name'], $order_by, $order);
|
||||
echo th_order_by('profile_enabled', $text['label-profile_enabled'], $order_by, $order, null, "class='center'");
|
||||
echo " <th class='hide-sm-dn'>".$text['label-profile_description']."</th>\n";
|
||||
if (permission_exists('conference_profile_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('conference_profile_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -211,7 +211,7 @@
|
|||
}
|
||||
echo " </td>\n";
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['profile_description'])."</td>\n";
|
||||
if (permission_exists('conference_profile_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('conference_profile_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'>\n";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
|
|||
|
|
@ -26,12 +26,7 @@
|
|||
|
||||
/**
|
||||
* conference_profiles class
|
||||
*
|
||||
* @method null delete
|
||||
* @method null toggle
|
||||
* @method null copy
|
||||
*/
|
||||
if (!class_exists('conference_profiles')) {
|
||||
class conference_profiles {
|
||||
|
||||
/**
|
||||
|
|
@ -432,6 +427,3 @@ if (!class_exists('conference_profiles')) {
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
$show = $_GET["show"] ?? '';
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
|
||||
|
||||
//get posted data
|
||||
if (!empty($_POST['conferences'])) {
|
||||
|
|
@ -223,7 +223,7 @@
|
|||
echo "<th style='text-align: center;'>".$text['label-tools']."</th>\n";
|
||||
echo th_order_by('conference_enabled', $text['table-enabled'], $order_by, $order, null, "class='center'");
|
||||
echo th_order_by('conference_description', $text['table-description'], $order_by, $order, null, "class='hide-sm-dn'");
|
||||
if (permission_exists('conference_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('conference_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -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')) {
|
||||
|
|
@ -277,7 +281,7 @@
|
|||
echo $text['label-'.$row['conference_enabled']];
|
||||
}
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['conference_description'])." </td>\n";
|
||||
if (permission_exists('conference_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('conference_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'>";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
@ -301,3 +305,4 @@
|
|||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
*/
|
||||
|
||||
//define the conferences class
|
||||
if (!class_exists('conferences')) {
|
||||
class conferences {
|
||||
|
||||
/**
|
||||
|
|
@ -374,6 +373,3 @@ if (!class_exists('conferences')) {
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -144,7 +144,7 @@
|
|||
echo " <td>".escape($conference_extension)."</td>\n";
|
||||
echo " <td>".escape($participant_pin)."</td>\n";
|
||||
echo " <td class='center'>".escape($member_count)."</td>\n";
|
||||
if (permission_exists('conference_interactive_view') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('conference_interactive_view') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
echo " <td class='action-button'>";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
$order = $_GET["order"] ?? '';
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
|
||||
$button_icon_view = !empty($_SESSION['theme']['button_icon_view']) ? $_SESSION['theme']['button_icon_view'] : '';
|
||||
|
||||
//add the user filter and search term
|
||||
|
|
@ -187,7 +187,7 @@
|
|||
echo th_order_by('transaction_address', $text['label-transaction_address'], $order_by, $order);
|
||||
echo th_order_by('transaction_type', $text['label-transaction_type'], $order_by, $order);
|
||||
echo th_order_by('transaction_date', $text['label-transaction_date'], $order_by, $order);
|
||||
if (permission_exists('database_transaction_edit') && !empty($list_row_edit_button) && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('database_transaction_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -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'])." </td>\n";
|
||||
|
|
@ -206,7 +210,7 @@
|
|||
echo " <td>".escape($row['transaction_address'])." </td>\n";
|
||||
echo " <td>".escape($row['transaction_type'])." </td>\n";
|
||||
echo " <td>".escape($row['transaction_date'])." </td>\n";
|
||||
if (permission_exists('database_transaction_edit') && !empty($list_row_edit_button) && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('database_transaction_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'>\n";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
@ -225,3 +229,4 @@
|
|||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
@ -41,10 +41,13 @@
|
|||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//initialize the database
|
||||
$database = new database;
|
||||
//initialize the database object
|
||||
$database = database::new();
|
||||
|
||||
//initialize the destinations object
|
||||
//initialize the settings object
|
||||
$settings = new settings(['database' => $database, 'domain_uuid' => $domain_uuid]);
|
||||
|
||||
//initialize the destination object
|
||||
$destination = new destinations;
|
||||
|
||||
//initialize the ringbacks object
|
||||
|
|
@ -68,17 +71,20 @@
|
|||
default: $destination_type = 'inbound';
|
||||
}
|
||||
|
||||
//get the call recording extension
|
||||
$record_extension = $settings->get('call_recordings', 'record_extension', 'mp3');
|
||||
|
||||
//get total destination count from the database, check limit, if defined
|
||||
if (!permission_exists('destination_domain')) {
|
||||
if ($action == 'add') {
|
||||
if (!empty($_SESSION['limit']['destinations']['numeric'])) {
|
||||
if (!empty($settings->get('limit', 'destinations', ''))) {
|
||||
$sql = "select count(*) from v_destinations where domain_uuid = :domain_uuid ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$total_destinations = $database->select($sql, $parameters, 'column');
|
||||
unset($sql, $parameters);
|
||||
|
||||
if ($total_destinations >= $_SESSION['limit']['destinations']['numeric']) {
|
||||
message::add($text['message-maximum_destinations'].' '.$_SESSION['limit']['destinations']['numeric'], 'negative');
|
||||
if ($total_destinations >= $settings->get('limit', 'destinations', '')) {
|
||||
message::add($text['message-maximum_destinations'].' '.$settings->get('limit', 'destinations', ''), 'negative');
|
||||
header('Location: destinations.php');
|
||||
exit;
|
||||
}
|
||||
|
|
@ -199,7 +205,7 @@
|
|||
if (empty($destination_enabled)) { $msg .= $text['message-required']." ".$text['label-destination_enabled']."<br>\n"; }
|
||||
|
||||
//check for duplicates
|
||||
if ($destination_type == 'inbound' && $destination_number != $db_destination_number && $_SESSION['destinations']['unique']['boolean'] == 'true') {
|
||||
if ($destination_type == 'inbound' && $destination_number != $db_destination_number && $settings->get('destinations', 'unique', '')) {
|
||||
$sql = "select count(*) from v_destinations ";
|
||||
$sql .= "where (destination_number = :destination_number or destination_prefix || destination_number = :destination_number) ";
|
||||
$sql .= "and destination_type = 'inbound' ";
|
||||
|
|
@ -448,15 +454,14 @@
|
|||
if (!empty($destination_condition_field)) {
|
||||
$dialplan_detail_type = $destination_condition_field;
|
||||
}
|
||||
elseif (!empty($_SESSION['dialplan']['destination']['text'])) {
|
||||
$dialplan_detail_type = $_SESSION['dialplan']['destination']['text'];
|
||||
elseif (!empty($settings->get('dialplan', 'destination', ''))) {
|
||||
$dialplan_detail_type = $settings->get('dialplan', 'destination', '');
|
||||
}
|
||||
else {
|
||||
$dialplan_detail_type = "destination_number";
|
||||
}
|
||||
|
||||
//authorized specific dialplan_detail_type that are safe, sanitize all other values
|
||||
$dialplan_detail_type = $_SESSION['dialplan']['destination']['text'];
|
||||
switch ($dialplan_detail_type) {
|
||||
case 'destination_number':
|
||||
break;
|
||||
|
|
@ -534,10 +539,11 @@
|
|||
}
|
||||
if (!empty($destination_record) && $destination_record == 'true') {
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"record_path=\${recordings_dir}/\${domain_name}/archive/\${strftime(%Y)}/\${strftime(%b)}/\${strftime(%d)}\" inline=\"true\"/>\n";
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"record_name=\${uuid}.\${record_ext}\" inline=\"true\"/>\n";
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"record_name=\${uuid}.".$record_extension."\" inline=\"true\"/>\n";
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"record_append=true\" inline=\"true\"/>\n";
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"record_in_progress=true\" inline=\"true\"/>\n";
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"recording_follow_transfer=true\" inline=\"true\"/>\n";
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"record_stereo_swap=true\" inline=\"true\"/>\n";
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"record_session\" data=\"\${record_path}/\${record_name}\" inline=\"false\"/>\n";
|
||||
}
|
||||
if (!empty($destination_hold_music)) {
|
||||
|
|
@ -596,7 +602,7 @@
|
|||
$dialplan["dialplan_xml"] .= "</extension>\n";
|
||||
|
||||
//dialplan details
|
||||
if ($_SESSION['destinations']['dialplan_details']['boolean'] == "true") {
|
||||
if ($settings->get('destinations', 'dialplan_details', '')) {
|
||||
|
||||
//set initial value of the row id
|
||||
$y=0;
|
||||
|
|
@ -637,8 +643,8 @@
|
|||
if (!empty($destination_condition_field)) {
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = $destination_condition_field;
|
||||
}
|
||||
elseif (!empty($_SESSION['dialplan']['destination']['text'])) {
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = $_SESSION['dialplan']['destination']['text'];
|
||||
elseif (!empty($settings->get('dialplan', 'destination', ''))) {
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = $settings->get('dialplan', 'destination', '');
|
||||
}
|
||||
else {
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "regex";
|
||||
|
|
@ -697,8 +703,8 @@
|
|||
if (!empty($destination_condition_field)) {
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = $destination_condition_field;
|
||||
}
|
||||
elseif (!empty($_SESSION['dialplan']['destination']['text'])) {
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = $_SESSION['dialplan']['destination']['text'];
|
||||
elseif (!empty($settings->get('dialplan', 'destination', ''))) {
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = $settings->get('dialplan', 'destination', '');
|
||||
}
|
||||
else {
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "destination_number";
|
||||
|
|
@ -946,7 +952,7 @@
|
|||
$dialplan["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid;
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "record_name=\${uuid}.\${record_ext}";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "record_name=\${uuid}.".$record_extension;
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_inline"] = "true";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = $dialplan_detail_group;
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
|
|
@ -983,6 +989,20 @@
|
|||
//increment the dialplan detail order
|
||||
$dialplan_detail_order = $dialplan_detail_order + 10;
|
||||
|
||||
//add a variable
|
||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
|
||||
$dialplan["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid;
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "record_stereo_swap=true";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_inline"] = "true";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = $dialplan_detail_group;
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
$y++;
|
||||
|
||||
//increment the dialplan detail order
|
||||
$dialplan_detail_order = $dialplan_detail_order + 10;
|
||||
|
||||
//add a variable
|
||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
|
||||
$dialplan["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid;
|
||||
|
|
@ -1164,10 +1184,10 @@
|
|||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
if ($_SESSION['destinations']['dialplan_mode']['text'] == 'multiple') {
|
||||
if ($settings->get('destinations', 'dialplan_mode', '') == 'multiple') {
|
||||
$cache->delete("dialplan:".$destination_context);
|
||||
}
|
||||
if ($_SESSION['destinations']['dialplan_mode']['text'] == 'single') {
|
||||
if ($settings->get('destinations', 'dialplan_mode', '') == 'single') {
|
||||
if (isset($destination_prefix) && is_numeric($destination_prefix) && isset($destination_number) && is_numeric($destination_number)) {
|
||||
$cache->delete("dialplan:".$destination_context.":".$destination_prefix.$destination_number);
|
||||
$cache->delete("dialplan:".$destination_context.":+".$destination_prefix.$destination_number);
|
||||
|
|
@ -1944,7 +1964,6 @@
|
|||
echo " ".$text['label-destination_hold_music']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td width=\"70%\" class='vtable' align='left'>\n";
|
||||
require_once "app/music_on_hold/resources/classes/switch_music_on_hold.php";
|
||||
$music_on_hold = new switch_music_on_hold;
|
||||
echo $music_on_hold->select('destination_hold_music', $destination_hold_music, null);
|
||||
echo " <br />\n";
|
||||
|
|
@ -2077,11 +2096,11 @@
|
|||
|
||||
//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";
|
||||
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='destination_enabled' name='destination_enabled' value='true' ".($destination_enabled == 'true' ? "checked='checked'" : null).">\n";
|
||||
echo " <span class='slider'></span>\n";
|
||||
|
|
|
|||
|
|
@ -334,7 +334,7 @@
|
|||
$array["dialplans"][$row_id]["dialplan_xml"] .= "</extension>\n";
|
||||
|
||||
//dialplan details
|
||||
if ($_SESSION['destinations']['dialplan_details']['boolean'] == "true") {
|
||||
if (filter_var($_SESSION['destinations']['dialplan_details']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
|
||||
//check the destination number
|
||||
$array["dialplans"][$row_id]["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@
|
|||
$order = $_GET["order"] ?? '';
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
|
||||
|
||||
//prepare to page the results
|
||||
$sql = "select count(*) from v_destinations ";
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
|
@ -359,7 +365,7 @@
|
|||
}
|
||||
echo th_order_by('destination_enabled', $text['label-destination_enabled'], $order_by, $order, $param);
|
||||
echo th_order_by('destination_description', $text['label-destination_description'], $order_by, $order, $param, "class='hide-sm-dn'");
|
||||
if (permission_exists('destination_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('destination_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -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']." </td>\n";
|
||||
}
|
||||
if (permission_exists("destination_cid_name_prefix")) {
|
||||
echo " <td>".escape($row['destination_cid_name_prefix'])." </td>\n";
|
||||
}
|
||||
if (permission_exists("destination_context")) {
|
||||
echo " <td>".escape($row['destination_context'])." </td>\n";
|
||||
}
|
||||
|
|
@ -421,9 +434,9 @@
|
|||
}
|
||||
echo " <td>".escape($text['label-'.$row['destination_enabled']])." </td>\n";
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['destination_description'])." </td>\n";
|
||||
if (permission_exists('destination_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('destination_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'>";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$list_row_edit_button,'link'=>$list_row_url]);
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -450,3 +463,4 @@
|
|||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -26,11 +26,7 @@
|
|||
|
||||
/**
|
||||
* destinations
|
||||
*
|
||||
* @method get_array get the destinations
|
||||
* @method select build the html select
|
||||
*/
|
||||
if (!class_exists('destinations')) {
|
||||
class destinations {
|
||||
|
||||
/**
|
||||
|
|
@ -52,22 +48,33 @@ if (!class_exists('destinations')) {
|
|||
private $list_page;
|
||||
private $table;
|
||||
private $uuid_prefix;
|
||||
private $database;
|
||||
private $settings;
|
||||
|
||||
/**
|
||||
* Called when the object is created
|
||||
*/
|
||||
public function __construct($settings = null) {
|
||||
public function __construct($setting_array = []) {
|
||||
|
||||
//open a database connection
|
||||
if (empty($setting_array['database'])) {
|
||||
$this->database = database::new();
|
||||
} else {
|
||||
$this->database = $setting_array['database'];
|
||||
}
|
||||
|
||||
//get the settings object
|
||||
if (empty($setting_array['settings'])) {
|
||||
$this->settings = new settings();
|
||||
} else {
|
||||
$this->settings = $setting_array['settings'];
|
||||
}
|
||||
|
||||
//set the domain details
|
||||
if (is_null($this->domain_uuid)) {
|
||||
$this->domain_uuid = $_SESSION['domain_uuid'];
|
||||
}
|
||||
|
||||
//get the email queue settings
|
||||
if (!isset($settings)) {
|
||||
$this->settings = new settings();
|
||||
}
|
||||
|
||||
//assign private variables
|
||||
$this->app_name = 'destinations';
|
||||
$this->app_uuid = '5ec89622-b19c-3559-64f0-afde802ab139';
|
||||
|
|
@ -180,8 +187,7 @@ if (!class_exists('destinations')) {
|
|||
$sql = "select domain_name from v_domains ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$parameters['domain_uuid'] = $this->domain_uuid;
|
||||
$database = new database;
|
||||
$this->domain_name = $database->select($sql, $parameters, 'column');
|
||||
$this->domain_name = $this->database->select($sql, $parameters, 'column');
|
||||
|
||||
//initialize variable
|
||||
$response = '';
|
||||
|
|
@ -252,8 +258,7 @@ if (!class_exists('destinations')) {
|
|||
}
|
||||
$sql .= "order by ".trim($row['order_by']);
|
||||
$sql = str_replace("\${domain_uuid}", $this->domain_uuid, $sql);
|
||||
$database = new database;
|
||||
$result = $database->select($sql, null, 'all');
|
||||
$result = $this->database->select($sql, null, 'all');
|
||||
|
||||
$this->destinations[$x]['result']['sql'] = $sql;
|
||||
$this->destinations[$x]['result']['data'] = $result;
|
||||
|
|
@ -446,26 +451,24 @@ if (!class_exists('destinations')) {
|
|||
$destination_id = str_replace("[", "_", $destination_id);
|
||||
//$destination_id = preg_replace('/[^a-zA-Z_,.]/', '', $destination_name);
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
function get_destinations(id, destination_type, action, search) {
|
||||
//alert(action);
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
document.getElementById(id).innerHTML = this.responseText;
|
||||
}
|
||||
};
|
||||
if (action) {
|
||||
xhttp.open("GET", "/app/destinations/resources/destinations.php?destination_type="+destination_type+"&action="+action, true);
|
||||
}
|
||||
else {
|
||||
xhttp.open("GET", "/app/destinations/resources/destinations.php?destination_type="+destination_type, true);
|
||||
}
|
||||
xhttp.send();
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
//send request for destinations
|
||||
echo "<script type=\"text/javascript\">\n";
|
||||
echo " function get_destinations(id, destination_type, action, search) {\n";
|
||||
echo " var xhttp = new XMLHttpRequest();\n";
|
||||
echo " xhttp.onreadystatechange = function() {\n";
|
||||
echo " if (this.readyState == 4 && this.status == 200) {\n";
|
||||
echo " document.getElementById(id).innerHTML = this.responseText;\n";
|
||||
echo " }\n";
|
||||
echo " };\n";
|
||||
echo " if (action) {\n";
|
||||
echo " xhttp.open(\"GET\", \"/app/destinations/resources/destinations.php?destination_type=\"+destination_type+\"&action=\"+action, true);\n";
|
||||
echo " }\n";
|
||||
echo " else {\n";
|
||||
echo " xhttp.open(\"GET\", \"/app/destinations/resources/destinations.php?destination_type=\"+destination_type, true);\n";
|
||||
echo " }\n";
|
||||
echo " xhttp.send();\n";
|
||||
echo " }\n";
|
||||
echo "</script>\n";
|
||||
|
||||
//get the destinations
|
||||
$destinations = $this->get($destination_type);
|
||||
|
|
@ -550,9 +553,6 @@ if (!class_exists('destinations')) {
|
|||
//set the global variables
|
||||
global $db_type;
|
||||
|
||||
//connect to the database
|
||||
$database = new database;
|
||||
|
||||
//set default values
|
||||
$destination_name = '';
|
||||
$destination_id = '';
|
||||
|
|
@ -561,7 +561,7 @@ if (!class_exists('destinations')) {
|
|||
$sql = "select domain_name from v_domains ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$parameters['domain_uuid'] = $this->domain_uuid;
|
||||
$this->domain_name = $database->select($sql, $parameters, 'column');
|
||||
$this->domain_name = $this->database->select($sql, $parameters, 'column');
|
||||
|
||||
//get the destinations
|
||||
if (!is_array($this->destinations)) {
|
||||
|
|
@ -625,7 +625,7 @@ if (!class_exists('destinations')) {
|
|||
}
|
||||
$sql .= "order by ".trim($row['order_by']);
|
||||
$sql = str_replace("\${domain_uuid}", $this->domain_uuid, $sql);
|
||||
$result = $database->select($sql, null, 'all');
|
||||
$result = $this->database->select($sql, null, 'all');
|
||||
|
||||
$this->destinations[$x]['result']['sql'] = $sql;
|
||||
$this->destinations[$x]['result']['data'] = $result;
|
||||
|
|
@ -764,14 +764,11 @@ if (!class_exists('destinations')) {
|
|||
//set the global variables
|
||||
global $db_type;
|
||||
|
||||
//connect to the database
|
||||
$database = new database;
|
||||
|
||||
//get the domain_name
|
||||
$sql = "select domain_name from v_domains ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$parameters['domain_uuid'] = $this->domain_uuid;
|
||||
$this->domain_name = $database->select($sql, $parameters, 'column');
|
||||
$this->domain_name = $this->database->select($sql, $parameters, 'column');
|
||||
|
||||
//get the destinations
|
||||
if (!is_array($this->destinations)) {
|
||||
|
|
@ -836,7 +833,7 @@ if (!class_exists('destinations')) {
|
|||
}
|
||||
$sql .= "order by ".trim($row['order_by']);
|
||||
$sql = str_replace("\${domain_uuid}", $this->domain_uuid, $sql);
|
||||
$result = $database->select($sql, null, 'all');
|
||||
$result = $this->database->select($sql, null, 'all');
|
||||
|
||||
$this->destinations[$x]['result']['sql'] = $sql;
|
||||
$this->destinations[$x]['result']['data'] = $result;
|
||||
|
|
@ -1063,8 +1060,7 @@ if (!class_exists('destinations')) {
|
|||
$sql = "select dialplan_uuid, destination_context from v_destinations ";
|
||||
$sql .= "where destination_uuid = :destination_uuid ";
|
||||
$parameters['destination_uuid'] = $record['uuid'];
|
||||
$database = new database;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
$row = $this->database->select($sql, $parameters, 'row');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//include dialplan in array
|
||||
|
|
@ -1086,10 +1082,9 @@ if (!class_exists('destinations')) {
|
|||
$p->add('dialplan_detail_delete', 'temp');
|
||||
|
||||
//execute delete
|
||||
$database = new database;
|
||||
$database->app_name = $this->app_name;
|
||||
$database->app_uuid = $this->app_uuid;
|
||||
$database->delete($array);
|
||||
$this->database->app_name = $this->app_name;
|
||||
$this->database->app_uuid = $this->app_uuid;
|
||||
$this->database->delete($array);
|
||||
unset($array);
|
||||
|
||||
//revoke temporary permissions
|
||||
|
|
@ -1255,8 +1250,7 @@ if (!class_exists('destinations')) {
|
|||
if (!(!empty($_GET['show']) && $_GET['show'] === 'all' && permission_exists('destination_summary_all'))) {
|
||||
$parameters['domain_uuid'] = $this->domain_uuid;
|
||||
}
|
||||
$database = new database;
|
||||
$summary = $database->select($sql, $parameters, 'all');
|
||||
$summary = $this->database->select($sql, $parameters, 'all');
|
||||
unset($parameters);
|
||||
|
||||
//if (!empty($this->start_stamp_begin) && !empty($this->start_stamp_end)) {
|
||||
|
|
@ -1308,7 +1302,7 @@ if (!class_exists('destinations')) {
|
|||
} //method
|
||||
|
||||
} //class
|
||||
}
|
||||
|
||||
/*
|
||||
$obj = new destinations;
|
||||
//$destinations = $obj->destinations;
|
||||
|
|
@ -1319,5 +1313,3 @@ echo $obj->select('ivr', 'example4', '');
|
|||
echo $obj->select('ivr', 'example5', '');
|
||||
echo $obj->select('ivr', 'example6', '');
|
||||
*/
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -224,6 +224,9 @@
|
|||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "device_serial_number";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "device_model";
|
||||
//$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
|
|
@ -462,6 +465,11 @@
|
|||
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "device_serial_number";
|
||||
$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'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "device_model";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "phone_model";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
|
|
|
|||
|
|
@ -77,86 +77,90 @@ if ($domains_processed == 1) {
|
|||
unset($sql, $device_keys);
|
||||
|
||||
//set the device profile keys
|
||||
$sql = "select count(*) from v_device_profile_keys ";
|
||||
$num_rows = $database->select($sql, null, 'column');
|
||||
if ($num_rows == 0) {
|
||||
//get the device profile keys from device_keys table
|
||||
$sql = "select * from v_device_keys ";
|
||||
$sql .= "where device_profile_uuid is not null ";
|
||||
$device_profile_keys = $database->select($sql, null, 'all');
|
||||
if ($database->column_exists('v_device_keys', 'device_profile_uuid')) {
|
||||
$sql = "select count(*) from v_device_profile_keys ";
|
||||
$num_rows = $database->select($sql, null, 'column');
|
||||
if ($num_rows == 0) {
|
||||
//get the device profile keys from device_keys table
|
||||
$sql = "select * from v_device_keys ";
|
||||
$sql .= "where device_profile_uuid is not null ";
|
||||
$device_profile_keys = $database->select($sql, null, 'all');
|
||||
|
||||
//loop through the device_keys to build the data array
|
||||
if (!empty($device_profile_keys)) {
|
||||
foreach ($device_profile_keys as $index => $row) {
|
||||
$array['device_profile_keys'][$index]['device_profile_key_uuid'] = $row["device_key_uuid"];
|
||||
$array['device_profile_keys'][$index]['domain_uuid'] = $row["domain_uuid"];
|
||||
$array['device_profile_keys'][$index]['device_profile_uuid'] = $row["device_profile_uuid"];
|
||||
$array['device_profile_keys'][$index]['profile_key_id'] = $row["device_key_id"];
|
||||
$array['device_profile_keys'][$index]['profile_key_category'] = $row["device_key_category"];
|
||||
$array['device_profile_keys'][$index]['profile_key_vendor'] = $row["device_key_vendor"];
|
||||
$array['device_profile_keys'][$index]['profile_key_type'] = $row["device_key_type"];
|
||||
$array['device_profile_keys'][$index]['profile_key_line'] = $row["device_key_line"];
|
||||
$array['device_profile_keys'][$index]['profile_key_value'] = $row["device_key_value"];
|
||||
$array['device_profile_keys'][$index]['profile_key_extension'] = $row["device_key_extension"];
|
||||
$array['device_profile_keys'][$index]['profile_key_protected'] = $row["device_key_protected"];
|
||||
$array['device_profile_keys'][$index]['profile_key_label'] = $row["device_key_label"];
|
||||
$array['device_profile_keys'][$index]['profile_key_icon'] = $row["device_key_icon"];
|
||||
//loop through the device_keys to build the data array
|
||||
if (!empty($device_profile_keys)) {
|
||||
foreach ($device_profile_keys as $index => $row) {
|
||||
$array['device_profile_keys'][$index]['device_profile_key_uuid'] = $row["device_key_uuid"];
|
||||
$array['device_profile_keys'][$index]['domain_uuid'] = $row["domain_uuid"];
|
||||
$array['device_profile_keys'][$index]['device_profile_uuid'] = $row["device_profile_uuid"];
|
||||
$array['device_profile_keys'][$index]['profile_key_id'] = $row["device_key_id"];
|
||||
$array['device_profile_keys'][$index]['profile_key_category'] = $row["device_key_category"];
|
||||
$array['device_profile_keys'][$index]['profile_key_vendor'] = $row["device_key_vendor"];
|
||||
$array['device_profile_keys'][$index]['profile_key_type'] = $row["device_key_type"];
|
||||
$array['device_profile_keys'][$index]['profile_key_line'] = $row["device_key_line"];
|
||||
$array['device_profile_keys'][$index]['profile_key_value'] = $row["device_key_value"];
|
||||
$array['device_profile_keys'][$index]['profile_key_extension'] = $row["device_key_extension"];
|
||||
$array['device_profile_keys'][$index]['profile_key_protected'] = $row["device_key_protected"];
|
||||
$array['device_profile_keys'][$index]['profile_key_label'] = $row["device_key_label"];
|
||||
$array['device_profile_keys'][$index]['profile_key_icon'] = $row["device_key_icon"];
|
||||
}
|
||||
}
|
||||
|
||||
//save the array
|
||||
if (!empty($array)) {
|
||||
$p = permissions::new();
|
||||
$p->add('device_profile_key_add', 'temp');
|
||||
|
||||
$database->app_name = 'devices';
|
||||
$database->app_uuid = '4efa1a1a-32e7-bf83-534b-6c8299958a8e';
|
||||
$database->save($array);
|
||||
$response = $database->message;
|
||||
unset($array);
|
||||
|
||||
$p->delete('device_profile_key_add', 'temp');
|
||||
}
|
||||
}
|
||||
|
||||
//save the array
|
||||
if (!empty($array)) {
|
||||
$p = permissions::new();
|
||||
$p->add('device_profile_key_add', 'temp');
|
||||
|
||||
$database->app_name = 'devices';
|
||||
$database->app_uuid = '4efa1a1a-32e7-bf83-534b-6c8299958a8e';
|
||||
$database->save($array);
|
||||
$response = $database->message;
|
||||
unset($array);
|
||||
|
||||
$p->delete('device_profile_key_add', 'temp');
|
||||
}
|
||||
unset($sql, $device_profile_keys);
|
||||
}
|
||||
unset($sql, $device_profile_keys);
|
||||
|
||||
//set the device profile settings
|
||||
$sql = "select count(*) from v_device_profile_settings ";
|
||||
$num_rows = $database->select($sql, null, 'column');
|
||||
if ($num_rows == 0) {
|
||||
//get the device profile keys from device_keys table
|
||||
$sql = "select * from v_device_settings ";
|
||||
$sql .= "where device_profile_uuid is not null ";
|
||||
$device_profile_keys = $database->select($sql, null, 'all');
|
||||
if ($database->column_exists('v_device_settings', 'device_profile_uuid')) {
|
||||
$sql = "select count(*) from v_device_profile_settings ";
|
||||
$num_rows = $database->select($sql, null, 'column');
|
||||
if ($num_rows == 0) {
|
||||
//get the device profile keys from device_keys table
|
||||
$sql = "select * from v_device_settings ";
|
||||
$sql .= "where device_profile_uuid is not null ";
|
||||
$device_profile_keys = $database->select($sql, null, 'all');
|
||||
|
||||
//loop through the device_keys to build the data array
|
||||
if (!empty($device_profile_keys)) {
|
||||
foreach ($device_profile_keys as $index => $row) {
|
||||
$array['device_profile_settings'][$index]['device_profile_setting_uuid'] = $row["device_setting_uuid"];
|
||||
$array['device_profile_settings'][$index]['domain_uuid'] = $row["domain_uuid"];
|
||||
$array['device_profile_settings'][$index]['device_profile_uuid'] = $row["device_profile_uuid"];
|
||||
$array['device_profile_settings'][$index]['profile_setting_name'] = $row["device_setting_subcategory"];
|
||||
$array['device_profile_settings'][$index]['profile_setting_value'] = $row["device_setting_value"];
|
||||
$array['device_profile_settings'][$index]['profile_setting_enabled'] = $row["device_setting_enabled"];
|
||||
$array['device_profile_settings'][$index]['profile_setting_description'] = $row["device_setting_description"];
|
||||
//loop through the device_keys to build the data array
|
||||
if (!empty($device_profile_keys)) {
|
||||
foreach ($device_profile_keys as $index => $row) {
|
||||
$array['device_profile_settings'][$index]['device_profile_setting_uuid'] = $row["device_setting_uuid"];
|
||||
$array['device_profile_settings'][$index]['domain_uuid'] = $row["domain_uuid"];
|
||||
$array['device_profile_settings'][$index]['device_profile_uuid'] = $row["device_profile_uuid"];
|
||||
$array['device_profile_settings'][$index]['profile_setting_name'] = $row["device_setting_subcategory"];
|
||||
$array['device_profile_settings'][$index]['profile_setting_value'] = $row["device_setting_value"];
|
||||
$array['device_profile_settings'][$index]['profile_setting_enabled'] = $row["device_setting_enabled"];
|
||||
$array['device_profile_settings'][$index]['profile_setting_description'] = $row["device_setting_description"];
|
||||
}
|
||||
}
|
||||
|
||||
//save the array
|
||||
if (!empty($array)) {
|
||||
$p = permissions::new();
|
||||
$p->add('device_profile_setting_add', 'temp');
|
||||
|
||||
$database->app_name = 'devices';
|
||||
$database->app_uuid = '4efa1a1a-32e7-bf83-534b-6c8299958a8e';
|
||||
$database->save($array);
|
||||
$response = $database->message;
|
||||
unset($array);
|
||||
|
||||
$p->delete('device_profile_setting_add', 'temp');
|
||||
}
|
||||
}
|
||||
|
||||
//save the array
|
||||
if (!empty($array)) {
|
||||
$p = permissions::new();
|
||||
$p->add('device_profile_setting_add', 'temp');
|
||||
|
||||
$database->app_name = 'devices';
|
||||
$database->app_uuid = '4efa1a1a-32e7-bf83-534b-6c8299958a8e';
|
||||
$database->save($array);
|
||||
$response = $database->message;
|
||||
unset($array);
|
||||
|
||||
$p->delete('device_profile_setting_add', 'temp');
|
||||
}
|
||||
unset($sql, $device_profile_keys);
|
||||
}
|
||||
unset($sql, $device_profile_keys);
|
||||
|
||||
//add device vendor functions to the database
|
||||
$sql = "select count(*) from v_device_vendors; ";
|
||||
|
|
@ -247,6 +251,7 @@ if ($domains_processed == 1) {
|
|||
$sql = "update v_device_lines set label = display_name where label is null;\n";
|
||||
$database->execute($sql);
|
||||
unset($sql);
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -3198,6 +3198,32 @@ $text['label-device_location']['zh-cn'] = "地点";
|
|||
$text['label-device_location']['ja-jp'] = "位置";
|
||||
$text['label-device_location']['ko-kr'] = "위치";
|
||||
|
||||
$text['label-device_serial_number']['en-us'] = "Serial Number";
|
||||
$text['label-device_serial_number']['en-gb'] = "Serial Number";
|
||||
$text['label-device_serial_number']['ar-eg'] = "";
|
||||
$text['label-device_serial_number']['de-at'] = "";
|
||||
$text['label-device_serial_number']['de-ch'] = "";
|
||||
$text['label-device_serial_number']['de-de'] = "";
|
||||
$text['label-device_serial_number']['el-gr'] = "";
|
||||
$text['label-device_serial_number']['es-cl'] = "";
|
||||
$text['label-device_serial_number']['es-mx'] = "";
|
||||
$text['label-device_serial_number']['fr-ca'] = "";
|
||||
$text['label-device_serial_number']['fr-fr'] = "";
|
||||
$text['label-device_serial_number']['he-il'] = "";
|
||||
$text['label-device_serial_number']['it-it'] = "";
|
||||
$text['label-device_serial_number']['ka-ge'] = "";
|
||||
$text['label-device_serial_number']['nl-nl'] = "";
|
||||
$text['label-device_serial_number']['pl-pl'] = "";
|
||||
$text['label-device_serial_number']['pt-br'] = "";
|
||||
$text['label-device_serial_number']['pt-pt'] = "";
|
||||
$text['label-device_serial_number']['ro-ro'] = "";
|
||||
$text['label-device_serial_number']['ru-ru'] = "";
|
||||
$text['label-device_serial_number']['sv-se'] = "";
|
||||
$text['label-device_serial_number']['uk-ua'] = "";
|
||||
$text['label-device_serial_number']['zh-cn'] = "";
|
||||
$text['label-device_serial_number']['ja-jp'] = "";
|
||||
$text['label-device_serial_number']['ko-kr'] = "";
|
||||
|
||||
$text['label-device_key_vendor']['en-us'] = "Vendor";
|
||||
$text['label-device_key_vendor']['en-gb'] = "Vendor";
|
||||
$text['label-device_key_vendor']['ar-eg'] = "البائع";
|
||||
|
|
@ -6634,6 +6660,32 @@ $text['description-device_location']['zh-cn'] = "输入设备位置。";
|
|||
$text['description-device_location']['ja-jp'] = "デバイスの場所を入力します。";
|
||||
$text['description-device_location']['ko-kr'] = "장치 위치를 입력합니다.";
|
||||
|
||||
$text['description-device_serial_number']['en-us'] = "Enter the device serial number.";
|
||||
$text['description-device_serial_number']['en-gb'] = "Enter the device serial number.";
|
||||
$text['description-device_serial_number']['ar-eg'] = "";
|
||||
$text['description-device_serial_number']['de-at'] = "";
|
||||
$text['description-device_serial_number']['de-ch'] = "";
|
||||
$text['description-device_serial_number']['de-de'] = "";
|
||||
$text['description-device_serial_number']['el-gr'] = "";
|
||||
$text['description-device_serial_number']['es-cl'] = "";
|
||||
$text['description-device_serial_number']['es-mx'] = "";
|
||||
$text['description-device_serial_number']['fr-ca'] = "";
|
||||
$text['description-device_serial_number']['fr-fr'] = "";
|
||||
$text['description-device_serial_number']['he-il'] = "";
|
||||
$text['description-device_serial_number']['it-it'] = "";
|
||||
$text['description-device_serial_number']['ka-ge'] = "";
|
||||
$text['description-device_serial_number']['nl-nl'] = "";
|
||||
$text['description-device_serial_number']['pl-pl'] = "";
|
||||
$text['description-device_serial_number']['pt-br'] = "";
|
||||
$text['description-device_serial_number']['pt-pt'] = "";
|
||||
$text['description-device_serial_number']['ro-ro'] = "";
|
||||
$text['description-device_serial_number']['ru-ru'] = "";
|
||||
$text['description-device_serial_number']['sv-se'] = "";
|
||||
$text['description-device_serial_number']['uk-ua'] = "";
|
||||
$text['description-device_serial_number']['zh-cn'] = "";
|
||||
$text['description-device_serial_number']['ja-jp'] = "";
|
||||
$text['description-device_serial_number']['ko-kr'] = "";
|
||||
|
||||
$text['description-device_time_zone']['en-us'] = "Enter the time zone.";
|
||||
$text['description-device_time_zone']['en-gb'] = "Enter the time zone.";
|
||||
$text['description-device_time_zone']['ar-eg'] = "أدخل المنطقة الزمنية";
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
@ -252,6 +252,7 @@
|
|||
$x = 0;
|
||||
foreach ($available_columns as $table_name => $columns) {
|
||||
$table_name_label = ucwords(str_replace(['-','_',],' ', $table_name));
|
||||
echo "<div class='card'>\n";
|
||||
echo "<div class='category'>\n";
|
||||
echo "<b>".$table_name_label."</b>\n";
|
||||
echo "<br>\n";
|
||||
|
|
@ -284,6 +285,7 @@
|
|||
echo "</table>\n";
|
||||
echo "<br>\n";
|
||||
echo "</div>\n";
|
||||
echo "</div>\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
*/
|
||||
|
|
@ -119,12 +119,12 @@
|
|||
//$device_provisioned_ip = $_POST["device_provisioned_ip"];
|
||||
$domain_uuid = $_POST["domain_uuid"];
|
||||
$device_label = $_POST["device_label"];
|
||||
$device_label = $_POST["device_label"];
|
||||
$device_user_uuid = $_POST["device_user_uuid"];
|
||||
$device_username = $_POST["device_username"];
|
||||
$device_password = $_POST["device_password"];
|
||||
$device_vendor = $_POST["device_vendor"];
|
||||
$device_location = $_POST["device_location"];
|
||||
$device_serial_number = $_POST["device_serial_number"];
|
||||
$device_uuid_alternate = $_POST["device_uuid_alternate"] ?? null;
|
||||
$device_model = $_POST["device_model"] ?? null;
|
||||
$device_firmware_version = $_POST["device_firmware_version"] ?? null;
|
||||
|
|
@ -270,6 +270,9 @@
|
|||
if (permission_exists('device_location')) {
|
||||
$array['devices'][0]['device_location'] = $device_location;
|
||||
}
|
||||
if (permission_exists('device_serial_number')) {
|
||||
$array['devices'][0]['device_serial_number'] = $device_serial_number;
|
||||
}
|
||||
if (permission_exists('device_alternate')) {
|
||||
$array['devices'][0]['device_uuid_alternate'] = is_uuid($device_uuid_alternate) ? $device_uuid_alternate : null;
|
||||
}
|
||||
|
|
@ -517,12 +520,12 @@
|
|||
$device_provisioned_ip = $row["device_provisioned_ip"];
|
||||
$domain_uuid = $row["domain_uuid"];
|
||||
$device_label = $row["device_label"];
|
||||
$device_label = $row["device_label"];
|
||||
$device_user_uuid = $row["device_user_uuid"];
|
||||
$device_username = $row["device_username"];
|
||||
$device_password = $row["device_password"];
|
||||
$device_vendor = $row["device_vendor"];
|
||||
$device_location = $row["device_location"];
|
||||
$device_serial_number = $row["device_serial_number"];
|
||||
$device_uuid_alternate = $row["device_uuid_alternate"];
|
||||
$device_model = $row["device_model"];
|
||||
$device_firmware_version = $row["device_firmware_version"];
|
||||
|
|
@ -1098,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";
|
||||
|
|
@ -1917,6 +1920,19 @@
|
|||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
if (permission_exists('device_serial_number')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-device_serial_number']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='device_serial_number' maxlength='255' value=\"".escape($device_serial_number ?? '')."\"/>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-device_serial_number']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
if (permission_exists('device_model')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
|
|
@ -1976,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";
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@
|
|||
echo th_order_by('device_profile_name', $text['label-device_profile_name'], $order_by, $order);
|
||||
echo th_order_by('device_profile_enabled', $text['label-device_profile_enabled'], $order_by, $order, null, "class='center'");
|
||||
echo th_order_by('device_profile_description', $text['label-device_profile_description'], $order_by, $order, null, "class='hide-xs'");
|
||||
if (permission_exists('device_profile_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('device_profile_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -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')) {
|
||||
|
|
@ -274,7 +278,7 @@
|
|||
}
|
||||
echo " </td>\n";
|
||||
echo " <td class='description overflow hide-xs'>".escape($row['device_profile_description'])." </td>\n";
|
||||
if (permission_exists('device_profile_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('device_profile_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
echo " <td class='action-button'>";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
@ -298,3 +302,4 @@
|
|||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@
|
|||
echo "<th class='hide-sm-dn'>".$text['label-groups']."</th>\n";
|
||||
echo th_order_by('enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
|
||||
echo th_order_by('description', $text['label-description'], $order_by, $order, null, "class='hide-sm-dn'");
|
||||
if (permission_exists('device_vendor_function_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('device_vendor_function_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -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')) {
|
||||
|
|
@ -252,7 +256,7 @@
|
|||
}
|
||||
echo " </td>\n";
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['description'])."</td>\n";
|
||||
if (permission_exists('device_vendor_function_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('device_vendor_function_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
echo " <td class='action-button'>\n";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
@ -289,3 +293,4 @@
|
|||
echo "</script>\n";
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@
|
|||
echo th_order_by('name', $text['label-name'], $order_by, $order);
|
||||
echo th_order_by('enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
|
||||
echo th_order_by('description', $text['label-description'], $order_by, $order, null, "class='hide-xs'");
|
||||
if (permission_exists('device_vendor_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('device_vendor_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -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')) {
|
||||
|
|
@ -198,7 +202,7 @@
|
|||
echo $text['label-'.$row['enabled']];
|
||||
}
|
||||
echo " <td class='description overflow hide-xs'>".escape($row['description'])." </td>\n";
|
||||
if (permission_exists('device_vendor_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('device_vendor_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
echo " <td class='action-button'>";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
@ -222,3 +226,4 @@
|
|||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -101,17 +101,6 @@
|
|||
$total_devices = $database->select($sql, $parameters, 'column');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//get the domains if user has permission for show all
|
||||
$domains = [];
|
||||
if ($has_device_domain_all) {
|
||||
$rows = $database->select("select domain_uuid, domain_name from v_domains where domain_enabled = 'true'");
|
||||
if (!empty($rows)) {
|
||||
foreach ($rows as $row) {
|
||||
$domains[$row['domain_uuid']] = $row['domain_name'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//get the devices profiles
|
||||
$sql = "select * from v_device_profiles ";
|
||||
$sql .= "where true ";
|
||||
|
|
@ -196,7 +185,11 @@
|
|||
$offset = $rows_per_page * $page;
|
||||
|
||||
//get the list
|
||||
$sql = "select d.*, d2.device_label as alternate_label, ";
|
||||
$sql = "select ";
|
||||
if (isset($_GET['show']) && $_GET['show'] == "all" && permission_exists('device_all')) {
|
||||
$sql .= "d3.domain_name, ";
|
||||
}
|
||||
$sql .="d.*, d2.device_label as alternate_label, ";
|
||||
$sql .= "to_char(timezone(:time_zone, d.device_provisioned_date), 'DD Mon YYYY') as provisioned_date_formatted, \n";
|
||||
$sql .= "to_char(timezone(:time_zone, d.device_provisioned_date), 'HH12:MI:SS am') as provisioned_time_formatted \n";
|
||||
$sql .= "from v_devices as d, v_devices as d2 ";
|
||||
|
|
@ -404,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 = '';
|
||||
|
|
@ -426,7 +423,7 @@
|
|||
echo " </td>\n";
|
||||
}
|
||||
if (!empty($_GET['show']) && $_GET['show'] == "all" && permission_exists('device_all')) {
|
||||
echo " <td>".escape($domains[$row['domain_uuid']])."</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']));
|
||||
|
|
@ -480,3 +477,4 @@
|
|||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -1382,7 +1382,7 @@
|
|||
|
||||
//save the array
|
||||
$this->database->app_name = $this->app_name;
|
||||
$this->databasee->app_uuid = $this->app_uuid;
|
||||
$this->database->app_uuid = $this->app_uuid;
|
||||
$this->database->save($array);
|
||||
unset($array);
|
||||
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
@ -318,7 +318,7 @@
|
|||
$tmp_prefix == $dialplan_expression
|
||||
? $outbound_prefix = ""
|
||||
: $outbound_prefix = $tmp_prefix;
|
||||
|
||||
|
||||
if ($gateway_type == "gateway") {
|
||||
$dialplan_name = $gateway_name.".".$abbrv;
|
||||
if ($abbrv == "988") {
|
||||
|
|
@ -863,7 +863,7 @@
|
|||
}
|
||||
else {
|
||||
$sql .= "and domain_uuid = :domain_uuid ";
|
||||
|
||||
|
||||
}
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
$database = new database;
|
||||
|
|
@ -939,6 +939,7 @@ function type_onchange(dialplan_detail_type) {
|
|||
echo $text['description-outbound-routes']."\n";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
echo "<div class='card'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td width='30%' class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||
|
|
@ -1346,17 +1347,18 @@ function type_onchange(dialplan_detail_type) {
|
|||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "</table>";
|
||||
echo "<br><br>";
|
||||
echo "</table>\n";
|
||||
echo "</div>\n";
|
||||
echo "<br><br>\n";
|
||||
|
||||
if (!empty($action) && $action == "update") {
|
||||
echo "<input type='hidden' name='dialplan_uuid' value='".escape($dialplan_uuid)."'>\n";
|
||||
}
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
|
||||
echo "</form>";
|
||||
echo "</form>\n";
|
||||
|
||||
//show the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -181,9 +181,9 @@
|
|||
// load editor preferences/defaults
|
||||
$setting_size = !empty($_SESSION["editor"]["font_size"]["text"]) ? $_SESSION["editor"]["font_size"]["text"] : '12px';
|
||||
$setting_theme = !empty($_SESSION["editor"]["theme"]["text"]) ? $_SESSION["editor"]["theme"]["text"] : 'cobalt';
|
||||
$setting_invisibles = isset($_SESSION["editor"]["invisibles"]["boolean"]) && $_SESSION["editor"]["invisibles"]["boolean"] != '' ? $_SESSION["editor"]["invisibles"]["boolean"] : 'false';
|
||||
$setting_indenting = isset($_SESSION["editor"]["indent_guides"]["boolean"]) && $_SESSION["editor"]["indent_guides"]["boolean"] != '' ? $_SESSION["editor"]["indent_guides"]["boolean"] : 'false';
|
||||
$setting_numbering = isset($_SESSION["editor"]["line_numbers"]["boolean"]) && $_SESSION["editor"]["line_numbers"]["boolean"] != '' ? $_SESSION["editor"]["line_numbers"]["boolean"] : 'true';
|
||||
$setting_invisibles = isset($_SESSION['editor']['invisibles']['text']) ? $_SESSION['editor']['invisibles']["text"] : 'false';
|
||||
$setting_indenting = isset($_SESSION['editor']['indent_guides']['text']) ? $_SESSION['editor']['indent_guides']["text"]: 'false';
|
||||
$setting_numbering = isset($_SESSION['editor']['line_numbers']['text']) ? $_SESSION['editor']['line_numbers']["text"] : 'true';
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
|
|
|
|||
|
|
@ -134,15 +134,15 @@
|
|||
$show = !empty($_GET["show"]) ? $_GET["show"] : '';
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
$button_icon_add = !empty($_SESSION['theme']['button_icon_add']) ? $_SESSION['theme']['button_icon_add'] : '';
|
||||
$button_icon_copy = !empty($_SESSION['theme']['button_icon_copy']) ? $_SESSION['theme']['button_icon_copy'] : '';
|
||||
$button_icon_toggle = !empty($_SESSION['theme']['button_icon_toggle']) ? $_SESSION['theme']['button_icon_toggle'] : '';
|
||||
$button_icon_all = !empty($_SESSION['theme']['button_icon_all']) ? $_SESSION['theme']['button_icon_all'] : '';
|
||||
$button_icon_delete = !empty($_SESSION['theme']['button_icon_delete']) ? $_SESSION['theme']['button_icon_delete'] : '';
|
||||
$button_icon_search = !empty($_SESSION['theme']['button_icon_search']) ? $_SESSION['theme']['button_icon_search'] : '';
|
||||
$button_icon_edit = !empty($_SESSION['theme']['button_icon_edit']) ? $_SESSION['theme']['button_icon_edit'] : '';
|
||||
$button_icon_reset = !empty($_SESSION['theme']['button_icon_reset']) ? $_SESSION['theme']['button_icon_reset'] : '';
|
||||
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
|
||||
$button_icon_add = $_SESSION['theme']['button_icon_add'] ?? '';
|
||||
$button_icon_copy = $_SESSION['theme']['button_icon_copy'] ?? '';
|
||||
$button_icon_toggle = $_SESSION['theme']['button_icon_toggle'] ?? '';
|
||||
$button_icon_all = $_SESSION['theme']['button_icon_all'] ?? '';
|
||||
$button_icon_delete = $_SESSION['theme']['button_icon_delete'] ?? '';
|
||||
$button_icon_search = $_SESSION['theme']['button_icon_search'] ?? '';
|
||||
$button_icon_edit = $_SESSION['theme']['button_icon_edit'] ?? '';
|
||||
$button_icon_reset = $_SESSION['theme']['button_icon_reset'] ?? '';
|
||||
|
||||
//get the number of rows in the dialplan
|
||||
$sql = "select count(*) from v_dialplans ";
|
||||
|
|
@ -541,7 +541,7 @@
|
|||
($app_uuid == "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3" && permission_exists('outbound_route_edit')) ||
|
||||
($app_uuid == "16589224-c876-aeb3-f59f-523a1c0801f7" && permission_exists('fifo_edit')) ||
|
||||
($app_uuid == "4b821450-926b-175a-af93-a03c441818b1" && permission_exists('time_condition_edit')) ||
|
||||
permission_exists('dialplan_edit')) && $list_row_edit_button == 'true'
|
||||
permission_exists('dialplan_edit')) && $list_row_edit_button
|
||||
) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
|
|
@ -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);
|
||||
|
|
@ -618,7 +625,7 @@
|
|||
}
|
||||
echo " </td>\n";
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['dialplan_description'])." </td>\n";
|
||||
if ($list_row_edit_button == 'true' && (
|
||||
if ($list_row_edit_button && (
|
||||
(!is_uuid($app_uuid) && permission_exists('dialplan_edit')) ||
|
||||
($row['app_uuid'] == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4" && permission_exists('inbound_route_edit')) ||
|
||||
($row['app_uuid'] == "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3" && permission_exists('outbound_route_edit')) ||
|
||||
|
|
@ -648,3 +655,4 @@
|
|||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
*/
|
||||
|
||||
//define the dialplan class
|
||||
if (!class_exists('dialplan')) {
|
||||
class dialplan {
|
||||
|
||||
//variables
|
||||
|
|
@ -1580,6 +1579,3 @@
|
|||
|
||||
|
||||
} //class
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -40,6 +40,18 @@
|
|||
<condition field="${from_user_record}" expression="^local$" break="never">
|
||||
<action application="set" data="record_session=true" inline="true"/>
|
||||
</condition>
|
||||
<condition field="${record_session}" expression="^true$"/>
|
||||
<condition field="${call_direction}" expression="^inbound" break="never">
|
||||
<action application="set" data="record_stereo_swap=true" inline="true"/>
|
||||
</condition>
|
||||
<condition field="${record_session}" expression="^true$"/>
|
||||
<condition field="${call_direction}" expression="^outbound$" break="never">
|
||||
<action application="set" data="record_stereo=true" inline="true"/>
|
||||
</condition>
|
||||
<condition field="${record_session}" expression="^true$"/>
|
||||
<condition field="${call_direction}" expression="^local$" break="never">
|
||||
<action application="set" data="record_stereo=true" inline="true"/>
|
||||
</condition>
|
||||
<condition field="${record_session}" expression="^true$">
|
||||
<action application="set" data="record_path=${recordings_dir}/${domain_name}/archive/${strftime(%Y)}/${strftime(%b)}/${strftime(%d)}" inline="true" enabled="true"/>
|
||||
<action application="set" data="record_name=${uuid}.${record_ext}" inline="true" enabled="true"/>
|
||||
|
|
@ -50,9 +62,8 @@
|
|||
<action application="bind_digit_action" data="local,*6,api:uuid_record,${uuid} unmask ${recordings_dir}/${domain_name}/archive/${strftime(%Y)}/${strftime(%b)}/${strftime(%d)}/${uuid}.${record_ext},both,self" enabled="true"/>
|
||||
<action application="set" data="record_append=true" inline="true" enabled="true"/>
|
||||
<action application="set" data="record_in_progress=true" inline="true" enabled="true"/>
|
||||
<action application="set" data="api_on_answer=uuid_record ${uuid} start ${record_path}/${record_name}" inline="false" enabled="false"/>
|
||||
<action application="set" data="RECORD_ANSWER_REQ=true" enabled="true"/>
|
||||
<action application="record_session" data="${record_path}/${record_name}" enabled="true"/>
|
||||
<action application="set" data="api_on_answer=uuid_record ${uuid} start ${record_path}/${record_name}" inline="false" enabled="true"/>
|
||||
<action application="set" data="record_answer_req=true" enabled="true"/>
|
||||
<action application="record_session" data="${record_path}/${record_name}" enabled="false"/>
|
||||
</condition>
|
||||
</extension>
|
||||
|
||||
|
|
|
|||
|
|
@ -329,7 +329,7 @@
|
|||
echo th_order_by('email_retry_count', $text['label-email_retry_count'], $order_by, $order);
|
||||
//echo th_order_by('email_action_before', $text['label-email_action_before'], $order_by, $order);
|
||||
echo "<th class='hide-md-dn'>".$text['label-email_action_after']."</th>\n";
|
||||
if (permission_exists('email_queue_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('email_queue_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -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')) {
|
||||
|
|
@ -369,7 +373,7 @@
|
|||
echo " <td>".escape($row['email_retry_count'])."</td>\n";
|
||||
//echo " <td>".escape($row['email_action_before'])."</td>\n";
|
||||
echo " <td class='hide-md-dn'>".escape($row['email_action_after'])."</td>\n";
|
||||
if (permission_exists('email_queue_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('email_queue_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
echo " <td class='action-button'>\n";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
|
|||
|
|
@ -236,9 +236,9 @@
|
|||
//load editor preferences/defaults
|
||||
$setting_size = !empty($_SESSION["editor"]["font_size"]["text"]) ? $_SESSION["editor"]["font_size"]["text"] : '12px';
|
||||
$setting_theme = !empty($_SESSION["editor"]["theme"]["text"]) ? $_SESSION["editor"]["theme"]["text"] : 'cobalt';
|
||||
$setting_invisibles = !empty($_SESSION["editor"]["invisibles"]["boolean"]) ? $_SESSION["editor"]["invisibles"]["boolean"] : 'false';
|
||||
$setting_indenting = !empty($_SESSION["editor"]["indent_guides"]["boolean"]) ? $_SESSION["editor"]["indent_guides"]["boolean"] : 'false';
|
||||
$setting_numbering = !empty($_SESSION["editor"]["line_numbers"]["boolean"]) ? $_SESSION["editor"]["line_numbers"]["boolean"] : 'true';
|
||||
$setting_invisibles = isset($_SESSION['editor']['invisibles']['text']) ? $_SESSION['editor']['invisibles']["text"] : 'false';
|
||||
$setting_indenting = isset($_SESSION['editor']['indent_guides']['text']) ? $_SESSION['editor']['indent_guides']["text"]: 'false';
|
||||
$setting_numbering = isset($_SESSION['editor']['line_numbers']['text']) ? $_SESSION['editor']['line_numbers']["text"] : 'true';
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
|
|
@ -518,7 +518,7 @@
|
|||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if ($_SESSION['email_queue']['save_response']['boolean'] == 'true') {
|
||||
if (filter_var($_SESSION['email_queue']['save_response']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-email_response']."\n";
|
||||
|
|
|
|||
|
|
@ -2,12 +2,7 @@
|
|||
|
||||
/**
|
||||
* email_queue class
|
||||
*
|
||||
* @method null delete
|
||||
* @method null toggle
|
||||
* @method null copy
|
||||
*/
|
||||
if (!class_exists('email_queue')) {
|
||||
class email_queue {
|
||||
|
||||
/**
|
||||
|
|
@ -225,6 +220,3 @@ if (!class_exists('email_queue')) {
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
//includes files
|
||||
require_once "resources/pdo.php";
|
||||
include "resources/classes/permissions.php";
|
||||
require $_SERVER['DOCUMENT_ROOT']."/app/email_queue/resources/functions/transcribe.php";
|
||||
|
||||
//increase limits
|
||||
|
|
|
|||
|
|
@ -10,13 +10,17 @@
|
|||
}
|
||||
|
||||
//include files
|
||||
include "resources/classes/permissions.php";
|
||||
include_once "resources/phpmailer/class.phpmailer.php";
|
||||
include_once "resources/phpmailer/class.smtp.php";
|
||||
|
||||
//increase limits
|
||||
set_time_limit(0);
|
||||
//ini_set('max_execution_time',1800); //30 minutes
|
||||
ini_set('memory_limit', '512M');
|
||||
|
||||
//connect to the database
|
||||
$database = database::new();
|
||||
|
||||
//save the arguments to variables
|
||||
$script_name = $argv[0];
|
||||
if (!empty($argv[1])) {
|
||||
|
|
@ -76,7 +80,7 @@
|
|||
|
||||
//prevent the process running more than once
|
||||
if ($pid_exists) {
|
||||
//echo "Cannot lock pid file {$pid_file}\n";
|
||||
echo "Cannot lock pid file {$pid_file}\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
@ -125,15 +129,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
//includes
|
||||
include_once "resources/phpmailer/class.phpmailer.php";
|
||||
include_once "resources/phpmailer/class.smtp.php";
|
||||
|
||||
//get the email details to send
|
||||
$sql = "select * from v_email_queue ";
|
||||
$sql .= "where email_queue_uuid = :email_queue_uuid ";
|
||||
$parameters['email_queue_uuid'] = $email_queue_uuid;
|
||||
$database = new database();
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (is_array($row)) {
|
||||
$domain_uuid = $row["domain_uuid"];
|
||||
|
|
@ -298,7 +297,7 @@
|
|||
//echo "Body: ".$email_body."\n";
|
||||
|
||||
//update the message transcription
|
||||
if (isset($voicemail_transcription_enabled) && $voicemail_transcription_enabled == 'true' && isset($transcribe_message)) {
|
||||
if (isset($voicemail_transcription_enabled) && $voicemail_transcription_enabled && isset($transcribe_message)) {
|
||||
$sql = "update v_voicemail_messages ";
|
||||
$sql .= "set message_transcription = :message_transcription ";
|
||||
$sql .= "where voicemail_message_uuid = :voicemail_message_uuid; ";
|
||||
|
|
|
|||
|
|
@ -9,9 +9,6 @@
|
|||
exit;
|
||||
}
|
||||
|
||||
//include files
|
||||
include "resources/classes/permissions.php";
|
||||
|
||||
//increase limits
|
||||
set_time_limit(0);
|
||||
ini_set('max_execution_time', 0);
|
||||
|
|
|
|||
|
|
@ -162,4 +162,58 @@ $text['label-emergency_event']['zh-cn'] = "事件";
|
|||
$text['label-emergency_event']['ja-jp'] = "イベント";
|
||||
$text['label-emergency_event']['ko-kr'] = "이벤트";
|
||||
|
||||
$text['label-emergency_call_status']['en-us'] = "Call Status";
|
||||
$text['label-emergency_call_status']['en-gb'] = "Call Status";
|
||||
$text['label-emergency_call_status']['ar-eg'] = "";
|
||||
$text['label-emergency_call_status']['de-at'] = "";
|
||||
$text['label-emergency_call_status']['de-ch'] = "";
|
||||
$text['label-emergency_call_status']['de-de'] = "";
|
||||
$text['label-emergency_call_status']['el-gr'] = "";
|
||||
$text['label-emergency_call_status']['es-cl'] = "";
|
||||
$text['label-emergency_call_status']['es-mx'] = "";
|
||||
$text['label-emergency_call_status']['fr-ca'] = "";
|
||||
$text['label-emergency_call_status']['fr-fr'] = "";
|
||||
$text['label-emergency_call_status']['he-il'] = "";
|
||||
$text['label-emergency_call_status']['it-it'] = "";
|
||||
$text['label-emergency_call_status']['ka-ge'] = "";
|
||||
$text['label-emergency_call_status']['nl-nl'] = "";
|
||||
$text['label-emergency_call_status']['pl-pl'] = "";
|
||||
$text['label-emergency_call_status']['pt-br'] = "";
|
||||
$text['label-emergency_call_status']['pt-pt'] = "";
|
||||
$text['label-emergency_call_status']['ro-ro'] = "";
|
||||
$text['label-emergency_call_status']['ru-ru'] = "";
|
||||
$text['label-emergency_call_status']['sv-se'] = "";
|
||||
$text['label-emergency_call_status']['uk-ua'] = "";
|
||||
$text['label-emergency_call_status']['tr-tr'] = "";
|
||||
$text['label-emergency_call_status']['zh-cn'] = "";
|
||||
$text['label-emergency_call_status']['ja-jp'] = "";
|
||||
$text['label-emergency_call_status']['ko-kr'] = "";
|
||||
|
||||
$text['label-recording']['en-us'] = "Recording";
|
||||
$text['label-recording']['en-gb'] = "Recording";
|
||||
$text['label-recording']['ar-eg'] = "تسجيل";
|
||||
$text['label-recording']['de-at'] = "Aufnahme";
|
||||
$text['label-recording']['de-ch'] = "Aufnahme";
|
||||
$text['label-recording']['de-de'] = "Aufnahme";
|
||||
$text['label-recording']['el-gr'] = "Εγγραφή";
|
||||
$text['label-recording']['es-cl'] = "Grabación";
|
||||
$text['label-recording']['es-mx'] = "Grabación";
|
||||
$text['label-recording']['fr-ca'] = "Enregistrement";
|
||||
$text['label-recording']['fr-fr'] = "Enregistrement";
|
||||
$text['label-recording']['he-il'] = "הקלטה";
|
||||
$text['label-recording']['it-it'] = "Registrazione";
|
||||
$text['label-recording']['ka-ge'] = "ჩანაწერი";
|
||||
$text['label-recording']['nl-nl'] = "Opname";
|
||||
$text['label-recording']['pl-pl'] = "Nagranie";
|
||||
$text['label-recording']['pt-br'] = "Gravação";
|
||||
$text['label-recording']['pt-pt'] = "Gravação";
|
||||
$text['label-recording']['ro-ro'] = "Înregistrare";
|
||||
$text['label-recording']['ru-ru'] = "Запись";
|
||||
$text['label-recording']['sv-se'] = "Inspelning";
|
||||
$text['label-recording']['uk-ua'] = "Запис";
|
||||
$text['label-recording']['tr-tr'] = "Kayıt";
|
||||
$text['label-recording']['zh-cn'] = "记录";
|
||||
$text['label-recording']['ja-jp'] = "録音";
|
||||
$text['label-recording']['ko-kr'] = "녹음";
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
/*
|
||||
FusionPBX
|
||||
Version: MPL 1.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is FusionPBX
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2016-2020
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permisions
|
||||
if (permission_exists('call_recording_play') || permission_exists('call_recording_download')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//download
|
||||
if (is_uuid($_GET['id'])) {
|
||||
$obj = new call_recordings;
|
||||
$obj->recording_uuid = $_GET['id'];
|
||||
$obj->binary = isset($_GET['binary']) ? true : false;
|
||||
$obj->download();
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -30,6 +30,14 @@ $database = new database;
|
|||
$database->app_name = 'emergency_logs';
|
||||
$database->app_uuid = 'de63b1ae-7750-11ee-b3a5-005056a27559';
|
||||
|
||||
//set permissions for CDR details and call recordings
|
||||
$permission = array();
|
||||
$permission['xml_cdr_hangup_cause'] = permission_exists('xml_cdr_hangup_cause');
|
||||
$permission['xml_cdr_status'] = permission_exists('xml_cdr_status');
|
||||
$permission['xml_cdr_recording'] = permission_exists('xml_cdr_recording');
|
||||
$permission['xml_cdr_recording_play'] = permission_exists('xml_cdr_recording_play');
|
||||
$permission['xml_cdr_recording_download'] = permission_exists('xml_cdr_recording_download');
|
||||
|
||||
//process the http post data by action
|
||||
if (!empty($action) && !empty($emergency_logs) && is_array($emergency_logs) && @sizeof($emergency_logs) != 0) {
|
||||
|
||||
|
|
@ -115,31 +123,38 @@ else {
|
|||
}
|
||||
|
||||
//get the list
|
||||
$sql = "select emergency_log_uuid, ";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "extension, ";
|
||||
$sql .= "event, ";
|
||||
$sql .= "to_char(timezone(:time_zone, insert_date), 'DD Mon YYYY') as date_formatted, ";
|
||||
$sql .= "to_char(timezone(:time_zone, insert_date), 'HH12:MI:SS am') as time_formatted, ";
|
||||
$sql .= "insert_date ";
|
||||
$sql .= "from v_emergency_logs ";
|
||||
$sql = "select e.emergency_log_uuid, ";
|
||||
$sql .= "e.domain_uuid, ";
|
||||
$sql .= "e.extension, ";
|
||||
$sql .= "e.event, ";
|
||||
$sql .= "to_char(timezone(:time_zone, e.insert_date), 'DD Mon YYYY') as date_formatted, ";
|
||||
$sql .= "to_char(timezone(:time_zone, e.insert_date), 'HH12:MI:SS am') as time_formatted, ";
|
||||
$sql .= "e.insert_date, ";
|
||||
$sql .= "c.status as status, ";
|
||||
$sql .= "concat(c.record_path, '/', c.record_name) as recording, "; //temp
|
||||
$sql .= "c.record_path as call_recording_path, ";
|
||||
$sql .= "c.record_name as call_recording_name ";
|
||||
$sql .= "from v_emergency_logs e ";
|
||||
$sql .= "left join v_xml_cdr c ";
|
||||
$sql .= "on e.emergency_log_uuid = c.xml_cdr_uuid ";
|
||||
if ($show == 'all') {
|
||||
$sql .= "where true ";
|
||||
}
|
||||
else {
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "where e.domain_uuid = :domain_uuid ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
if (!empty($search)) {
|
||||
$sql .= "and ( ";
|
||||
$sql .= " lower(event) like :search ";
|
||||
$sql .= " lower(e.event) like :search ";
|
||||
$sql .= ") ";
|
||||
$parameters['search'] = '%'.$search.'%';
|
||||
}
|
||||
$sql .= "order by insert_date desc ";
|
||||
$sql .= "order by e.insert_date desc ";
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$parameters['time_zone'] = $time_zone;
|
||||
$emergency_logs = $database->select($sql, $parameters ?? null, 'all');
|
||||
|
||||
unset($sql, $parameters);
|
||||
|
||||
//create token
|
||||
|
|
@ -189,10 +204,16 @@ 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";
|
||||
if ($permission['xml_cdr_recording'] && ($permission['xml_cdr_recording_play'] || $permission['xml_cdr_recording_download'])) {
|
||||
echo "<th class='center'>".$text['label-recording']."</th>\n";
|
||||
}
|
||||
if ($permission['xml_cdr_status'] || $permission['xml_cdr_hangup_cause']) {
|
||||
echo "<th class='left'>".$text['label-emergency_call_status']."</th>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
if (!empty($emergency_logs) && is_array($emergency_logs) && @sizeof($emergency_logs) != 0) {
|
||||
|
|
@ -202,10 +223,47 @@ 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";
|
||||
if (permission_exists('call_recording_play') || permission_exists('call_recording_download')) {
|
||||
echo " <td class='middle button center no-link no-wrap'>";
|
||||
if ($row['recording'] !== '/') {
|
||||
if (permission_exists('call_recording_play')) {
|
||||
$recording_file_ext = pathinfo($row['call_recording_name'], PATHINFO_EXTENSION);
|
||||
switch ($recording_file_ext) {
|
||||
case "wav" : $recording_type = "audio/wav"; break;
|
||||
case "mp3" : $recording_type = "audio/mpeg"; break;
|
||||
case "ogg" : $recording_type = "audio/ogg"; break;
|
||||
}
|
||||
echo "<audio id='recording_audio_".escape($row['emergency_log_uuid'])."' style='display: none;' preload='none' ontimeupdate=\"update_progress('".escape($row['emergency_log_uuid'])."')\" onended=\"recording_reset('".escape($row['emergency_log_uuid'])."');\" src='download.php?id=".urlencode($row['emergency_log_uuid'])."' type='".$recording_type."'></audio>";
|
||||
echo button::create(['type'=>'button','title'=>$text['label-play'].' / '.$text['label-pause'],'icon'=>$_SESSION['theme']['button_icon_play'],'id'=>'recording_button_'.escape($row['emergency_log_uuid']),'onclick'=>"recording_play('".escape($row['emergency_log_uuid'])."')"]);
|
||||
}
|
||||
if (permission_exists('call_recording_download')) {
|
||||
echo button::create(['type'=>'button','title'=>$text['label-download'],'icon'=>$_SESSION['theme']['button_icon_download'],'link'=>'download.php?id='.urlencode($row['emergency_log_uuid']).'&binary']);
|
||||
}
|
||||
}
|
||||
echo " </td>\n";
|
||||
}
|
||||
// debug: display file directory and filename of the call recording
|
||||
/*
|
||||
if ($permission['xml_cdr_recording'] && ($permission['xml_cdr_recording_play'] || $permission['xml_cdr_recording_download'])) {
|
||||
if ($row['recording'] !== '/') {
|
||||
echo "<td>" . escape($row['recording']) . "</td>\n";
|
||||
}
|
||||
}
|
||||
*/
|
||||
$domain_name = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
|
||||
if ($permission['xml_cdr_status'] || $permission['xml_cdr_hangup_cause']) {
|
||||
if (!empty($_GET['show']) && $_GET['show'] == 'all' && permission_exists('emergency_logs_view_all')) {
|
||||
echo " <td>" . (isset($row['status']) && $row['status'] !== '' ? "<a href='https://{$domain_name}/app/xml_cdr/xml_cdr_details.php?id=".urlencode($row['emergency_log_uuid'])."&show=all' target='_blank'>".escape($row['status'])."</a>" : ' ') . "</td>\n";
|
||||
}
|
||||
else {
|
||||
//echo " <td>" . (isset($row['status']) && $row['status'] !== '' ? escape($row['status']) : '') . "</td>\n";
|
||||
echo " <td>" . (isset($row['status']) && $row['status'] !== '' ? "<a href='https://{$domain_name}/app/xml_cdr/xml_cdr_details.php?id=".urlencode($row['emergency_log_uuid'])."' target='_blank'>".escape($row['status'])."</a>" : ' ') . "</td>\n";
|
||||
}
|
||||
}
|
||||
echo "</tr>\n";
|
||||
$x++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@
|
|||
echo th_order_by('extension', $text['label-extension'], $order_by, $order);
|
||||
echo "<th class='hide-md-dn'>".$text['label-user_agent']."</th>\n";
|
||||
echo th_order_by('log_status', $text['label-log_status'], $order_by, $order);
|
||||
if (permission_exists('event_guard_log_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('event_guard_log_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -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')) {
|
||||
|
|
@ -273,7 +277,7 @@
|
|||
echo " <td>".escape($row['extension'])."</td>\n";
|
||||
echo " <td class='hide-md-dn'>".escape($row['user_agent'])."</td>\n";
|
||||
echo " <td>".escape($text['label-'.$row['log_status']])."</td>\n";
|
||||
if (permission_exists('event_guard_log_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('event_guard_log_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
echo " <td class='action-button'>\n";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
|
|||
|
|
@ -26,12 +26,7 @@
|
|||
|
||||
/**
|
||||
* event_guard_logs class
|
||||
*
|
||||
* @method null delete
|
||||
* @method null toggle
|
||||
* @method null copy
|
||||
*/
|
||||
if (!class_exists('event_guard')) {
|
||||
class event_guard {
|
||||
|
||||
/**
|
||||
|
|
@ -303,6 +298,3 @@ if (!class_exists('event_guard')) {
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
$id = '';
|
||||
|
||||
//set from session variables
|
||||
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
|
||||
$list_row_edit_button = filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL);
|
||||
|
||||
//get the http post data
|
||||
if (!empty($_POST['extension_settings'])) {
|
||||
|
|
@ -272,7 +272,7 @@
|
|||
echo " <th class='center'>".$text['label-extension_setting_enabled']."</th>\n";
|
||||
|
||||
echo " <th class='hide-sm-dn'>".$text['label-extension_setting_description']."</th>\n";
|
||||
if (permission_exists('extension_setting_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('extension_setting_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -305,7 +305,7 @@
|
|||
}
|
||||
echo " </td>\n";
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['extension_setting_description'])."</td>\n";
|
||||
if (permission_exists('extension_setting_edit') && $list_row_edit_button == 'true') {
|
||||
if (permission_exists('extension_setting_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'>\n";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
|
|||
|
|
@ -26,12 +26,7 @@
|
|||
|
||||
/**
|
||||
* extension_settings class
|
||||
*
|
||||
* @method null delete
|
||||
* @method null toggle
|
||||
* @method null copy
|
||||
*/
|
||||
if (!class_exists('extension_settings')) {
|
||||
class extension_settings {
|
||||
|
||||
/**
|
||||
|
|
@ -272,6 +267,3 @@ if (!class_exists('extension_settings')) {
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -2698,32 +2698,32 @@ $text['description-voicemail_password']['zh-cn'] = "在此处输入数字语音
|
|||
$text['description-voicemail_password']['ja-jp'] = "ここに数値のボイスメール パスワードを入力します。";
|
||||
$text['description-voicemail_password']['ko-kr'] = "여기에 숫자 음성사서함 암호를 입력합니다.";
|
||||
|
||||
$text['description-voicemail_mail_to']['en-us'] = "Enter the email address to send voicemail to (optional).";
|
||||
$text['description-voicemail_mail_to']['en-gb'] = "Enter the email address to send voicemail to (optional).";
|
||||
$text['description-voicemail_mail_to']['ar-eg'] = "أدخل العنوان الإلكتروني لإرسال البريد الصوتي إلى (اختياري).";
|
||||
$text['description-voicemail_mail_to']['de-at'] = "Geben Sie die Email Adresse an, an die Ihre Mailbox Nachricht gesendet werden soll (optional).";
|
||||
$text['description-voicemail_mail_to']['de-ch'] = "Geben Sie die Email Adresse an, an die Ihre Mailbox Nachricht gesendet werden soll (optional).";
|
||||
$text['description-voicemail_mail_to']['de-de'] = "Geben Sie die Email Adresse an, an die Ihre Mailbox Nachricht gesendet werden soll (optional).";
|
||||
$text['description-voicemail_mail_to']['el-gr'] = "Εισαγάγετε τη διεύθυνση email στην οποία θα στείλετε αυτόματο τηλεφωνητή (προαιρετικό).";
|
||||
$text['description-voicemail_mail_to']['es-cl'] = "Ingrese una dirección de correo electrónico para enviar el correo de voz (opcional).";
|
||||
$text['description-voicemail_mail_to']['es-mx'] = "Ingrese una dirección de correo electrónico para enviar el correo de voz (opcional).";
|
||||
$text['description-voicemail_mail_to']['fr-ca'] = "Insérer le courriel où sera envoyé le message de notification (optionnel).";
|
||||
$text['description-voicemail_mail_to']['fr-fr'] = "Insérer le courriel où sera envoyé le message de notification (optionnel).";
|
||||
$text['description-voicemail_mail_to']['he-il'] = "היכנס לכתובת הדואר האלקטרוני כדי לשלוח הודעות קוליות (אופציונלי).";
|
||||
$text['description-voicemail_mail_to']['it-it'] = "Inserire l'indirizzo email a cui recapitare i messaggi vocali (opzionale).";
|
||||
$text['description-voicemail_mail_to']['ka-ge'] = "შეიყვანეთ ელფოსტის მისამართი, რომელზეც ხმოვანი ფოსტა გამოიგზავნება (არასავალდებულო).";
|
||||
$text['description-voicemail_mail_to']['nl-nl'] = "Voer het E-mail adres om de voicemail naar te sturen (optioneel).";
|
||||
$text['description-voicemail_mail_to']['pl-pl'] = "Dodaj adres email na który będą wysyłane pliki poczty głosowej";
|
||||
$text['description-voicemail_mail_to']['pt-br'] = "Insira o endereço de email para enviar o correio de voz (opcional).";
|
||||
$text['description-voicemail_mail_to']['pt-pt'] = "Introduza o endereço de email para enviar o correio de voz (opcional).";
|
||||
$text['description-voicemail_mail_to']['ro-ro'] = "Introduceți adresa de e-mail la care trimiteți mesajul vocal (opțional).";
|
||||
$text['description-voicemail_mail_to']['ru-ru'] = "Введите адрес электронной почты, чтобы отправить голосовую почту (опционально).";
|
||||
$text['description-voicemail_mail_to']['sv-se'] = "Ange E-post adressen för röstbrevlådan (valfritt).";
|
||||
$text['description-voicemail_mail_to']['uk-ua'] = "Введіть адресу електронної пошти для відправки голосового повідомлення (за бажанням).";
|
||||
$text['description-voicemail_mail_to']['tr-tr'] = "Sesli mesajın gönderileceği e-posta adresini girin (isteğe bağlı).";
|
||||
$text['description-voicemail_mail_to']['zh-cn'] = "输入要向其发送语音邮件的电子邮件地址(可选)。";
|
||||
$text['description-voicemail_mail_to']['ja-jp'] = "ボイスメールの送信先の電子メール アドレスを入力します (オプション)。";
|
||||
$text['description-voicemail_mail_to']['ko-kr'] = "음성 메일을 보낼 이메일 주소를 입력합니다(선택 사항).";
|
||||
$text['description-voicemail_mail_to']['en-us'] = "Enter the email address to send voicemail to (optional). Multiple addresses may be separated by commas.";
|
||||
$text['description-voicemail_mail_to']['en-gb'] = "Enter the email address to send voicemail to (optional). Multiple addresses may be separated by commas.";
|
||||
$text['description-voicemail_mail_to']['ar-eg'] = "أدخل عنوان البريد الإلكتروني لإرسال البريد الصوتي إليه (اختياري). يمكن فصل العناوين المتعددة بفواصل.";
|
||||
$text['description-voicemail_mail_to']['de-at'] = "Geben Sie die E-Mail-Adresse ein, an die die Voicemail gesendet werden soll (optional). Mehrere Adressen können durch Kommas getrennt werden.";
|
||||
$text['description-voicemail_mail_to']['de-ch'] = "Geben Sie die E-Mail-Adresse ein, an die die Voicemail gesendet werden soll (optional). Mehrere Adressen können durch Kommas getrennt werden.";
|
||||
$text['description-voicemail_mail_to']['de-de'] = "Geben Sie die E-Mail-Adresse ein, an die die Voicemail gesendet werden soll (optional). Mehrere Adressen können durch Kommas getrennt werden.";
|
||||
$text['description-voicemail_mail_to']['el-gr'] = "Εισαγάγετε τη διεύθυνση email για αποστολή του φωνητικού μηνύματος (προαιρετικό). Πολλαπλές διευθύνσεις μπορούν να διαχωριστούν με κόμματα.";
|
||||
$text['description-voicemail_mail_to']['es-cl'] = "Ingrese la dirección de correo electrónico para enviar el correo de voz (opcional). Se pueden separar múltiples direcciones con comas.";
|
||||
$text['description-voicemail_mail_to']['es-mx'] = "Ingrese la dirección de correo electrónico para enviar el correo de voz (opcional). Se pueden separar múltiples direcciones con comas.";
|
||||
$text['description-voicemail_mail_to']['fr-ca'] = "Entrez l'adresse e-mail à laquelle envoyer la messagerie vocale (facultatif). Plusieurs adresses peuvent être séparées par des virgules.";
|
||||
$text['description-voicemail_mail_to']['fr-fr'] = "Entrez l'adresse e-mail à laquelle envoyer la messagerie vocale (facultatif). Plusieurs adresses peuvent être séparées par des virgules.";
|
||||
$text['description-voicemail_mail_to']['he-il'] = "הזן את כתובת האימייל לשליחת הדואר הקולי (אופציונלי). ניתן להפריד בין כתובות מרובות באמצעות פסיקים.";
|
||||
$text['description-voicemail_mail_to']['it-it'] = "Inserisci l'indirizzo email a cui inviare la segreteria telefonica (opzionale). Più indirizzi possono essere separati da virgole.";
|
||||
$text['description-voicemail_mail_to']['ka-ge'] = "შეიყვანეთ ელ.ფოსტის მისამართი, რომელზეც გაიგზავნება ხმოვანი ფოსტა (არასავალდებულო). შესაძლებელია მრავალი მისამართის მძიმით გამოყოფა.";
|
||||
$text['description-voicemail_mail_to']['nl-nl'] = "Voer het e-mailadres in om de voicemail naartoe te sturen (optioneel). Meerdere adressen kunnen worden gescheiden door komma's.";
|
||||
$text['description-voicemail_mail_to']['pl-pl'] = "Wprowadź adres e-mail, na który ma zostać wysłana poczta głosowa (opcjonalnie). Wiele adresów można oddzielić przecinkami.";
|
||||
$text['description-voicemail_mail_to']['pt-br'] = "Digite o endereço de e-mail para enviar o correio de voz (opcional). Vários endereços podem ser separados por vírgulas.";
|
||||
$text['description-voicemail_mail_to']['pt-pt'] = "Digite o endereço de e-mail para enviar o correio de voz (opcional). Vários endereços podem ser separados por vírgulas.";
|
||||
$text['description-voicemail_mail_to']['ro-ro'] = "Introduceți adresa de e-mail la care se va trimite mesageria vocală (opțional). Mai multe adrese pot fi separate prin virgule.";
|
||||
$text['description-voicemail_mail_to']['ru-ru'] = "Введите адрес электронной почты для отправки голосовой почты (необязательно). Несколько адресов можно разделять запятыми.";
|
||||
$text['description-voicemail_mail_to']['sv-se'] = "Ange e-postadressen som röstbrevet ska skickas till (valfritt). Flera adresser kan separeras med kommatecken.";
|
||||
$text['description-voicemail_mail_to']['uk-ua'] = "Введіть адресу електронної пошти для надсилання голосової пошти (необов’язково). Декілька адрес можна розділити комами.";
|
||||
$text['description-voicemail_mail_to']['tr-tr'] = "Sesli mesajın gönderileceği e-posta adresini girin (isteğe bağlı). Birden fazla adres virgülle ayrılabilir.";
|
||||
$text['description-voicemail_mail_to']['zh-cn'] = "输入要发送语音邮件的电子邮件地址(可选)。多个地址可用逗号分隔。";
|
||||
$text['description-voicemail_mail_to']['ja-jp'] = "ボイスメールを送信するメールアドレスを入力してください(オプション)。複数のアドレスはコンマで区切ることができます。";
|
||||
$text['description-voicemail_mail_to']['ko-kr'] = "보이스메일을 보낼 이메일 주소를 입력하세요(선택 사항). 여러 개의 주소는 쉼표로 구분할 수 있습니다.";
|
||||
|
||||
$text['description-voicemail_local_after_email']['en-us'] = "Choose whether to keep the voicemail in the system after sending the email notification.";
|
||||
$text['description-voicemail_local_after_email']['en-gb'] = "Choose whether to keep the voicemail in the system after sending the email notification.";
|
||||
|
|
|
|||
|
|
@ -186,7 +186,6 @@
|
|||
|
||||
//synchronize configuration
|
||||
if (is_writable($_SESSION['switch']['extensions']['dir'])) {
|
||||
require_once "app/extensions/resources/classes/extension.php";
|
||||
$ext = new extension;
|
||||
$ext->xml();
|
||||
unset($ext);
|
||||
|
|
|
|||
|
|
@ -38,13 +38,56 @@
|
|||
exit;
|
||||
}
|
||||
|
||||
//initialize the database object
|
||||
$database = new database;
|
||||
//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
|
||||
|
|
@ -401,10 +442,23 @@
|
|||
//extension exists
|
||||
}
|
||||
else {
|
||||
//password permission not assigned get the password from the database
|
||||
if ($action == "update" && !permission_exists('extension_password')) {
|
||||
$sql = "select password from v_extensions ";
|
||||
$sql .= "where extension_uuid = :extension_uuid ";
|
||||
$sql .= "and domain_uuid = :domain_uuid ";
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
$parameters['extension_uuid'] = $extension_uuid;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (is_array($row) && @sizeof($row) != 0) {
|
||||
$password = $row["password"];
|
||||
}
|
||||
unset($sql, $parameters, $row);
|
||||
}
|
||||
|
||||
//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) {
|
||||
|
|
@ -415,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
|
||||
|
|
@ -479,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")) {
|
||||
|
|
@ -491,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')) {
|
||||
|
|
@ -592,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);
|
||||
|
|
@ -609,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);
|
||||
|
|
@ -627,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)) {
|
||||
|
|
@ -646,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']['numeric'];
|
||||
$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']['numeric'];
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
@ -676,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
|
||||
|
|
@ -698,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -725,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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -759,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);
|
||||
|
|
@ -773,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);
|
||||
|
|
@ -795,20 +849,17 @@
|
|||
if (permission_exists('extension_add') || permission_exists('extension_edit')) {
|
||||
|
||||
//synchronize configuration
|
||||
if (!empty($_SESSION['switch']['extensions']['dir']) && is_writable($_SESSION['switch']['extensions']['dir'])) {
|
||||
require_once "app/extensions/resources/classes/extension.php";
|
||||
if (is_writable($switch_extensions)) {
|
||||
$ext = new extension;
|
||||
$ext->xml();
|
||||
unset($ext);
|
||||
}
|
||||
|
||||
//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
|
||||
|
|
@ -929,8 +980,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
|
||||
|
|
@ -953,7 +1004,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;
|
||||
|
|
@ -1031,30 +1082,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
|
||||
|
|
@ -1119,7 +1170,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')) {
|
||||
|
|
@ -1131,14 +1182,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";
|
||||
|
|
@ -1152,7 +1203,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";
|
||||
|
|
@ -1257,7 +1308,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";
|
||||
}
|
||||
|
|
@ -1391,7 +1442,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";
|
||||
}
|
||||
|
|
@ -1426,7 +1477,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";
|
||||
|
|
@ -1775,7 +1826,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";
|
||||
|
|
@ -1891,10 +1942,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";
|
||||
}
|
||||
|
|
@ -1985,7 +2036,6 @@
|
|||
echo " ".$text['label-hold_music']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td width=\"70%\" class='vtable' align='left'>\n";
|
||||
require_once "app/music_on_hold/resources/classes/switch_music_on_hold.php";
|
||||
$options = '';
|
||||
$moh = new switch_music_on_hold;
|
||||
echo $moh->select('hold_music', $hold_music ?? '', $options);
|
||||
|
|
@ -2258,7 +2308,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";
|
||||
|
|
@ -2298,7 +2348,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=''>";
|
||||
|
|
|
|||
|
|
@ -331,7 +331,7 @@
|
|||
}
|
||||
echo th_order_by('enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
|
||||
echo th_order_by('description', $text['label-description'], $order_by, $order, null, "class='hide-sm-dn'");
|
||||
if (permission_exists('extension_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('extension_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -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')) {
|
||||
|
|
@ -421,7 +425,7 @@
|
|||
}
|
||||
echo " </td>\n";
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['description'])."</td>\n";
|
||||
if (permission_exists('extension_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('extension_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
echo " <td class='action-button'>";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
@ -447,3 +451,4 @@
|
|||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
*/
|
||||
|
||||
//define the directory class
|
||||
if (!class_exists('extension')) {
|
||||
class extension {
|
||||
|
||||
/**
|
||||
|
|
@ -795,6 +794,3 @@ if (!class_exists('extension')) {
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@
|
|||
echo th_order_by('fax_email', $text['label-email'], $order_by, $order);
|
||||
echo " <th>".$text['label-tools']."</th>";
|
||||
echo th_order_by('fax_description', $text['label-description'], $order_by, $order, null, "class='hide-sm-dn'");
|
||||
if (permission_exists('fax_extension_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('fax_extension_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -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')) {
|
||||
|
|
@ -301,7 +305,7 @@
|
|||
|
||||
echo " </td>\n";
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['fax_description'])." </td>\n";
|
||||
if (permission_exists('fax_extension_edit') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (permission_exists('fax_extension_edit') && filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
echo " <td class='action-button'>";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
@ -325,3 +329,4 @@
|
|||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@
|
|||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
require_once "resources/functions/object_to_array.php";
|
||||
require_once "resources/functions/parse_message.php";
|
||||
require_once "resources/classes/text.php";
|
||||
|
||||
//get accounts to monitor
|
||||
$sql = "select d.domain_name, f.* ";
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@
|
|||
//echo th_order_by('fax_retry_sleep', $text['label-fax_retry_sleep'], $order_by, $order);
|
||||
echo th_order_by('fax_uri', $text['label-fax_destination'], $order_by, $order, null, null, "&id=".$fax_uuid);
|
||||
//echo th_order_by('fax_epoch', $text['label-fax_epoch'], $order_by, $order);
|
||||
if (!empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
|
@ -213,7 +213,7 @@
|
|||
//echo " <td>".$row['fax_retry_sleep']." </td>\n";
|
||||
echo " <td>".basename($row['fax_uri'])." </td>\n";
|
||||
//echo " <td>".$row['fax_epoch']." </td>\n";
|
||||
if (!empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
if (filter_var($_SESSION['theme']['list_row_edit_button']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
echo " <td class='action-button'>\n";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
@ -28,22 +28,25 @@
|
|||
Corey Moullas <cmoullas@emak.tech>
|
||||
*/
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
|
||||
//check if windows
|
||||
if (stristr(PHP_OS, 'WIN')) { $IS_WINDOWS = true; } else { $IS_WINDOWS = false; }
|
||||
|
||||
//executed via command line
|
||||
if (defined('STDIN')) {
|
||||
//command line
|
||||
if (defined('STDIN')) {
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get($setting->get('domain','language','en-us'), 'app/fax');
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get($settings->get('domain','language','en-us'), 'app/fax');
|
||||
|
||||
}
|
||||
//executed via browser
|
||||
else {
|
||||
}
|
||||
|
||||
//includes files
|
||||
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
||||
//web server
|
||||
if (!defined('STDIN')) {
|
||||
|
||||
//additional include
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//set the domain_uuid and domain_name
|
||||
|
|
@ -51,11 +54,6 @@ else {
|
|||
$domain_name = $_SESSION['domain_name'];
|
||||
$user_uuid = $_SESSION['user_uuid'];
|
||||
|
||||
//initialize the settings object
|
||||
if (empty($settings)) {
|
||||
$setting = new settings(["domain_uuid" => $domain_uuid]);
|
||||
}
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('fax_send')) {
|
||||
//access granted
|
||||
|
|
@ -121,12 +119,12 @@ else {
|
|||
}
|
||||
|
||||
//set the fax directory
|
||||
if (!empty($setting->get('switch','storage'))) {
|
||||
$fax_dir = $setting->get('switch','storage').'/fax/'.$domain_name;
|
||||
if (!empty($settings->get('switch','storage'))) {
|
||||
$fax_dir = $settings->get('switch','storage').'/fax/'.$domain_name;
|
||||
}
|
||||
|
||||
//set fax cover font to generate pdf
|
||||
$fax_cover_font = $setting->get('fax','cover_font') ?? null;
|
||||
$fax_cover_font = $settings->get('fax','cover_font') ?? null;
|
||||
}
|
||||
|
||||
//define function correct_path
|
||||
|
|
@ -171,14 +169,14 @@ if (!function_exists('fax_split_dtmf')) {
|
|||
$dir_fax_temp = $fax_dir.'/'.$fax_extension.'/temp';
|
||||
|
||||
//make sure the directories exist
|
||||
if (!empty($setting->get('switch','storage')) && !is_dir($setting->get('switch','storage'))) {
|
||||
mkdir($setting->get('switch','storage'), 0770);
|
||||
if (!empty($settings->get('switch','storage')) && !is_dir($settings->get('switch','storage'))) {
|
||||
mkdir($settings->get('switch','storage'), 0770);
|
||||
}
|
||||
if (!empty($setting->get('switch','storage')) && !is_dir($setting->get('switch','storage').'/fax')) {
|
||||
mkdir($setting->get('switch','storage').'/fax', 0770);
|
||||
if (!empty($settings->get('switch','storage')) && !is_dir($settings->get('switch','storage').'/fax')) {
|
||||
mkdir($settings->get('switch','storage').'/fax', 0770);
|
||||
}
|
||||
if (!empty($setting->get('switch','storage')) && !is_dir($setting->get('switch','storage').'/fax/'.$domain_name)) {
|
||||
mkdir($setting->get('switch','storage').'/fax/'.$domain_name, 0770);
|
||||
if (!empty($settings->get('switch','storage')) && !is_dir($settings->get('switch','storage').'/fax/'.$domain_name)) {
|
||||
mkdir($settings->get('switch','storage').'/fax/'.$domain_name, 0770);
|
||||
}
|
||||
if (!is_dir($fax_dir.'/'.$fax_extension)) {
|
||||
mkdir($fax_dir.'/'.$fax_extension, 0770);
|
||||
|
|
@ -301,7 +299,7 @@ if (!function_exists('fax_split_dtmf')) {
|
|||
}
|
||||
|
||||
//un/authorized file extensions
|
||||
$allowed_file_extensions = $setting->get('fax','allowed_extension');
|
||||
$allowed_file_extensions = $settings->get('fax','allowed_extension');
|
||||
$disallowed_file_extensions = explode(',','sh,ssh,so,dll,exe,bat,vbs,zip,rar,z,tar,tbz,tgz,gz');
|
||||
|
||||
//process uploaded or emailed files (if any)
|
||||
|
|
@ -410,19 +408,19 @@ if (!function_exists('fax_split_dtmf')) {
|
|||
|
||||
//logo
|
||||
$display_logo = false;
|
||||
if (empty($setting->get('fax','cover_logo'))) {
|
||||
if (empty($settings->get('fax','cover_logo'))) {
|
||||
$logo = ''; //explicitly empty
|
||||
}
|
||||
else if ($setting->get('fax','cover_logo') != '') {
|
||||
if (substr($setting->get('fax','cover_logo'), 0, 4) == 'http') {
|
||||
$logo = $setting->get('fax','cover_logo');
|
||||
else if ($settings->get('fax','cover_logo') != '') {
|
||||
if (substr($settings->get('fax','cover_logo'), 0, 4) == 'http') {
|
||||
$logo = $settings->get('fax','cover_logo');
|
||||
}
|
||||
else if (substr($setting->get('fax','cover_logo'), 0, 1) == '/') {
|
||||
if (substr($setting->get('fax','cover_logo'), 0, strlen($_SERVER['DOCUMENT_ROOT'])) != $_SERVER['DOCUMENT_ROOT']) {
|
||||
$logo = $_SERVER['DOCUMENT_ROOT'].$setting->get('fax','cover_logo');
|
||||
else if (substr($settings->get('fax','cover_logo'), 0, 1) == '/') {
|
||||
if (substr($settings->get('fax','cover_logo'), 0, strlen($_SERVER['DOCUMENT_ROOT'])) != $_SERVER['DOCUMENT_ROOT']) {
|
||||
$logo = $_SERVER['DOCUMENT_ROOT'].$settings->get('fax','cover_logo');
|
||||
}
|
||||
else {
|
||||
$logo = $setting->get('fax','cover_logo');
|
||||
$logo = $settings->get('fax','cover_logo');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -433,7 +431,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);
|
||||
|
|
@ -497,7 +495,7 @@ if (!function_exists('fax_split_dtmf')) {
|
|||
$pdf->SetFont($pdf_font, "", 12);
|
||||
$pdf->SetXY($x + 2.0, $y + 1.65);
|
||||
if (defined('STDIN') || ($_REQUEST['submit'] != '' && $_REQUEST['submit'] != 'preview')) {
|
||||
$date = new DateTime('now', new DateTimeZone( $setting->get('domain','time_zone', date_default_timezone_get() ) ));
|
||||
$date = new DateTime('now', new DateTimeZone( $settings->get('domain','time_zone', date_default_timezone_get() ) ));
|
||||
$pdf->Write(0.3, $date->format('d M Y @ h:i:s A'));
|
||||
}
|
||||
$pdf->SetXY($x + 2.0, $y + 1.95);
|
||||
|
|
@ -568,7 +566,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 = $settings->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 +581,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,9 +673,9 @@ 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');
|
||||
$mail_from_address = (!empty($settings->get('fax','smtp_from'))) ? $settings->get('fax','smtp_from') : $settings->get('email','smtp_from');
|
||||
|
||||
//get the fax mail to address and fax prefix
|
||||
$sql = "select * from v_fax where fax_uuid = :fax_uuid ";
|
||||
|
|
@ -746,7 +750,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 +764,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) {
|
||||
|
|
@ -797,7 +803,7 @@ if (!function_exists('fax_split_dtmf')) {
|
|||
|
||||
//send the external call
|
||||
$fax_variables = '';
|
||||
foreach($setting->get('fax','variable') as $variable) {
|
||||
foreach($settings->get('fax','variable') as $variable) {
|
||||
$fax_variables .= $variable.",";
|
||||
}
|
||||
}
|
||||
|
|
@ -889,7 +895,7 @@ if (!defined('STDIN')) {
|
|||
$sql .= "and cp.phone_type_fax = 1 ";
|
||||
$sql .= "and cp.phone_number is not null ";
|
||||
$sql .= "and cp.phone_number <> '' ";
|
||||
if ($setting->get('contact','permissions', false)) {
|
||||
if ($settings->get('contact','permissions', false)) {
|
||||
if (is_array($user_group_uuids) && @sizeof($user_group_uuids) != 0) {
|
||||
//only show contacts assigned to current user's group(s) and those not assigned to any group
|
||||
$sql .= "and (";
|
||||
|
|
@ -940,7 +946,7 @@ if (!defined('STDIN')) {
|
|||
}
|
||||
if (is_array($contact_labels)) {
|
||||
//sort by name(s)
|
||||
asort($contact_labels, SORT_NATURAL);
|
||||
asort($contact_labels, SORT_NATURAL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1005,7 +1011,7 @@ if (!defined('STDIN')) {
|
|||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'><b>".$text['header-new_fax']."</b></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$setting->get('theme','button_icon_back'),'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'fax.php']);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$settings->get('theme','button_icon_back'),'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'fax.php']);
|
||||
if ($domain_enabled == true) {
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-preview'],'icon'=>'eye','name'=>'submit','value'=>'preview']);
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-send'],'icon'=>'paper-plane','id'=>'btn_save','name'=>'submit','value'=>'send','style'=>'margin-left: 15px;']);
|
||||
|
|
@ -1015,7 +1021,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";
|
||||
}
|
||||
|
|
@ -1028,7 +1034,7 @@ if (!defined('STDIN')) {
|
|||
echo " ".$text['label-fax-header']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input type='text' name='fax_header' class='formfld' style='' value='".($setting->get('fax','cover_header') ?? '')."'>\n";
|
||||
echo " <input type='text' name='fax_header' class='formfld' style='' value='".($settings->get('fax','cover_header') ?? '')."'>\n";
|
||||
echo " <br />\n";
|
||||
echo " ".$text['description-fax-header']."\n";
|
||||
echo "</td>\n";
|
||||
|
|
@ -1096,7 +1102,7 @@ if (!defined('STDIN')) {
|
|||
for ($f = 1; $f <= 3; $f++) {
|
||||
echo " <span id='fax_file_".$f."' ".(($f > 1) ? "style='display: none;'" : null).">";
|
||||
echo " <input name='fax_files[]' id='fax_files_".$f."' type='file' class='formfld fileinput' style='margin-right: 3px; ".(($f > 1) ? "margin-top: 3px;" : null)."' onchange=\"".(($f < 3) ? "document.getElementById('fax_file_".($f+1)."').style.display='';" : null)." list_selected_files(".$f.");\" multiple='multiple'>";
|
||||
echo button::create(['type'=>'button','label'=>$text['button-clear'],'icon'=>$setting->get('theme','button_icon_reset'),'onclick'=>"reset_file_input('fax_files_".$f."'); document.getElementById('file_list_".$f."').innerHTML='';"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-clear'],'icon'=>$settings->get('theme','button_icon_reset'),'onclick'=>"reset_file_input('fax_files_".$f."'); document.getElementById('file_list_".$f."').innerHTML='';"]);
|
||||
echo "<br />";
|
||||
echo " <span id='file_list_".$f."'></span>";
|
||||
echo " </span>\n";
|
||||
|
|
@ -1111,9 +1117,9 @@ if (!defined('STDIN')) {
|
|||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select name='fax_resolution' class='formfld'>\n";
|
||||
echo " <option value='normal' ".(($setting->get('fax','resolution') == 'normal') ? 'selected' : null).">".$text['option-fax-resolution-normal']."</option>\n";
|
||||
echo " <option value='fine' ".(($setting->get('fax','resolution') == 'fine') ? 'selected' : null).">".$text['option-fax-resolution-fine']."</option>\n";
|
||||
echo " <option value='superfine' ".(($setting->get('fax','resolution') == 'superfine') ? 'selected' : null).">".$text['option-fax-resolution-superfine']."</option>\n";
|
||||
echo " <option value='normal' ".(($settings->get('fax','resolution') == 'normal') ? 'selected' : null).">".$text['option-fax-resolution-normal']."</option>\n";
|
||||
echo " <option value='fine' ".(($settings->get('fax','resolution') == 'fine') ? 'selected' : null).">".$text['option-fax-resolution-fine']."</option>\n";
|
||||
echo " <option value='superfine' ".(($settings->get('fax','resolution') == 'superfine') ? 'selected' : null).">".$text['option-fax-resolution-superfine']."</option>\n";
|
||||
echo " </select>\n";
|
||||
echo " <br />\n";
|
||||
echo " ".$text['description-fax-resolution']."\n";
|
||||
|
|
@ -1126,9 +1132,9 @@ if (!defined('STDIN')) {
|
|||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select name='fax_page_size' class='formfld'>\n";
|
||||
echo " <option value='letter' ".(($setting->get('fax','page_size') == 'letter') ? 'selected' : null).">Letter</option>\n";
|
||||
echo " <option value='legal' ".(($setting->get('fax','page_size') == 'legal') ? 'selected' : null).">Legal</option>\n";
|
||||
echo " <option value='a4' ".(($setting->get('fax','page_size') == 'a4') ? 'selected' : null).">A4</option>\n";
|
||||
echo " <option value='letter' ".(($settings->get('fax','page_size') == 'letter') ? 'selected' : null).">Letter</option>\n";
|
||||
echo " <option value='legal' ".(($settings->get('fax','page_size') == 'legal') ? 'selected' : null).">Legal</option>\n";
|
||||
echo " <option value='a4' ".(($settings->get('fax','page_size') == 'a4') ? 'selected' : null).">A4</option>\n";
|
||||
echo " </select>\n";
|
||||
echo " <br />\n";
|
||||
echo " ".$text['description-fax-page-size']."\n";
|
||||
|
|
@ -1136,7 +1142,7 @@ if (!defined('STDIN')) {
|
|||
echo "</tr>\n";
|
||||
|
||||
if (permission_exists('fax_subject')) {
|
||||
$cover_subject_required = $setting->get('fax','cover_subject_required') ?? '';
|
||||
$cover_subject_required = $settings->get('fax','cover_subject_required') ?? '';
|
||||
$class = ($cover_subject_required == 'true') ? 'vncellreq' : 'vncell';
|
||||
$required = ($cover_subject_required == 'true') ? 'required' : '';
|
||||
echo "<tr>\n";
|
||||
|
|
@ -1152,7 +1158,7 @@ if (!defined('STDIN')) {
|
|||
}
|
||||
|
||||
if (permission_exists('fax_message')) {
|
||||
$cover_message_required = $setting->get('fax','cover_message_required') ?? '';
|
||||
$cover_message_required = $settings->get('fax','cover_message_required') ?? '';
|
||||
$class = ($cover_message_required == 'true') ? 'vncellreq' : 'vncell';
|
||||
$required = ($cover_message_required == 'true') ? 'required' : '';
|
||||
echo "<tr>\n";
|
||||
|
|
@ -1160,7 +1166,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;'>".$settings->get('fax','cover_message')."</textarea>\n";
|
||||
echo "<br />\n";
|
||||
echo " ".$text['description-fax-message']."\n";
|
||||
echo "</td>\n";
|
||||
|
|
@ -1173,7 +1179,7 @@ if (!defined('STDIN')) {
|
|||
echo " ".$text['label-fax-footer']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <textarea type='text' name='fax_footer' class='formfld' style='width: 65%; height: 100px;'>".$setting->get('fax','cover_footer')."</textarea>\n";
|
||||
echo " <textarea type='text' name='fax_footer' class='formfld' style='width: 65%; height: 100px;'>".$settings->get('fax','cover_footer')."</textarea>\n";
|
||||
echo " <br />\n";
|
||||
echo " ".$text['description-fax-footer']."\n";
|
||||
echo "</td>\n";
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
*/
|
||||
|
||||
//define the fax class
|
||||
if (!class_exists('fax')) {
|
||||
class fax {
|
||||
|
||||
/**
|
||||
|
|
@ -725,7 +724,6 @@ if (!class_exists('fax')) {
|
|||
}
|
||||
|
||||
} //class
|
||||
}
|
||||
|
||||
/*
|
||||
$o = new fax;
|
||||
|
|
@ -738,5 +736,3 @@ $c->destination_number = $fax_destination_number;
|
|||
$c->fax_description = $fax_description;
|
||||
$c->dialplan();
|
||||
*/
|
||||
|
||||
?>
|
||||
|
|
@ -76,6 +76,14 @@
|
|||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "30";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Number of days to retain the fax queue logs in the database for the maintenance app.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "5506cf35-e19d-4f02-ab9d-43fd0f8460f7";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "fax_queue";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "prefer_local";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Determine whether fax calls should attempt to stay local or route to the provider.";
|
||||
//$y++;
|
||||
//$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "afd729d9-cf69-4793-a140-21093814d314";
|
||||
//$apps[$x]['default_settings'][$y]['default_setting_category'] = "fax_queue";
|
||||
|
|
|
|||
|
|
@ -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']) {
|
||||
|
|
|
|||
|
|
@ -26,12 +26,7 @@
|
|||
|
||||
/**
|
||||
* fax_queue class
|
||||
*
|
||||
* @method null delete
|
||||
* @method null toggle
|
||||
* @method null copy
|
||||
*/
|
||||
if (!class_exists('fax_queue')) {
|
||||
class fax_queue {
|
||||
|
||||
/**
|
||||
|
|
@ -274,6 +269,3 @@ if (!class_exists('fax_queue')) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -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()) {
|
||||
|
|
@ -280,21 +297,23 @@
|
|||
}
|
||||
|
||||
//check to see if the destination number is local
|
||||
$sql = "select count(destination_uuid) ";
|
||||
$sql .= "from v_destinations ";
|
||||
$sql .= "where (";
|
||||
$sql .= " destination_number = :destination_number ";
|
||||
$sql .= " or concat(destination_prefix, destination_number) = :destination_number ";
|
||||
$sql .= " or concat(destination_trunk_prefix, destination_number) = :destination_number ";
|
||||
$sql .= " or concat(destination_area_code, destination_number) = :destination_number ";
|
||||
$sql .= " or concat(destination_prefix, destination_area_code, destination_number) = :destination_number ";
|
||||
$sql .= ")";
|
||||
$parameters['destination_number'] = $fax_number;
|
||||
$destination_count = $database->select($sql, $parameters, 'column');
|
||||
$local_destination = false;
|
||||
if ($destination_count > 0) {
|
||||
$local_destination = true;
|
||||
$route_array[] = 'loopback/'.$fax_number.'/public';
|
||||
if ($setting->get('fax_queue','prefer_local', false)) {
|
||||
$sql = "select count(destination_uuid) ";
|
||||
$sql .= "from v_destinations ";
|
||||
$sql .= "where (";
|
||||
$sql .= " destination_number = :destination_number ";
|
||||
$sql .= " or concat(destination_prefix, destination_number) = :destination_number ";
|
||||
$sql .= " or concat(destination_trunk_prefix, destination_number) = :destination_number ";
|
||||
$sql .= " or concat(destination_area_code, destination_number) = :destination_number ";
|
||||
$sql .= " or concat(destination_prefix, destination_area_code, destination_number) = :destination_number ";
|
||||
$sql .= ") ";
|
||||
$parameters['destination_number'] = $fax_number;
|
||||
$destination_count = $database->select($sql, $parameters, 'column');
|
||||
if ($destination_count > 0) {
|
||||
$local_destination = true;
|
||||
$route_array[] = 'loopback/'.$fax_number.'/public';
|
||||
}
|
||||
}
|
||||
|
||||
//define the fax file
|
||||
|
|
@ -308,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) {
|
||||
|
|
@ -315,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) ";
|
||||
|
|
@ -329,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;
|
||||
|
|
@ -362,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
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
//includes files
|
||||
require_once dirname(__DIR__, 4) . "/resources/require.php";
|
||||
require_once "resources/pdo.php";
|
||||
include "resources/classes/permissions.php";
|
||||
|
||||
//increase limits
|
||||
set_time_limit(0);
|
||||
|
|
|
|||
|
|
@ -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}";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
@ -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'] = "활성화됨";
|
||||
|
||||
?>
|
||||
?>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue