mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-31 13:09:17 +00:00
@@ -2,21 +2,23 @@
|
||||
/*
|
||||
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) 2018
|
||||
Portions created by the Initial Developer are Copyright (C) 2018 - 2020
|
||||
the Initial Developer. All Rights Reserved.
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//includes
|
||||
@@ -25,8 +27,12 @@
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
if (!permission_exists('access_control_add') && !permission_exists('access_control_edit')) {
|
||||
echo "access denied"; exit;
|
||||
if (permission_exists('access_control_add') || permission_exists('access_control_edit')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
@@ -37,131 +43,203 @@
|
||||
if (is_uuid($_REQUEST["id"])) {
|
||||
$action = "update";
|
||||
$access_control_uuid = $_REQUEST["id"];
|
||||
$id = $_REQUEST["id"];
|
||||
}
|
||||
else {
|
||||
$action = "add";
|
||||
}
|
||||
|
||||
//get http post variables and set them to php variables
|
||||
if (count($_POST)>0) {
|
||||
if (is_array($_POST) && @sizeof($_POST) != 0) {
|
||||
$access_control_name = $_POST["access_control_name"];
|
||||
$access_control_default = $_POST["access_control_default"];
|
||||
$access_control_nodes = $_POST["access_control_nodes"];
|
||||
$access_control_description = $_POST["access_control_description"];
|
||||
}
|
||||
|
||||
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
//process the user data and save it to the database
|
||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//delete the access control
|
||||
if (permission_exists('access_control_delete')) {
|
||||
if ($_POST['action'] == 'delete' && is_uuid($access_control_uuid)) {
|
||||
//prepare
|
||||
$array[0]['checked'] = 'true';
|
||||
$array[0]['uuid'] = $access_control_uuid;
|
||||
//delete
|
||||
$obj = new access_controls;
|
||||
$obj->delete($array);
|
||||
//redirect
|
||||
header('Location: access_controls.php');
|
||||
//validate the token
|
||||
$token = new token;
|
||||
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||
message::add($text['message-invalid_token'],'negative');
|
||||
header('Location: access_controls.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
//process the http post data by submitted action
|
||||
if ($_POST['action'] != '' && strlen($_POST['action']) > 0) {
|
||||
|
||||
//prepare the array(s)
|
||||
$x = 0;
|
||||
foreach ($_POST['access_control_nodes'] as $row) {
|
||||
if (is_uuid($row['access_control_uuid']) && $row['checked'] === 'true') {
|
||||
$array['access_controls'][$x]['checked'] = $row['checked'];
|
||||
$array['access_controls'][$x]['access_control_nodes'][]['access_control_node_uuid'] = $row['access_control_node_uuid'];
|
||||
$x++;
|
||||
}
|
||||
}
|
||||
|
||||
//send the array to the database class
|
||||
switch ($_POST['action']) {
|
||||
case 'copy':
|
||||
if (permission_exists('access_control_add')) {
|
||||
$obj = new database;
|
||||
$obj->copy($array);
|
||||
}
|
||||
break;
|
||||
case 'delete':
|
||||
if (permission_exists('access_control_delete')) {
|
||||
$obj = new database;
|
||||
$obj->delete($array);
|
||||
}
|
||||
break;
|
||||
case 'toggle':
|
||||
if (permission_exists('access_control_update')) {
|
||||
$obj = new database;
|
||||
$obj->toggle($array);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
//clear the cache, reloadacl and redirect the user
|
||||
if (in_array($_POST['action'], array('copy', 'delete', 'toggle'))) {
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("configuration:acl.conf");
|
||||
|
||||
//create the event socket connection
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
event_socket_request($fp, "api reloadacl");
|
||||
}
|
||||
|
||||
//redirect the user
|
||||
header('Location: access_control_edit.php?id='.$id);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//get the primary key
|
||||
if ($action == "update") {
|
||||
$access_control_uuid = $_POST["access_control_uuid"];
|
||||
}
|
||||
//check for all required data
|
||||
$msg = '';
|
||||
if (strlen($access_control_name) == 0) { $msg .= $text['message-required']." ".$text['label-access_control_name']."<br>\n"; }
|
||||
if (strlen($access_control_default) == 0) { $msg .= $text['message-required']." ".$text['label-access_control_default']."<br>\n"; }
|
||||
//if (strlen($access_control_nodes) == 0) { $msg .= $text['message-required']." ".$text['label-access_control_nodes']."<br>\n"; }
|
||||
//if (strlen($access_control_description) == 0) { $msg .= $text['message-required']." ".$text['label-access_control_description']."<br>\n"; }
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table><tr><td>\n";
|
||||
echo $msg."<br />";
|
||||
echo "</td></tr></table>\n";
|
||||
persistformvar($_POST);
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
}
|
||||
|
||||
//validate the token
|
||||
$token = new token;
|
||||
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||
message::add($text['message-invalid_token'],'negative');
|
||||
header('Location: access_controls.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
//check for all required data
|
||||
$msg = '';
|
||||
if (strlen($access_control_name) == 0) { $msg .= $text['message-required']." ".$text['label-access_control_name']."<br>\n"; }
|
||||
if (strlen($access_control_default) == 0) { $msg .= $text['message-required']." ".$text['label-access_control_default']."<br>\n"; }
|
||||
//if (strlen($access_control_description) == 0) { $msg .= $text['message-required']." ".$text['label-access_control_description']."<br>\n"; }
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table><tr><td>\n";
|
||||
echo $msg."<br />";
|
||||
echo "</td></tr></table>\n";
|
||||
persistformvar($_POST);
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
}
|
||||
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
$execute = false;
|
||||
|
||||
if ($action == "add" && permission_exists('access_control_add')) {
|
||||
$execute = true;
|
||||
//add the access_control_uuid
|
||||
if (!is_uuid($_POST["access_control_uuid"])) {
|
||||
$access_control_uuid = uuid();
|
||||
|
||||
//set the message
|
||||
message::add($text['message-add']);
|
||||
|
||||
//set redirect url
|
||||
$redirect_url = 'access_control_edit.php?id='.$access_control_uuid;
|
||||
}
|
||||
|
||||
if ($action == "update" && permission_exists('access_control_edit')) {
|
||||
$execute = true;
|
||||
|
||||
//set the message
|
||||
message::add($text['message-update']);
|
||||
//prepare the array
|
||||
$array['access_controls'][0]['access_control_uuid'] = $access_control_uuid;
|
||||
$array['access_controls'][0]['access_control_name'] = $access_control_name;
|
||||
$array['access_controls'][0]['access_control_default'] = $access_control_default;
|
||||
$array['access_controls'][0]['access_control_description'] = $access_control_description;
|
||||
$y = 0;
|
||||
if (is_array($access_control_nodes)) {
|
||||
foreach ($access_control_nodes as $row) {
|
||||
if (strlen($row['node_type']) > 0) {
|
||||
$array['access_controls'][0]['access_control_nodes'][$y]['access_control_node_uuid'] = $row["access_control_node_uuid"];
|
||||
$array['access_controls'][0]['access_control_nodes'][$y]['node_type'] = $row["node_type"];
|
||||
$array['access_controls'][0]['access_control_nodes'][$y]['node_cidr'] = $row["node_cidr"];
|
||||
$array['access_controls'][0]['access_control_nodes'][$y]['node_domain'] = $row["node_domain"];
|
||||
$array['access_controls'][0]['access_control_nodes'][$y]['node_description'] = $row["node_description"];
|
||||
$y++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($execute) {
|
||||
$array['access_controls'][0]['access_control_uuid'] = $access_control_uuid;
|
||||
$array['access_controls'][0]['access_control_name'] = $access_control_name;
|
||||
$array['access_controls'][0]['access_control_default'] = $access_control_default;
|
||||
$array['access_controls'][0]['access_control_description'] = $access_control_description;
|
||||
$database = new database;
|
||||
$database->app_name = 'access_control';
|
||||
$database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
|
||||
$database->save($array);
|
||||
unset($array);
|
||||
//save the data
|
||||
$database = new database;
|
||||
$database->app_name = 'access controls';
|
||||
$database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
|
||||
$database->save($array);
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("configuration:acl.conf");
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("configuration:acl.conf");
|
||||
|
||||
//create the event socket connection
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) { event_socket_request($fp, "api reloadacl"); }
|
||||
//create the event socket connection
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
event_socket_request($fp, "api reloadacl");
|
||||
}
|
||||
|
||||
//redirect the user
|
||||
header('Location: '.($redirect_url ? $redirect_url : 'access_controls.php'));
|
||||
exit;
|
||||
}
|
||||
|
||||
}
|
||||
//redirect the user
|
||||
if (isset($action)) {
|
||||
if ($action == "add") {
|
||||
$_SESSION["message"] = $text['message-add'];
|
||||
}
|
||||
if ($action == "update") {
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
}
|
||||
//header('Location: access_controls.php');
|
||||
header('Location: access_control_edit.php?id='.urlencode($access_control_uuid));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//pre-populate the form
|
||||
if (count($_GET) > 0 && $_POST["persistformvar"] != "true" && is_uuid($_GET["id"])) {
|
||||
$access_control_uuid = $_GET["id"];
|
||||
if (is_array($_GET) && $_POST["persistformvar"] != "true") {
|
||||
$sql = "select * from v_access_controls ";
|
||||
$sql .= "where access_control_uuid = :access_control_uuid ";
|
||||
$parameters['access_control_uuid'] = $access_control_uuid;
|
||||
$database = new database;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (is_array($row) && sizeof($row)) {
|
||||
if (is_array($row) && @sizeof($row) != 0) {
|
||||
$access_control_name = $row["access_control_name"];
|
||||
$access_control_default = $row["access_control_default"];
|
||||
$access_control_description = $row["access_control_description"];
|
||||
}
|
||||
unset ($sql, $parameters, $row);
|
||||
unset($sql, $parameters, $row);
|
||||
}
|
||||
|
||||
//get the child data
|
||||
if (is_uuid($access_control_uuid)) {
|
||||
$sql = "select * from v_access_control_nodes ";
|
||||
$sql .= "where access_control_uuid = :access_control_uuid ";
|
||||
$sql .= "order by node_cidr asc";
|
||||
$parameters['access_control_uuid'] = $access_control_uuid;
|
||||
$database = new database;
|
||||
$access_control_nodes = $database->select($sql, $parameters, 'all');
|
||||
unset ($sql, $parameters);
|
||||
}
|
||||
|
||||
//add the $access_control_node_uuid
|
||||
if (!is_uuid($access_control_node_uuid)) {
|
||||
$access_control_node_uuid = uuid();
|
||||
}
|
||||
|
||||
//add an empty row
|
||||
if (is_array($access_control_nodes) && @sizeof($access_control_nodes) != 0) {
|
||||
$x = count($access_control_nodes);
|
||||
}
|
||||
else {
|
||||
$access_control_nodes = array();
|
||||
$x = 0;
|
||||
}
|
||||
$access_control_nodes[$x]['access_control_uuid'] = $access_control_uuid;
|
||||
$access_control_nodes[$x]['access_control_node_uuid'] = uuid();
|
||||
$access_control_nodes[$x]['node_type'] = '';
|
||||
$access_control_nodes[$x]['node_cidr'] = '';
|
||||
$access_control_nodes[$x]['node_domain'] = '';
|
||||
$access_control_nodes[$x]['node_description'] = '';
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
$token = $object->create($_SERVER['PHP_SELF']);
|
||||
@@ -172,66 +250,158 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//show the content
|
||||
echo "<form name='frm' id='frm' method='post'>\n";
|
||||
echo "<input class='formfld' type='hidden' name='access_control_uuid' value='".escape($access_control_uuid)."'>\n";
|
||||
|
||||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'><b>".$text['title-access_control']."</b></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;','collapse'=>'hide-xs','link'=>'access_controls.php']);
|
||||
if ($action == 'update' && permission_exists('access_control_delete')) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete_access_control','collapse'=>'hide-xs','style'=>'margin-right: 15px;','onclick'=>"modal_open('modal-delete-access-control','btn_delete_access_control');"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','collapse'=>'hide-xs','style'=>'margin-right: 15px;','link'=>'access_controls.php']);
|
||||
if ($action == 'update') {
|
||||
if (permission_exists('access_control_node_add')) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','name'=>'btn_copy','style'=>'display: none;','onclick'=>"modal_open('modal-copy','btn_copy');"]);
|
||||
}
|
||||
if (permission_exists('access_control_node_delete')) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','name'=>'btn_delete','style'=>'display: none; margin-right: 15px;','onclick'=>"modal_open('modal-delete','btn_delete');"]);
|
||||
}
|
||||
}
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','collapse'=>'hide-xs']);
|
||||
echo " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
if ($action == 'update' && permission_exists('access_control_delete')) {
|
||||
echo modal::create(['id'=>'modal-delete-access-control','type'=>'delete','actions'=>button::create(['type'=>'submit','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete_access_control','style'=>'float: right; margin-left: 15px;','collapse'=>'never','name'=>'action','value'=>'delete','onclick'=>"modal_close();"])]);
|
||||
echo $text['title_description-access_controls']."\n";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
if ($action == 'update') {
|
||||
if (permission_exists('access_control_add')) {
|
||||
echo modal::create(['id'=>'modal-copy','type'=>'copy','actions'=>button::create(['type'=>'submit','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_copy','style'=>'float: right; margin-left: 15px;','collapse'=>'never','name'=>'action','value'=>'copy','onclick'=>"modal_close();"])]);
|
||||
}
|
||||
if (permission_exists('access_control_delete')) {
|
||||
echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'submit','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','name'=>'action','value'=>'delete','onclick'=>"modal_close();"])]);
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'update') {
|
||||
if (permission_exists('access_control_add')) {
|
||||
echo modal::create(['id'=>'modal-copy','type'=>'copy','actions'=>button::create(['type'=>'submit','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_copy','style'=>'float: right; margin-left: 15px;','collapse'=>'never','name'=>'action','value'=>'copy','onclick'=>"modal_close();"])]);
|
||||
}
|
||||
if (permission_exists('access_control_delete')) {
|
||||
echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'submit','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','name'=>'action','value'=>'delete','onclick'=>"modal_close();"])]);
|
||||
}
|
||||
}
|
||||
|
||||
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='nowrap'>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-access_control_name']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td width='70%' class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='access_control_name' maxlength='255' value=\"".escape($access_control_name)."\">\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='access_control_name' maxlength='255' value='".escape($access_control_name)."'>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-access_control_name']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-access_control_default']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='access_control_default'>\n";
|
||||
if ($access_control_default == "allow") {
|
||||
echo " <option value='allow' selected='selected'>".$text['label-allow']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='allow'>".$text['label-allow']."</option>\n";
|
||||
}
|
||||
if ($access_control_default == "deny") {
|
||||
echo " <option value='deny' selected='selected'>".$text['label-deny']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='deny'>".$text['label-deny']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
echo " <select class='formfld' name='access_control_default'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
if ($access_control_default == "allow") {
|
||||
echo " <option value='allow' selected='selected'>".$text['label-allow']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='allow'>".$text['label-allow']."</option>\n";
|
||||
}
|
||||
if ($access_control_default == "deny") {
|
||||
echo " <option value='deny' selected='selected'>".$text['label-deny']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='deny'>".$text['label-deny']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-access_control_default']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-access_control_nodes']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
echo " <table>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <th class='vtablereq'>".$text['label-node_type']."</th>\n";
|
||||
echo " <td class='vtable'>".$text['label-node_cidr']."</td>\n";
|
||||
echo " <td class='vtable'>".$text['label-node_domain']."</td>\n";
|
||||
echo " <td class='vtable'>".$text['label-node_description']."</td>\n";
|
||||
if (is_array($access_control_nodes) && @sizeof($access_control_nodes) > 1 && permission_exists('access_control_node_delete')) {
|
||||
echo " <td class='vtable edit_delete_checkbox_all' onmouseover=\"swap_display('delete_label_details', 'delete_toggle_details');\" onmouseout=\"swap_display('delete_label_details', 'delete_toggle_details');\">\n";
|
||||
echo " <span id='delete_label_details'>".$text['label-action']."</span>\n";
|
||||
echo " <span id='delete_toggle_details'><input type='checkbox' id='checkbox_all_details' name='checkbox_all' onclick=\"edit_all_toggle('details'); checkbox_on_change(this);\"></span>\n";
|
||||
echo " </td>\n";
|
||||
}
|
||||
echo " </tr>\n";
|
||||
$x = 0;
|
||||
foreach($access_control_nodes as $row) {
|
||||
echo " <tr>\n";
|
||||
echo " <input type='hidden' name='access_control_nodes[$x][access_control_uuid]' value=\"".escape($row["access_control_uuid"])."\">\n";
|
||||
echo " <input type='hidden' name='access_control_nodes[$x][access_control_node_uuid]' value=\"".escape($row["access_control_node_uuid"])."\">\n";
|
||||
echo " <td class='formfld'>\n";
|
||||
echo " <select class='formfld' name='access_control_nodes[$x][node_type]'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
if ($row['node_type'] == "allow") {
|
||||
echo " <option value='allow' selected='selected'>".$text['label-allow']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='allow'>".$text['label-allow']."</option>\n";
|
||||
}
|
||||
if ($row['node_type'] == "deny") {
|
||||
echo " <option value='deny' selected='selected'>".$text['label-deny']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='deny'>".$text['label-deny']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class='formfld'>\n";
|
||||
echo " <input class='formfld' type='text' name='access_control_nodes[$x][node_cidr]' maxlength='255' value=\"".escape($row["node_cidr"])."\">\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class='formfld'>\n";
|
||||
echo " <input class='formfld' type='text' name='access_control_nodes[$x][node_domain]' maxlength='255' value=\"".escape($row["node_domain"])."\">\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class='formfld'>\n";
|
||||
echo " <input class='formfld' type='text' name='access_control_nodes[$x][node_description]' maxlength='255' value=\"".escape($row["node_description"])."\">\n";
|
||||
echo " </td>\n";
|
||||
if (is_array($access_control_nodes) && @sizeof($access_control_nodes) > 1 && permission_exists('access_control_node_delete')) {
|
||||
if (is_uuid($row['access_control_node_uuid'])) {
|
||||
echo " <td class='vtable' style='text-align: center; padding-bottom: 3px;'>\n";
|
||||
echo " <input type='checkbox' name='access_control_nodes[".$x."][checked]' value='true' class='chk_delete checkbox_details' onclick=\"checkbox_on_change(this);\">\n";
|
||||
echo " </td>\n";
|
||||
}
|
||||
else {
|
||||
echo " <td></td>\n";
|
||||
}
|
||||
}
|
||||
echo " </tr>\n";
|
||||
$x++;
|
||||
}
|
||||
echo " </table>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-node_description']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-access_control_description']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='access_control_description' maxlength='255' value=\"".escape($access_control_description)."\">\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='access_control_description' maxlength='255' value='".escape($access_control_description)."'>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-access_control_description']."\n";
|
||||
echo "</td>\n";
|
||||
@@ -240,19 +410,11 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo "</table>";
|
||||
echo "<br /><br />";
|
||||
|
||||
if ($action == "update") {
|
||||
echo "<input type='hidden' name='access_control_uuid' value='".escape($access_control_uuid)."'>\n";
|
||||
}
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
|
||||
echo "</form>";
|
||||
|
||||
if ($action == "update") {
|
||||
require "access_control_nodes.php";
|
||||
echo "<br><br>";
|
||||
}
|
||||
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -1,279 +0,0 @@
|
||||
<?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) 2018
|
||||
the Initial Developer. All Rights Reserved.
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//includes
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
if (!permission_exists('access_control_node_add') && !permission_exists('access_control_node_edit')) {
|
||||
echo "access denied"; exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//action add or update
|
||||
if (is_uuid($_REQUEST["id"])) {
|
||||
$action = "update";
|
||||
$access_control_node_uuid = $_REQUEST["id"];
|
||||
}
|
||||
else {
|
||||
$action = "add";
|
||||
}
|
||||
|
||||
//set the parent uuid
|
||||
if (is_uuid($_GET["access_control_uuid"])) {
|
||||
$access_control_uuid = $_GET["access_control_uuid"];
|
||||
}
|
||||
|
||||
//get http post variables and set them to php variables
|
||||
if (count($_POST)>0) {
|
||||
$node_type = $_POST["node_type"];
|
||||
$node_cidr = $_POST["node_cidr"];
|
||||
$node_domain = $_POST["node_domain"];
|
||||
$node_description = $_POST["node_description"];
|
||||
}
|
||||
|
||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//get the uuid
|
||||
if ($action == "update" && is_uuid($_POST["access_control_node_uuid"])) {
|
||||
$access_control_node_uuid = $_POST["access_control_node_uuid"];
|
||||
}
|
||||
|
||||
//validate the token
|
||||
$token = new token;
|
||||
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||
message::add($text['message-invalid_token'],'negative');
|
||||
header('Location: access_controls.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
//check for all required data
|
||||
$msg = '';
|
||||
if (strlen($node_type) == 0) { $msg .= $text['message-required']." ".$text['label-node_type']."<br>\n"; }
|
||||
//if (strlen($node_cidr) == 0) { $msg .= $text['message-required']." ".$text['label-node_cidr']."<br>\n"; }
|
||||
//if (strlen($node_domain) == 0) { $msg .= $text['message-required']." ".$text['label-node_domain']."<br>\n"; }
|
||||
//if (strlen($node_description) == 0) { $msg .= $text['message-required']." ".$text['label-node_description']."<br>\n"; }
|
||||
|
||||
// check IPv4 and IPv6 CIDR notation
|
||||
$pattern4 = '/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$/';
|
||||
$pattern6 = '/^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*(\/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))$/';
|
||||
|
||||
if ($node_cidr != '' && (preg_match($pattern4, $node_cidr) == 0) && (preg_match($pattern6, $node_cidr) == 0)) {
|
||||
$msg .= $text['message-required']." ".$text['label-node_cidr']."<br>\n";
|
||||
}
|
||||
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table><tr><td>\n";
|
||||
echo $msg."<br />";
|
||||
echo "</td></tr></table>\n";
|
||||
persistformvar($_POST);
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
}
|
||||
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
if ($action == "add" && permission_exists('access_control_node_add')) {
|
||||
|
||||
//insert
|
||||
$array['access_control_nodes'][0]['access_control_node_uuid'] = uuid();
|
||||
$array['access_control_nodes'][0]['access_control_uuid'] = $access_control_uuid;
|
||||
$array['access_control_nodes'][0]['node_type'] = $node_type;
|
||||
$array['access_control_nodes'][0]['node_cidr'] = $node_cidr;
|
||||
$array['access_control_nodes'][0]['node_domain'] = $node_domain;
|
||||
$array['access_control_nodes'][0]['node_description'] = $node_description;
|
||||
$database = new database;
|
||||
$database->app_name = 'access_controls';
|
||||
$database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
|
||||
$database->save($array);
|
||||
unset($array);
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("configuration:acl.conf");
|
||||
|
||||
//create the event socket connection
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) { event_socket_request($fp, "api reloadacl"); }
|
||||
|
||||
//add the message
|
||||
message::add($text['message-add']);
|
||||
|
||||
//redirect the browser
|
||||
header('Location: access_control_edit.php?id='.escape($access_control_uuid));
|
||||
return;
|
||||
|
||||
} //if ($action == "add")
|
||||
|
||||
if ($action == "update" && permission_exists('access_control_node_edit')) {
|
||||
|
||||
//update
|
||||
$array['access_control_nodes'][0]['access_control_node_uuid'] = $access_control_node_uuid;
|
||||
$array['access_control_nodes'][0]['access_control_uuid'] = $access_control_uuid;
|
||||
$array['access_control_nodes'][0]['node_type'] = $node_type;
|
||||
$array['access_control_nodes'][0]['node_cidr'] = $node_cidr;
|
||||
$array['access_control_nodes'][0]['node_domain'] = $node_domain;
|
||||
$array['access_control_nodes'][0]['node_description'] = $node_description;
|
||||
$database = new database;
|
||||
$database->app_name = 'access_controls';
|
||||
$database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
|
||||
$database->save($array);
|
||||
unset($array);
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("configuration:acl.conf");
|
||||
|
||||
//create the event socket connection
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) { event_socket_request($fp, "api reloadacl"); }
|
||||
|
||||
//add the message
|
||||
message::add($text['message-update']);
|
||||
|
||||
//redirect the browser
|
||||
header('Location: access_control_edit.php?id='.escape($access_control_uuid));
|
||||
return;
|
||||
|
||||
} //if ($action == "update")
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
|
||||
//pre-populate the form
|
||||
if (count($_GET) > 0 && $_POST["persistformvar"] != "true" && is_uuid($_GET["id"])) {
|
||||
$access_control_node_uuid = $_GET["id"];
|
||||
$sql = "select * from v_access_control_nodes ";
|
||||
$sql .= "where access_control_node_uuid = :access_control_node_uuid ";
|
||||
$parameters['access_control_node_uuid'] = $access_control_node_uuid;
|
||||
$database = new database;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (is_array($row) && sizeof($row) != 0) {
|
||||
$node_type = $row["node_type"];
|
||||
$node_cidr = $row["node_cidr"];
|
||||
$node_domain = $row["node_domain"];
|
||||
$node_description = $row["node_description"];
|
||||
}
|
||||
unset($sql, $parameters, $row);
|
||||
}
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
$token = $object->create($_SERVER['PHP_SELF']);
|
||||
|
||||
//show the header
|
||||
$document['title'] = $text['title-access_control_node'];
|
||||
require_once "resources/header.php";
|
||||
|
||||
//show the content
|
||||
echo "<form method='post' name='frm' id='frm'>\n";
|
||||
|
||||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'><b>".$text['title-access_control_node']."</b></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'=>'access_control_edit.php?id='.urlencode($access_control_uuid)]);
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save']);
|
||||
echo " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-node_type']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td width='70%' class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='node_type'>\n";
|
||||
if ($node_type == "allow") {
|
||||
echo " <option value='allow' selected='selected'>".$text['label-allow']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='allow'>".$text['label-allow']."</option>\n";
|
||||
}
|
||||
if ($node_type == "deny") {
|
||||
echo " <option value='deny' selected='selected'>".$text['label-deny']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='deny'>".$text['label-deny']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-node_type']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-node_cidr']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='node_cidr' maxlength='255' value=\"".escape($node_cidr)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-node_cidr']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-node_domain']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='node_domain' maxlength='255' value=\"".escape($node_domain)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-node_domain']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-node_description']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='node_description' maxlength='255' value=\"".escape($node_description)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-node_description']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "</table>";
|
||||
echo "<br><br>";
|
||||
|
||||
echo "<input type='hidden' name='access_control_uuid' value='".escape($access_control_uuid)."'>\n";
|
||||
if ($action == "update") {
|
||||
echo "<input type='hidden' name='access_control_node_uuid' value='".escape($access_control_node_uuid)."'>\n";
|
||||
}
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
|
||||
echo "</form>";
|
||||
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
@@ -1,197 +0,0 @@
|
||||
<?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) 2019
|
||||
the Initial Developer. All Rights Reserved.
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//includes
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
require_once "resources/paging.php";
|
||||
|
||||
//check permissions
|
||||
if (!permission_exists('access_control_node_view')) {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//get the http post data
|
||||
if ($_POST['action'] != '') {
|
||||
$action = $_POST['action'];
|
||||
$access_control_uuid = $_POST['access_control_uuid'];
|
||||
$access_control_nodes = $_POST['access_control_nodes'];
|
||||
|
||||
//process the http post data by action
|
||||
if (is_array($access_control_nodes) && @sizeof($access_control_nodes) != 0) {
|
||||
switch ($action) {
|
||||
case 'delete':
|
||||
if (permission_exists('access_control_node_delete')) {
|
||||
$obj = new access_controls;
|
||||
$obj->delete_nodes($access_control_nodes);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//redirect
|
||||
header('Location: access_control_edit.php?id='.urlencode($access_control_uuid));
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//get variables used to control the order
|
||||
$order_by = $_GET["order_by"];
|
||||
$order = $_GET["order"];
|
||||
|
||||
//prepare to page the results
|
||||
$sql = "select count(*) from v_access_control_nodes ";
|
||||
$sql .= "where access_control_uuid = :access_control_uuid ";
|
||||
$parameters['access_control_uuid'] = $access_control_uuid;
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, $parameters, 'column');
|
||||
|
||||
//prepare to page the results
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = "&id=".escape($access_control_uuid);
|
||||
if (isset($_GET['page'])) {
|
||||
$page = $_GET['page'];
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
|
||||
$offset = $rows_per_page * $page;
|
||||
}
|
||||
|
||||
//get the list
|
||||
$sql = "select * from v_access_control_nodes ";
|
||||
$sql .= "where access_control_uuid = :access_control_uuid ";
|
||||
$sql .= order_by($order_by, $order);
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$parameters['access_control_uuid'] = $access_control_uuid;
|
||||
$database = new database;
|
||||
$access_control_nodes = $database->select($sql, $parameters);
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
$token = $object->create('/app/access_controls/access_control_nodes.php');
|
||||
|
||||
//show the content
|
||||
echo "<form id='form_list' method='post' action='access_control_nodes.php'>\n";
|
||||
echo "<input type='hidden' name='action' id='action' value=''>\n";
|
||||
echo "<input type='hidden' name='access_control_uuid' value='".escape($access_control_uuid)."'>\n";
|
||||
|
||||
echo "<div class='action_bar' id='action_bar_sub'>\n";
|
||||
echo " <div class='heading'><b id='heading_sub'>".$text['title-access_control_nodes']." (".$num_rows.")</b></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
echo button::create(['type'=>'button','id'=>'action_bar_sub_button_back','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'collapse'=>'hide-xs','style'=>'margin-right: 15px; display: none;','link'=>'access_controls.php']);
|
||||
if (permission_exists('access_control_node_add')) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','collapse'=>'hide-xs','link'=>'access_control_node_edit.php?access_control_uuid='.urlencode($_GET['id'])]);
|
||||
}
|
||||
if (permission_exists('access_control_node_delete') && $access_control_nodes) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','collapse'=>'hide-xs','onclick'=>"modal_open('modal-delete-access-control-node','btn_delete_access_control_node');"]);
|
||||
}
|
||||
echo " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
if (permission_exists('access_control_node_delete') && $access_control_nodes) {
|
||||
echo modal::create(['id'=>'modal-delete-access-control-node','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete_access_control_node','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
|
||||
echo "<table class='list'>\n";
|
||||
echo "<tr class='list-header'>\n";
|
||||
if (permission_exists('access_control_node_delete')) {
|
||||
echo " <th class='checkbox'>\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle();' ".($access_control_nodes ?: "style='visibility: hidden;'").">\n";
|
||||
echo " </th>\n";
|
||||
}
|
||||
echo th_order_by('node_type', $text['label-node_type'], $order_by, $order);
|
||||
echo th_order_by('node_cidr', $text['label-node_cidr'], $order_by, $order);
|
||||
echo th_order_by('node_domain', $text['label-node_domain'], $order_by, $order);
|
||||
echo th_order_by('node_description', $text['label-node_description'], $order_by, $order, null, "class='hide-sm-dn'");
|
||||
if (permission_exists('access_control_node_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
if (is_array($access_control_nodes) && @sizeof($access_control_nodes) != 0) {
|
||||
$x = 0;
|
||||
foreach ($access_control_nodes as $row) {
|
||||
if (permission_exists('access_control_node_edit')) {
|
||||
$list_row_url = 'access_control_node_edit.php?access_control_uuid='.urlencode($row['access_control_uuid'])."&id=".urlencode($row['access_control_node_uuid']);
|
||||
}
|
||||
echo "<tr class='list-row' href='".$list_row_url."'>\n";
|
||||
if (permission_exists('access_control_node_delete')) {
|
||||
echo " <td class='checkbox'>\n";
|
||||
echo " <input type='checkbox' name='access_control_nodes[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"if (!this.checked) { document.getElementById('checkbox_all').checked = false; }\">\n";
|
||||
echo " <input type='hidden' name='access_control_nodes[$x][uuid]' value='".escape($row['access_control_node_uuid'])."' />\n";
|
||||
echo " </td>\n";
|
||||
}
|
||||
echo " <td>".escape($row['node_type'])." </td>\n";
|
||||
echo " <td>\n";
|
||||
if (permission_exists('access_control_node_edit')) {
|
||||
echo " <a href='".$list_row_url."' title=\"".$text['button-edit']."\">".escape($row['node_cidr'])."</a>\n";
|
||||
}
|
||||
else {
|
||||
echo " ".escape($row['node_cidr']);
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " <td>".escape($row['node_domain'])." </td>\n";
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['node_description'])." </td>\n";
|
||||
if (permission_exists('access_control_node_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
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";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
$x++;
|
||||
}
|
||||
unset($access_control_nodes);
|
||||
}
|
||||
|
||||
echo "</table>\n";
|
||||
echo "<br />\n";
|
||||
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
echo "</form>\n";
|
||||
|
||||
//make sub action bar sticky
|
||||
echo "<script>\n";
|
||||
|
||||
echo " window.addEventListener('scroll', function(){\n";
|
||||
echo " action_bar_scroll('action_bar_sub', 270, heading_modify, heading_restore);\n";
|
||||
echo " }, false);\n";
|
||||
|
||||
echo " function heading_modify() {\n";
|
||||
echo " document.getElementById('heading_sub').innerHTML = \"".$text['title-access_control'].' '.$text['title-access_control_nodes']." (".$num_rows.")\";\n";
|
||||
echo " document.getElementById('action_bar_sub_button_back').style.display = 'inline-block';\n";
|
||||
echo " }\n";
|
||||
|
||||
echo " function heading_restore() {\n";
|
||||
echo " document.getElementById('heading_sub').innerHTML = \"".$text['title-access_control_nodes']." (".$num_rows.")\";\n";
|
||||
echo " document.getElementById('action_bar_sub_button_back').style.display = 'none';\n";
|
||||
echo " }\n";
|
||||
|
||||
echo "</script>\n";
|
||||
|
||||
//include the footer
|
||||
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) 2018
|
||||
Portions created by the Initial Developer are Copyright (C) 2018 - 2020
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -28,18 +28,21 @@
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
require_once "resources/paging.php";
|
||||
|
||||
//check permissions
|
||||
if (!permission_exists('access_control_view')) {
|
||||
echo "access denied"; exit;
|
||||
if (permission_exists('access_control_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//get posted data
|
||||
//get the http post data
|
||||
if (is_array($_POST['access_controls'])) {
|
||||
$action = $_POST['action'];
|
||||
$search = $_POST['search'];
|
||||
@@ -48,60 +51,89 @@
|
||||
|
||||
//process the http post data by action
|
||||
if ($action != '' && is_array($access_controls) && @sizeof($access_controls) != 0) {
|
||||
|
||||
//validate the token
|
||||
$token = new token;
|
||||
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||
message::add($text['message-invalid_token'],'negative');
|
||||
header('Location: access_controls.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
//prepare the array
|
||||
foreach($access_controls as $row) {
|
||||
$array['access_controls'][$x]['checked'] = $row['checked'];
|
||||
$array['access_controls'][$x]['access_control_uuid'] = $row['access_control_uuid'];
|
||||
$x++;
|
||||
}
|
||||
|
||||
//prepare the database object
|
||||
$database = new database;
|
||||
$database->app_name = 'access_controls';
|
||||
$database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
|
||||
|
||||
//send the array to the database class
|
||||
switch ($action) {
|
||||
case 'copy':
|
||||
if (permission_exists('access_control_add')) {
|
||||
$obj = new access_controls;
|
||||
$obj->copy($access_controls);
|
||||
$database->copy($array);
|
||||
}
|
||||
break;
|
||||
case 'toggle':
|
||||
if (permission_exists('access_control_edit')) {
|
||||
$database->toggle($array);
|
||||
}
|
||||
break;
|
||||
case 'delete':
|
||||
if (permission_exists('access_control_delete')) {
|
||||
$obj = new access_controls;
|
||||
$obj->delete($access_controls);
|
||||
$database->delete($array);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
//redirect the user
|
||||
header('Location: access_controls.php'.($search != '' ? '?search='.urlencode($search) : null));
|
||||
exit;
|
||||
}
|
||||
|
||||
//get variables used to control the order
|
||||
//get order and order by
|
||||
$order_by = $_GET["order_by"];
|
||||
$order = $_GET["order"];
|
||||
|
||||
//add the search term
|
||||
$search = strtolower($_GET["search"]);
|
||||
if (strlen($search) > 0) {
|
||||
$sql_search = " (";
|
||||
$sql_search .= "lower(access_control_name) like :search ";
|
||||
$sql_search .= "or lower(access_control_default) like :search ";
|
||||
$sql_search .= "or lower(access_control_description) like :search ";
|
||||
$sql_search .= ") ";
|
||||
//add the search
|
||||
if (isset($_GET["search"])) {
|
||||
$search = strtolower($_GET["search"]);
|
||||
$parameters['search'] = '%'.$search.'%';
|
||||
}
|
||||
|
||||
//prepare to page the results
|
||||
$sql = "select count(*) from v_access_controls ";
|
||||
if (isset($sql_search)) {
|
||||
$sql .= "where ".$sql_search;
|
||||
//get the count
|
||||
$sql = "select count(access_control_uuid) ";
|
||||
$sql .= "from v_access_controls ";
|
||||
if (isset($_GET["search"])) {
|
||||
$sql .= "where (";
|
||||
$sql .= " lower(access_control_name) like :search ";
|
||||
$sql .= " or lower(access_control_default) like :search ";
|
||||
$sql .= " or lower(access_control_description) like :search ";
|
||||
$sql .= ") ";
|
||||
}
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, $parameters, 'column');
|
||||
|
||||
//prepare to page the results
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = "&search=".$search;
|
||||
$page = $_GET['page'];
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
|
||||
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
//get the list
|
||||
$sql = str_replace('count(*)', '*', $sql);
|
||||
$sql .= order_by($order_by, $order);
|
||||
$sql = "select ";
|
||||
$sql .= "access_control_uuid, ";
|
||||
$sql .= "access_control_name, ";
|
||||
$sql .= "access_control_default, ";
|
||||
$sql .= "access_control_description ";
|
||||
$sql .= "from v_access_controls ";
|
||||
if (isset($_GET["search"])) {
|
||||
$sql .= "where (";
|
||||
$sql .= " lower(access_control_name) like :search ";
|
||||
$sql .= " or lower(access_control_default) like :search ";
|
||||
$sql .= " or lower(access_control_description) like :search ";
|
||||
$sql .= ") ";
|
||||
}
|
||||
$sql .= order_by($order_by, $order, 'access_control_name', 'asc');
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$database = new database;
|
||||
$access_controls = $database->select($sql, $parameters, 'all');
|
||||
@@ -111,7 +143,7 @@
|
||||
$object = new token;
|
||||
$token = $object->create($_SERVER['PHP_SELF']);
|
||||
|
||||
//include the header
|
||||
//additional includes
|
||||
$document['title'] = $text['title-access_controls'];
|
||||
require_once "resources/header.php";
|
||||
|
||||
@@ -120,20 +152,20 @@
|
||||
echo " <div class='heading'><b>".$text['title-access_controls']." (".$num_rows.")</b></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
if (permission_exists('access_control_add')) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','link'=>'access_control_edit.php']);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','name'=>'btn_add','link'=>'access_control_edit.php']);
|
||||
}
|
||||
if (permission_exists('access_control_add') && $access_controls) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'name'=>'btn_copy','onclick'=>"modal_open('modal-copy','btn_copy');"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','name'=>'btn_copy','style'=>'display:none;','onclick'=>"modal_open('modal-copy','btn_copy');"]);
|
||||
}
|
||||
if (permission_exists('access_control_delete') && $access_controls) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','onclick'=>"modal_open('modal-delete','btn_delete');"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','name'=>'btn_delete','style'=>'display:none;','onclick'=>"modal_open('modal-delete','btn_delete');"]);
|
||||
}
|
||||
echo "<form id='form_search' class='inline' method='get'>\n";
|
||||
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown='list_search_reset();'>";
|
||||
echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search','style'=>($search != '' ? 'display: none;' : null)]);
|
||||
echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'access_controls.php','style'=>($search == '' ? 'display: none;' : null)]);
|
||||
if ($paging_controls_mini != '') {
|
||||
echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>";
|
||||
echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>\n";
|
||||
}
|
||||
echo " </form>\n";
|
||||
echo " </div>\n";
|
||||
@@ -147,7 +179,7 @@
|
||||
echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
|
||||
echo $text['description-access_control']."\n";
|
||||
echo $text['title_description-access_controls']."\n";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
echo "<form id='form_list' method='post'>\n";
|
||||
@@ -156,37 +188,44 @@
|
||||
|
||||
echo "<table class='list'>\n";
|
||||
echo "<tr class='list-header'>\n";
|
||||
if (permission_exists('access_control_add') || permission_exists('access_control_delete')) {
|
||||
if (permission_exists('access_control_add') || permission_exists('access_control_edit') || permission_exists('access_control_delete')) {
|
||||
echo " <th class='checkbox'>\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle();' ".($access_controls ?: "style='visibility: hidden;'").">\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".($access_controls ?: "style='visibility: hidden;'").">\n";
|
||||
echo " </th>\n";
|
||||
}
|
||||
echo th_order_by('access_control_name', $text['label-access_control_name'], $order_by, $order);
|
||||
echo th_order_by('access_control_default', $text['label-access_control_default'], $order_by, $order);
|
||||
echo th_order_by('access_control_description', $text['label-access_control_description'], $order_by, $order, null, "class='hide-xs'");
|
||||
echo " <th class='hide-sm-dn'>".$text['label-access_control_description']."</th>\n";
|
||||
if (permission_exists('access_control_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
if (is_array($access_controls)) {
|
||||
if (is_array($access_controls) && @sizeof($access_controls) != 0) {
|
||||
$x = 0;
|
||||
foreach($access_controls as $row) {
|
||||
foreach ($access_controls as $row) {
|
||||
if (permission_exists('access_control_edit')) {
|
||||
$list_row_url = "access_control_edit.php?id=".urlencode($row['access_control_uuid']);
|
||||
}
|
||||
echo "<tr class='list-row' href='".$list_row_url."'>\n";
|
||||
if (permission_exists('access_control_add') || permission_exists('access_control_delete')) {
|
||||
if (permission_exists('access_control_add') || permission_exists('access_control_edit') || permission_exists('access_control_delete')) {
|
||||
echo " <td class='checkbox'>\n";
|
||||
echo " <input type='checkbox' name='access_controls[".$x."][checked]' id='checkbox_".$x."' value='true' onclick=\"if (!this.checked) { document.getElementById('checkbox_all').checked = false; }\">\n";
|
||||
echo " <input type='hidden' name='access_controls[".$x."][uuid]' value='".escape($row['access_control_uuid'])."' />\n";
|
||||
echo " <input type='checkbox' name='access_controls[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"checkbox_on_change(this); if (!this.checked) { document.getElementById('checkbox_all').checked = false; }\">\n";
|
||||
echo " <input type='hidden' name='access_controls[$x][access_control_uuid]' value='".escape($row['access_control_uuid'])."' />\n";
|
||||
echo " </td>\n";
|
||||
}
|
||||
echo " <td><a href='".$list_row_url."'>".escape($row['access_control_name'])."</a></td>\n";
|
||||
echo " <td>\n";
|
||||
if (permission_exists('access_control_edit')) {
|
||||
echo " <a href='".$list_row_url."' title=\"".$text['button-edit']."\">".escape($row['access_control_name'])."</a>\n";
|
||||
}
|
||||
else {
|
||||
echo " ".escape($row['access_control_name']);
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " <td>".escape($row['access_control_default'])."</td>\n";
|
||||
echo " <td class='description overflow hide-xs'>".escape($row['access_control_description'])."</td>\n";
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['access_control_description'])."</td>\n";
|
||||
if (permission_exists('access_control_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
echo " <td class='action-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";
|
||||
}
|
||||
@@ -207,4 +246,4 @@
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -85,6 +85,27 @@ $text['title-access_control']['ru-ru'] = "Управление доступом"
|
||||
$text['title-access_control']['sv-se'] = "Åtkomstkontroll";
|
||||
$text['title-access_control']['uk-ua'] = "Управління доступом";
|
||||
|
||||
$text['title_description-access_controls']['en-us'] = "Access control list can allow or deny ranges of IP addresses.";
|
||||
$text['title_description-access_controls']['en-gb'] = "Access control list can allow or deny ranges of IP addresses.";
|
||||
$text['title_description-access_controls']['ar-eg'] = "قائمة التحكم بالوصول يمكن السماح أو الرفض نطاقات العناوين.";
|
||||
$text['title_description-access_controls']['de-at'] = " Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen."; //copied from de-de
|
||||
$text['title_description-access_controls']['de-ch'] = " Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen."; //copied from de-de
|
||||
$text['title_description-access_controls']['de-de'] = " Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen.";
|
||||
$text['title_description-access_controls']['es-cl'] = " Lista de control de acceso puede permitir o denegar los rangos de direcciones IP.";
|
||||
$text['title_description-access_controls']['es-mx'] = " Lista de control de acceso puede permitir o denegar los rangos de direcciones IP."; //copied from es-cl
|
||||
$text['title_description-access_controls']['fr-ca'] = " Liste de contrôle d'accès peut autoriser ou refuser des plages d'adresses IP."; //copied from fr-fr
|
||||
$text['title_description-access_controls']['fr-fr'] = " Liste de contrôle d'accès peut autoriser ou refuser des plages d'adresses IP.";
|
||||
$text['title_description-access_controls']['he-il'] = " רשימת בקרת גישה יכולה לאפשר או למנוע טווחים של כתובות IP.";
|
||||
$text['title_description-access_controls']['it-it'] = "Le liste per il controllo di accesso permettono o negano l'accesso a range di IP.";
|
||||
$text['title_description-access_controls']['nl-nl'] = "Toegang Controle lijst kan IP adres reeks toestaan of verbieden.";
|
||||
$text['title_description-access_controls']['pl-pl'] = "Lista kontroli dostępu może umożliwić lub zablokować zakresy adresów IP.";
|
||||
$text['title_description-access_controls']['pt-br'] = "Lista de controle de acesso pode permitir ou negar intervalos de endereços IP."; //copied from pt-pt
|
||||
$text['title_description-access_controls']['pt-pt'] = "Lista de controle de acesso pode permitir ou negar intervalos de endereços IP.";
|
||||
$text['title_description-access_controls']['ro-ro'] = "Lista de control al accesului poate permite sau refuza intervale de adrese IP.";
|
||||
$text['title_description-access_controls']['ru-ru'] = "Контроль доступа может разрешить или запретить диапазоны IP адресов.";
|
||||
$text['title_description-access_controls']['sv-se'] = "Åtkomstkontrollista kan tillåta eller neka intervall av IP-adresser.";
|
||||
$text['title_description-access_controls']['uk-ua'] = "Список контролю доступу може дозволити або заборонити діапазони IP-адрес.";
|
||||
|
||||
$text['label-node_type']['en-us'] = "Type";
|
||||
$text['label-node_type']['en-gb'] = "Type";
|
||||
$text['label-node_type']['ar-eg'] = "اكتب";
|
||||
@@ -421,25 +442,4 @@ $text['description-access_control_default']['ru-ru'] = "Выберите тип
|
||||
$text['description-access_control_default']['sv-se'] = "Välj standardtypen.";
|
||||
$text['description-access_control_default']['uk-ua'] = "Вибір типу за замовчуванням.";
|
||||
|
||||
$text['description-access_control']['en-us'] = "Access control list can allow or deny ranges of IP addresses.";
|
||||
$text['description-access_control']['en-gb'] = "Access control list can allow or deny ranges of IP addresses.";
|
||||
$text['description-access_control']['ar-eg'] = "قائمة التحكم بالوصول يمكن السماح أو الرفض نطاقات العناوين.";
|
||||
$text['description-access_control']['de-at'] = " Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen."; //copied from de-de
|
||||
$text['description-access_control']['de-ch'] = " Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen."; //copied from de-de
|
||||
$text['description-access_control']['de-de'] = " Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen.";
|
||||
$text['description-access_control']['es-cl'] = " Lista de control de acceso puede permitir o denegar los rangos de direcciones IP.";
|
||||
$text['description-access_control']['es-mx'] = " Lista de control de acceso puede permitir o denegar los rangos de direcciones IP."; //copied from es-cl
|
||||
$text['description-access_control']['fr-ca'] = " Liste de contrôle d'accès peut autoriser ou refuser des plages d'adresses IP."; //copied from fr-fr
|
||||
$text['description-access_control']['fr-fr'] = " Liste de contrôle d'accès peut autoriser ou refuser des plages d'adresses IP.";
|
||||
$text['description-access_control']['he-il'] = " רשימת בקרת גישה יכולה לאפשר או למנוע טווחים של כתובות IP.";
|
||||
$text['description-access_control']['it-it'] = "Le liste per il controllo di accesso permettono o negano l'accesso a range di IP.";
|
||||
$text['description-access_control']['nl-nl'] = "Toegang Controle lijst kan IP adres reeks toestaan of verbieden.";
|
||||
$text['description-access_control']['pl-pl'] = "Lista kontroli dostępu może umożliwić lub zablokować zakresy adresów IP.";
|
||||
$text['description-access_control']['pt-br'] = "Lista de controle de acesso pode permitir ou negar intervalos de endereços IP."; //copied from pt-pt
|
||||
$text['description-access_control']['pt-pt'] = "Lista de controle de acesso pode permitir ou negar intervalos de endereços IP.";
|
||||
$text['description-access_control']['ro-ro'] = "Lista de control al accesului poate permite sau refuza intervale de adrese IP.";
|
||||
$text['description-access_control']['ru-ru'] = "Контроль доступа может разрешить или запретить диапазоны IP адресов.";
|
||||
$text['description-access_control']['sv-se'] = "Åtkomstkontrollista kan tillåta eller neka intervall av IP-adresser.";
|
||||
$text['description-access_control']['uk-ua'] = "Список контролю доступу може дозволити або заборонити діапазони IP-адрес.";
|
||||
|
||||
?>
|
||||
|
||||
@@ -233,6 +233,8 @@
|
||||
url += '&vd_ext_from=' + document.getElementById('vd_ext_from').value;
|
||||
url += '&vd_ext_to=' + document.getElementById('vd_ext_to').value;
|
||||
url += '&group=' + ((document.getElementById('group')) ? document.getElementById('group').value : '');
|
||||
url += '&extension_filter=' + ((document.getElementById('extension_filter')) ? document.getElementById('extension_filter').value : '');
|
||||
url += '&name_filter=' + ((document.getElementById('name_filter')) ? document.getElementById('name_filter').value : '');
|
||||
url += '&eavesdrop_dest=' + ((document.getElementById('eavesdrop_dest')) ? document.getElementById('eavesdrop_dest').value : '');
|
||||
if (document.getElementById('sort1'))
|
||||
if (document.getElementById('sort1').value == '1') url += '&sort';
|
||||
@@ -320,6 +322,8 @@
|
||||
url += '&vd_ext_from=' + document.getElementById('vd_ext_from').value;
|
||||
url += '&vd_ext_to=' + document.getElementById('vd_ext_to').value;
|
||||
url += '&group=' + ((document.getElementById('group')) ? document.getElementById('group').value : '');
|
||||
url += '&extension_filter=' + ((document.getElementById('extension_filter')) ? document.getElementById('extension_filter').value : '');
|
||||
url += '&name_filter=' + ((document.getElementById('name_filter')) ? document.getElementById('name_filter').value : '');
|
||||
url += '&eavesdrop_dest=' + ((document.getElementById('eavesdrop_dest')) ? document.getElementById('eavesdrop_dest').value : '');
|
||||
if (document.getElementById('sort1'))
|
||||
if (document.getElementById('sort1').value == '1') url += '&sort';
|
||||
|
||||
@@ -67,6 +67,7 @@ if (!class_exists('basic_operator_panel')) {
|
||||
$sql .= "e.extension, ";
|
||||
$sql .= "e.number_alias, ";
|
||||
$sql .= "e.effective_caller_id_name, ";
|
||||
$sql .= "lower(e.effective_caller_id_name) as filter_name, ";
|
||||
$sql .= "e.effective_caller_id_number, ";
|
||||
$sql .= "e.call_group, ";
|
||||
$sql .= "e.description, ";
|
||||
|
||||
@@ -69,6 +69,9 @@
|
||||
$_SESSION['user']['extensions'] = array();
|
||||
}
|
||||
|
||||
//get registrations -- All SIP profiles
|
||||
$obj = new registrations;
|
||||
$registrations = $obj->get("all");
|
||||
|
||||
$onhover_pause_refresh = " onmouseover='refresh_stop();' onmouseout='refresh_start();'";
|
||||
|
||||
@@ -150,7 +153,13 @@ if (is_array($groups) && @sizeof($groups) > 0) {
|
||||
}
|
||||
echo " </td>";
|
||||
}
|
||||
|
||||
echo " <td valign='top' nowrap='nowrap'>";
|
||||
echo " <input type='hidden' id='extension_filter' value=\"".escape($_REQUEST['extension_filter'])."\">";
|
||||
echo " <input type='hidden' id='name_filter' value=\"".strtolower($_REQUEST['name_filter'])."\">";
|
||||
echo " <input type='text' class='formfld' placeholder='Filter Extension' value=\"".escape($_REQUEST['extension_filter'])."\" onkeyup=\"document.getElementById('extension_filter').value = this.value; refresh_start();\" onfocus='refresh_stop();'>\n";
|
||||
echo " <input type='text' class='formfld' placeholder='Filter Name' value=\"".strtolower($_REQUEST['name_filter'])."\" onkeyup=\"document.getElementById('name_filter').value = this.value; refresh_start();\" onfocus='refresh_stop();'>\n";
|
||||
echo " <input type='button' class='btn' title=\"Clear\" value=\"Clear\" onclick=\"document.getElementById('extension_filter').value = ''; document.getElementById('name_filter').value = '';\" ".$onhover_pause_refresh.">";
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo " </table>";
|
||||
|
||||
@@ -165,6 +174,10 @@ if (is_array($activity)) foreach ($activity as $extension => $ext) {
|
||||
//filter by group, if defined
|
||||
if ($_REQUEST['group'] != '' && substr_count($ext['call_group'], $_REQUEST['group']) == 0 && !in_array($extension, $_SESSION['user']['extensions'])) { continue; }
|
||||
|
||||
//filter by extension or name, if defined
|
||||
if ($_REQUEST['extension_filter'] != '' && substr_count($ext['extension'], $_REQUEST['extension_filter']) == 0 && !in_array($extension, $_SESSION['user']['extensions'])) { continue; }
|
||||
if ($_REQUEST['name_filter'] != '' && substr_count($ext['filter_name'], $_REQUEST['name_filter']) == 0 && !in_array($extension, $_SESSION['user']['extensions'])) { continue; }
|
||||
|
||||
//check if feature code being called
|
||||
$format_number = (substr($ext['dest'], 0, 1) == '*') ? false : true;
|
||||
|
||||
@@ -176,12 +189,18 @@ if (is_array($activity)) foreach ($activity as $extension => $ext) {
|
||||
else if ($ext['callstate'] == 'ACTIVE' && $ext['direction'] == 'outbound') {
|
||||
$ext_state = 'active';
|
||||
}
|
||||
else if ($ext['callstate'] == 'HELD' && $ext['direction'] == 'outbound') {
|
||||
$ext_state = 'held';
|
||||
}
|
||||
else if ($ext['callstate'] == 'RING_WAIT' && $ext['direction'] == 'outbound') {
|
||||
$ext_state = 'ringing';
|
||||
}
|
||||
else if ($ext['callstate'] == 'ACTIVE' && $ext['direction'] == 'inbound') {
|
||||
$ext_state = 'active';
|
||||
}
|
||||
else if ($ext['callstate'] == 'HELD' && $ext['direction'] == 'inbound') {
|
||||
$ext_state = 'held';
|
||||
}
|
||||
if (!$format_number) {
|
||||
$call_name = 'System';
|
||||
$call_number = $ext['dest'];
|
||||
@@ -214,6 +233,12 @@ if (is_array($activity)) foreach ($activity as $extension => $ext) {
|
||||
else if ($ext['state'] == 'CS_EXCHANGE_MEDIA' && $ext['callstate'] == 'ACTIVE' && $ext['direction'] == 'outbound') {
|
||||
$ext_state = 'active';
|
||||
}
|
||||
else if ($ext['state'] == 'CS_CONSUME_MEDIA' && $ext['callstate'] == 'HELD' && $ext['direction'] == 'outbound') {
|
||||
$ext_state = 'held';
|
||||
}
|
||||
else if ($ext['state'] == 'CS_EXCHANGE_MEDIA' && $ext['callstate'] == 'HELD' && $ext['direction'] == 'outbound') {
|
||||
$ext_state = 'held';
|
||||
}
|
||||
$dir_icon = 'inbound';
|
||||
$call_name = $activity[$ext['cid_num']]['effective_caller_id_name'];
|
||||
$call_number = format_phone($ext['cid_num']);
|
||||
@@ -222,8 +247,23 @@ if (is_array($activity)) foreach ($activity as $extension => $ext) {
|
||||
unset($ext_state, $dir_icon, $call_name, $call_number);
|
||||
}
|
||||
|
||||
//determine block style by state (if any)
|
||||
$style = ($ext_state != '') ? "op_state_".$ext_state : null;
|
||||
//determin extension register status
|
||||
$extension_number = $extension.'@'.$_SESSION['domain_name'];
|
||||
$found_count = 0;
|
||||
if (is_array($registrations)) {
|
||||
foreach ($registrations as $array) {
|
||||
if ($extension_number == $array['user']) {
|
||||
$found_count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($found_count > 0) {
|
||||
//determine block style by state (if any) and register status
|
||||
$style = ($ext_state != '') ? "op_ext op_state_".$ext_state : "op_ext";
|
||||
} else {
|
||||
$style = "off_ext";
|
||||
}
|
||||
unset($extension_number, $found_count, $array);
|
||||
|
||||
//determine the call identifier passed on drop
|
||||
if ($ext['uuid'] == $ext['call_uuid'] && $ext['variable_bridge_uuid'] == '') { // transfer an outbound internal call
|
||||
@@ -307,10 +347,10 @@ if (is_array($activity)) foreach ($activity as $extension => $ext) {
|
||||
default :
|
||||
$status_icon = "logged_out";
|
||||
$status_hover = $text['label-status_logged_out_or_unknown'];
|
||||
}
|
||||
}
|
||||
|
||||
$block .= "<div id='".escape($extension)."' class='op_ext ".$style."' ".(($_GET['vd_ext_from'] == $extension || $_GET['vd_ext_to'] == $extension) ? "style='border-style: dotted;'" : null)." ".(($ext_state != 'active' && $ext_state != 'ringing') ? "ondrop='drop(event, this.id);' ondragover='allowDrop(event, this.id);' ondragleave='discardDrop(event, this.id);'" : null).">"; // DRAG TO
|
||||
$block .= "<table class='op_ext ".$style."'>";
|
||||
$block .= "<div id='".escape($extension)."' class='".$style."' ".(($_GET['vd_ext_from'] == $extension || $_GET['vd_ext_to'] == $extension) ? "style='border-style: dotted;'" : null)." ".(($ext_state != 'active' && $ext_state != 'ringing') ? "ondrop='drop(event, this.id);' ondragover='allowDrop(event, this.id);' ondragleave='discardDrop(event, this.id);'" : null).">"; // DRAG TO
|
||||
$block .= "<table class='".$style."'>";
|
||||
$block .= " <tr>";
|
||||
$block .= " <td class='op_ext_icon'>";
|
||||
$block .= " <span name='".escape($extension)."'>"; // DRAG FROM
|
||||
|
||||
@@ -45,9 +45,10 @@
|
||||
//$apps[$x]['destinations'][$y]['sql'] = "select bridge_name, bridge_destination, bridge_description from v_bridges ";
|
||||
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and bridge_enabled = 'true'";
|
||||
$apps[$x]['destinations'][$y]['order_by'] = "bridge_name asc";
|
||||
$apps[$x]['destinations'][$y]['field']['bridge_uuid'] = "bridge_uuid";
|
||||
$apps[$x]['destinations'][$y]['field']['name'] = "bridge_name";
|
||||
$apps[$x]['destinations'][$y]['field']['destination'] = "bridge_destination";
|
||||
$apps[$x]['destinations'][$y]['field']['description'] = "bridge_description";
|
||||
$apps[$x]['destinations'][$y]['field']['destination'] = "bridge_destination";
|
||||
$apps[$x]['destinations'][$y]['select_value']['user_contact'] = "\${destination}";
|
||||
$apps[$x]['destinations'][$y]['select_value']['dialplan'] = "bridge:\${destination}";
|
||||
$apps[$x]['destinations'][$y]['select_value']['ivr'] = "menu-exec-app:bridge \${destination}";
|
||||
|
||||
@@ -82,8 +82,8 @@
|
||||
$order = $_GET["order"];
|
||||
|
||||
//add the search string
|
||||
$search = strtolower($_GET["search"]);
|
||||
if (strlen($search) > 0) {
|
||||
if (isset($_GET["search"])) {
|
||||
$search = strtolower($_GET["search"]);
|
||||
$sql_search = " (";
|
||||
$sql_search .= " lower(bridge_name) like :search ";
|
||||
$sql_search .= " or lower(bridge_destination) like :search ";
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
}
|
||||
|
||||
//get the extensions
|
||||
if (permission_exists('call_block_all')) {
|
||||
if (permission_exists('call_block_all') || permission_exists('call_block_extension')) {
|
||||
$sql = "select extension_uuid, extension, number_alias, user_context, description from v_extensions ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and enabled = 'true' ";
|
||||
@@ -263,7 +263,7 @@
|
||||
$extensions = $database->select($sql, $parameters);
|
||||
}
|
||||
|
||||
//get the extensions
|
||||
//get the voicemails
|
||||
$sql = "select voicemail_uuid, voicemail_id, voicemail_description ";
|
||||
$sql .= "from v_voicemails ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
|
||||
@@ -44,6 +44,10 @@
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_broadcast_caller_id";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_broadcast_delete";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
|
||||
@@ -401,28 +401,29 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
//echo "</td>\n";
|
||||
//echo "</tr>\n";
|
||||
|
||||
if (permission_exists("call_broadcast_caller_id")) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " ".$text['label-caller-id-name']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='broadcast_caller_id_name' maxlength='255' value=\"".escape($broadcast_caller_id_name)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo "".$text['description-caller-id-name']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " ".$text['label-caller-id-name']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='broadcast_caller_id_name' maxlength='255' value=\"".escape($broadcast_caller_id_name)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo "".$text['description-caller-id-name']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " ".$text['label-callerid-number']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='number' name='broadcast_caller_id_number' maxlength='255' min='0' step='1' value=\"".escape($broadcast_caller_id_number)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo "".$text['description-caller-id-number']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " ".$text['label-callerid-number']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='number' name='broadcast_caller_id_number' maxlength='255' min='0' step='1' value=\"".escape($broadcast_caller_id_number)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo "".$text['description-caller-id-number']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
/*
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
@@ -673,4 +674,4 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
|
||||
//if the event socket connection is lost then re-connect
|
||||
if (!$fp) {
|
||||
$fp = eventsocket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
}
|
||||
|
||||
//method 1
|
||||
|
||||
@@ -35,11 +35,12 @@
|
||||
$apps[$x]['destinations'][$y]['type'] = "sql";
|
||||
$apps[$x]['destinations'][$y]['label'] = "call_centers";
|
||||
$apps[$x]['destinations'][$y]['name'] = "call_centers";
|
||||
$apps[$x]['destinations'][$y]['sql'] = "select queue_extension as destination, queue_description as description from v_call_center_queues";
|
||||
$apps[$x]['destinations'][$y]['sql'] = "select queue_extension as destination, queue_extension as extension, queue_description as description from v_call_center_queues";
|
||||
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' ";
|
||||
$apps[$x]['destinations'][$y]['order_by'] = "queue_name asc";
|
||||
$apps[$x]['destinations'][$y]['field']['name'] = "queue_name";
|
||||
$apps[$x]['destinations'][$y]['field']['destination'] = "queue_extension";
|
||||
$apps[$x]['destinations'][$y]['field']['extension'] = "queue_extension";
|
||||
$apps[$x]['destinations'][$y]['field']['description'] = "queue_description";
|
||||
$apps[$x]['destinations'][$y]['select_value']['dialplan'] = "transfer:\${destination} XML \${context}";
|
||||
$apps[$x]['destinations'][$y]['select_value']['ivr'] = "menu-exec-app:transfer \${destination} XML \${context}";
|
||||
@@ -120,6 +121,15 @@
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_center_outbound_caller_id_name";
|
||||
//$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
//$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_center_outbound_caller_id_number";
|
||||
//$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
//$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
|
||||
//default settings
|
||||
$y = 0;
|
||||
@@ -360,6 +370,14 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "queue_outbound_caller_id_name";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "queue_outbound_caller_id_number";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "queue_announce_sound";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
|
||||
@@ -1471,6 +1471,48 @@ $text['label-caller_id_name_prefix']['ru-ru'] = "Префикс СallerID/Имя
|
||||
$text['label-caller_id_name_prefix']['sv-se'] = "Caller ID Namn Prefix";
|
||||
$text['label-caller_id_name_prefix']['uk-ua'] = "";
|
||||
|
||||
$text['label-outbound_caller_id_name']['en-us'] = "Outbound Caller ID Name";
|
||||
$text['label-outbound_caller_id_name']['en-gb'] = "Outbound Caller ID Name";
|
||||
$text['label-outbound_caller_id_name']['ar-eg'] = "";
|
||||
$text['label-outbound_caller_id_name']['de-at'] = "Ausgehende Anruferkennung (Name)"; //copied from de-de
|
||||
$text['label-outbound_caller_id_name']['de-ch'] = "Ausgehende Anruferkennung (Name)"; //copied from de-de
|
||||
$text['label-outbound_caller_id_name']['de-de'] = "Ausgehende Anruferkennung (Name)";
|
||||
$text['label-outbound_caller_id_name']['es-cl'] = "Nombre de Caller ID Saliente";
|
||||
$text['label-outbound_caller_id_name']['es-mx'] = "Nombre de Caller ID Saliente"; //copied from es-cl
|
||||
$text['label-outbound_caller_id_name']['fr-ca'] = "Nom de l'appelant sortant"; //copied from fr-fr
|
||||
$text['label-outbound_caller_id_name']['fr-fr'] = "Nom de l'appelant sortant";
|
||||
$text['label-outbound_caller_id_name']['he-il'] = "";
|
||||
$text['label-outbound_caller_id_name']['it-it'] = "ID Nome Chiamante Esterno";
|
||||
$text['label-outbound_caller_id_name']['nl-nl'] = "Uitgaand CID Naam";
|
||||
$text['label-outbound_caller_id_name']['pl-pl'] = "Nazwa prezentowana w rozmowach wychodzacych";
|
||||
$text['label-outbound_caller_id_name']['pt-br'] = "Nome de ID de Saída"; //copied from pt-pt
|
||||
$text['label-outbound_caller_id_name']['pt-pt'] = "Nome público";
|
||||
$text['label-outbound_caller_id_name']['ro-ro'] = "";
|
||||
$text['label-outbound_caller_id_name']['ru-ru'] = "Идентификатор (Caller ID) имени вызывающего абонента";
|
||||
$text['label-outbound_caller_id_name']['sv-se'] = "Utgående Namnpresentation";
|
||||
$text['label-outbound_caller_id_name']['uk-ua'] = "";
|
||||
|
||||
$text['label-outbound_caller_id_number']['en-us'] = "Outbound Caller ID Number";
|
||||
$text['label-outbound_caller_id_number']['en-gb'] = "Outbound Caller ID Number";
|
||||
$text['label-outbound_caller_id_number']['ar-eg'] = "";
|
||||
$text['label-outbound_caller_id_number']['de-at'] = "Ausgehende Anruferkennung (Nummer)"; //copied from de-de
|
||||
$text['label-outbound_caller_id_number']['de-ch'] = "Ausgehende Anruferkennung (Nummer)"; //copied from de-de
|
||||
$text['label-outbound_caller_id_number']['de-de'] = "Ausgehende Anruferkennung (Nummer)";
|
||||
$text['label-outbound_caller_id_number']['es-cl'] = "Número de Caller ID Saliente";
|
||||
$text['label-outbound_caller_id_number']['es-mx'] = "Número de Caller ID Saliente"; //copied from es-cl
|
||||
$text['label-outbound_caller_id_number']['fr-ca'] = "Numéro d'identification de l'appelant sortant"; //copied from fr-fr
|
||||
$text['label-outbound_caller_id_number']['fr-fr'] = "Numéro d'identification de l'appelant sortant";
|
||||
$text['label-outbound_caller_id_number']['he-il'] = "";
|
||||
$text['label-outbound_caller_id_number']['it-it'] = "ID Numero Chiamante Esterno";
|
||||
$text['label-outbound_caller_id_number']['nl-nl'] = "Uitgaand CID nummer";
|
||||
$text['label-outbound_caller_id_number']['pl-pl'] = "Numer prezentowany w rozmowach wychodzacych ";
|
||||
$text['label-outbound_caller_id_number']['pt-br'] = "Número de ID de Saída"; //copied from pt-pt
|
||||
$text['label-outbound_caller_id_number']['pt-pt'] = "Número público";
|
||||
$text['label-outbound_caller_id_number']['ro-ro'] = "";
|
||||
$text['label-outbound_caller_id_number']['ru-ru'] = "Идентификатор (Caller ID) номера вызывающего абонента";
|
||||
$text['label-outbound_caller_id_number']['sv-se'] = "Utgående Nummerpresentation";
|
||||
$text['label-outbound_caller_id_number']['uk-ua'] = "";
|
||||
|
||||
$text['label-caller_announce_sound']['en-us'] = "Announce Sound";
|
||||
$text['label-caller_announce_sound']['en-gb'] = "Announce Sound";
|
||||
$text['label-caller_announce_sound']['ar-eg'] = "";
|
||||
@@ -2458,6 +2500,90 @@ $text['description-contact']['ru-ru'] = "Выберите номер конта
|
||||
$text['description-contact']['sv-se'] = "Välj kontakt numret.";
|
||||
$text['description-contact']['uk-ua'] = "Призначити контакт в цей обліковий запис користувача.";
|
||||
|
||||
$text['description-outbound_caller_id_number-select']['en-us'] = "Select the external (public) caller ID number.";
|
||||
$text['description-outbound_caller_id_number-select']['en-gb'] = "Select the external (public) caller ID number.";
|
||||
$text['description-outbound_caller_id_number-select']['ar-eg'] = "";
|
||||
$text['description-outbound_caller_id_number-select']['de-at'] = "Wählen Sie die externe Anruferkennung (Nummer)."; //copied from de-de
|
||||
$text['description-outbound_caller_id_number-select']['de-ch'] = "Wählen Sie die externe Anruferkennung (Nummer)."; //copied from de-de
|
||||
$text['description-outbound_caller_id_number-select']['de-de'] = "Wählen Sie die externe Anruferkennung (Nummer).";
|
||||
$text['description-outbound_caller_id_number-select']['es-cl'] = "Seleccione el número de caller ID externo (público).";
|
||||
$text['description-outbound_caller_id_number-select']['es-mx'] = "Seleccione el número de caller ID externo (público)."; //copied from es-cl
|
||||
$text['description-outbound_caller_id_number-select']['fr-ca'] = "Choisir le numéro d'appelant affiché pour les appels externes (public)."; //copied from fr-fr
|
||||
$text['description-outbound_caller_id_number-select']['fr-fr'] = "Choisir le numéro d'appelant affiché pour les appels externes (public).";
|
||||
$text['description-outbound_caller_id_number-select']['he-il'] = "";
|
||||
$text['description-outbound_caller_id_number-select']['it-it'] = "Inserisci l'ID numero chiamante esterno (pubblico).";
|
||||
$text['description-outbound_caller_id_number-select']['nl-nl'] = "Kies het externe (openbare) CID nummer";
|
||||
$text['description-outbound_caller_id_number-select']['pl-pl'] = "Wybierz numer prezentowany w rozmowach wychodzących (na zewnątrz systemu)";
|
||||
$text['description-outbound_caller_id_number-select']['pt-br'] = "Escolha o número externo (público) do chamador.";
|
||||
$text['description-outbound_caller_id_number-select']['pt-pt'] = "Escolha o número externo (público) do chamador.";
|
||||
$text['description-outbound_caller_id_number-select']['ro-ro'] = "";
|
||||
$text['description-outbound_caller_id_number-select']['ru-ru'] = "Выберите внешний (публичный) caller ID номер.";
|
||||
$text['description-outbound_caller_id_number-select']['sv-se'] = "Välj det externa (publikt) nummervisningen här.";
|
||||
$text['description-outbound_caller_id_number-select']['uk-ua'] = "";
|
||||
|
||||
$text['description-outbound_caller_id_number']['en-us'] = "Enter the external (public) caller ID number here.";
|
||||
$text['description-outbound_caller_id_number']['en-gb'] = "Enter the external (public) caller ID number here.";
|
||||
$text['description-outbound_caller_id_number']['ar-eg'] = "";
|
||||
$text['description-outbound_caller_id_number']['de-at'] = "Geben Sie die externe Anruferkennung (Nummer) hier an."; //copied from de-de
|
||||
$text['description-outbound_caller_id_number']['de-ch'] = "Geben Sie die externe Anruferkennung (Nummer) hier an."; //copied from de-de
|
||||
$text['description-outbound_caller_id_number']['de-de'] = "Geben Sie die externe Anruferkennung (Nummer) hier an.";
|
||||
$text['description-outbound_caller_id_number']['es-cl'] = "Ingrese el número de caller ID externo (público) aquí.";
|
||||
$text['description-outbound_caller_id_number']['es-mx'] = "Ingrese el número de caller ID externo (público) aquí."; //copied from es-cl
|
||||
$text['description-outbound_caller_id_number']['fr-ca'] = "Numéro d'appelant affiché pour les appels externes (public)."; //copied from fr-fr
|
||||
$text['description-outbound_caller_id_number']['fr-fr'] = "Numéro d'appelant affiché pour les appels externes (public).";
|
||||
$text['description-outbound_caller_id_number']['he-il'] = "";
|
||||
$text['description-outbound_caller_id_number']['it-it'] = "Inserisci l'ID numero chiamante esterno (pubblico).";
|
||||
$text['description-outbound_caller_id_number']['nl-nl'] = "Voer het externe (openbaar) CID nummer hier in.";
|
||||
$text['description-outbound_caller_id_number']['pl-pl'] = "Wpisz numer prezentowany w rozmowach wychodzących (na zewnątrz systemu)";
|
||||
$text['description-outbound_caller_id_number']['pt-br'] = "Escolha o número externo (público) do chamador aqui.";
|
||||
$text['description-outbound_caller_id_number']['pt-pt'] = "Introduza o número externo (público) do chamador aqui.";
|
||||
$text['description-outbound_caller_id_number']['ro-ro'] = "";
|
||||
$text['description-outbound_caller_id_number']['ru-ru'] = "Введите внешний (публичный) caller ID номер.";
|
||||
$text['description-outbound_caller_id_number']['sv-se'] = "Ange det externa (publikt) nummervisningen här.";
|
||||
$text['description-outbound_caller_id_number']['uk-ua'] = "";
|
||||
|
||||
$text['description-outbound_caller_id_name-select']['en-us'] = "Select the external (public) caller ID name.";
|
||||
$text['description-outbound_caller_id_name-select']['en-gb'] = "Select the external (public) caller ID name.";
|
||||
$text['description-outbound_caller_id_name-select']['ar-eg'] = "";
|
||||
$text['description-outbound_caller_id_name-select']['de-at'] = "Wählen Sie die externe Anruferkennung (Name)."; //copied from de-de
|
||||
$text['description-outbound_caller_id_name-select']['de-ch'] = "Wählen Sie die externe Anruferkennung (Name)."; //copied from de-de
|
||||
$text['description-outbound_caller_id_name-select']['de-de'] = "Wählen Sie die externe Anruferkennung (Name).";
|
||||
$text['description-outbound_caller_id_name-select']['es-cl'] = "Seleccione el nombre de Caller ID externo (público).";
|
||||
$text['description-outbound_caller_id_name-select']['es-mx'] = "Seleccione el nombre de Caller ID externo (público)."; //copied from es-cl
|
||||
$text['description-outbound_caller_id_name-select']['fr-ca'] = "Choisir le nom d'appelant affiché pour les appels externes (public)."; //copied from fr-fr
|
||||
$text['description-outbound_caller_id_name-select']['fr-fr'] = "Choisir le nom d'appelant affiché pour les appels externes (public).";
|
||||
$text['description-outbound_caller_id_name-select']['he-il'] = "";
|
||||
$text['description-outbound_caller_id_name-select']['it-it'] = "Inserire l'ID nome chiamante esterno (pubblico).";
|
||||
$text['description-outbound_caller_id_name-select']['nl-nl'] = "Kies de externe (openbaar) CID naam";
|
||||
$text['description-outbound_caller_id_name-select']['pl-pl'] = "Wybierz nazwę prezentowaną w rozmowach wychodzących (na zewnątrz systemu)";
|
||||
$text['description-outbound_caller_id_name-select']['pt-br'] = "Escolha o nome externo (público) do chamador.";
|
||||
$text['description-outbound_caller_id_name-select']['pt-pt'] = "Escolha o nome externo (público) do chamador.";
|
||||
$text['description-outbound_caller_id_name-select']['ro-ro'] = "";
|
||||
$text['description-outbound_caller_id_name-select']['ru-ru'] = "Выберите внешнее (публичное) caller ID Имя.";
|
||||
$text['description-outbound_caller_id_name-select']['sv-se'] = "Välj det externa (publikt) namnvisningen här.";
|
||||
$text['description-outbound_caller_id_name-select']['uk-ua'] = "";
|
||||
|
||||
$text['description-outbound_caller_id_name']['en-us'] = "Enter the external (public) caller ID name here.";
|
||||
$text['description-outbound_caller_id_name']['en-gb'] = "Enter the external (public) caller ID name here.";
|
||||
$text['description-outbound_caller_id_name']['ar-eg'] = "";
|
||||
$text['description-outbound_caller_id_name']['de-at'] = "Geben Sie die externe Anruferkennung (Name) hier an."; //copied from de-de
|
||||
$text['description-outbound_caller_id_name']['de-ch'] = "Geben Sie die externe Anruferkennung (Name) hier an."; //copied from de-de
|
||||
$text['description-outbound_caller_id_name']['de-de'] = "Geben Sie die externe Anruferkennung (Name) hier an.";
|
||||
$text['description-outbound_caller_id_name']['es-cl'] = "Ingrese el el nombre de Caller ID externo (público) aquí.";
|
||||
$text['description-outbound_caller_id_name']['es-mx'] = "Ingrese el el nombre de Caller ID externo (público) aquí."; //copied from es-cl
|
||||
$text['description-outbound_caller_id_name']['fr-ca'] = "Nom d'appelant affiché pour les appels externes (public)."; //copied from fr-fr
|
||||
$text['description-outbound_caller_id_name']['fr-fr'] = "Nom d'appelant affiché pour les appels externes (public).";
|
||||
$text['description-outbound_caller_id_name']['he-il'] = "";
|
||||
$text['description-outbound_caller_id_name']['it-it'] = "Inserire l'ID nome chiamante esterno (pubblico). ";
|
||||
$text['description-outbound_caller_id_name']['nl-nl'] = "Voer de externe (openbaar) CID naam hier in.";
|
||||
$text['description-outbound_caller_id_name']['pl-pl'] = "Wpisz nazwę prezentowaną w rozmowach wychodzących (na zewnątrz systemu)";
|
||||
$text['description-outbound_caller_id_name']['pt-br'] = "Escolha o nome externo (público) do chamador aqui.";
|
||||
$text['description-outbound_caller_id_name']['pt-pt'] = "Introduza o nome externo (público) do chamador aqui.";
|
||||
$text['description-outbound_caller_id_name']['ro-ro'] = "";
|
||||
$text['description-outbound_caller_id_name']['ru-ru'] = "Введите внешнее (публичное) caller ID Имя.";
|
||||
$text['description-outbound_caller_id_name']['sv-se'] = "Ange det externa (publikt) namnvisningen här.";
|
||||
$text['description-outbound_caller_id_name']['uk-ua'] = "";
|
||||
|
||||
$text['description-caller_id_name_prefix']['en-us'] = "Set a prefix on the caller ID name.";
|
||||
$text['description-caller_id_name_prefix']['en-gb'] = "Set a prefix on the caller ID name.";
|
||||
$text['description-caller_id_name_prefix']['ar-eg'] = "";
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$tiers = $database->select($sql, $parameters, 'all');
|
||||
if (count($tiers) == 0) {
|
||||
if (is_array($tiers) && count($tiers) == 0) {
|
||||
$per_queue_login = true;
|
||||
}
|
||||
else {
|
||||
@@ -91,51 +91,61 @@
|
||||
|
||||
//add the status to the call_center_queues array
|
||||
$x = 0;
|
||||
foreach ($call_center_queues as $queue) {
|
||||
//get the queue list from event socket
|
||||
$switch_cmd = "callcenter_config queue list agents ".$queue['call_center_queue_uuid'];
|
||||
$event_socket_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
|
||||
$queue_list = csv_to_named_array($event_socket_str, '|');
|
||||
$call_center_queues[$x]['queue_list'] = $queue_list;
|
||||
$x++;
|
||||
if (is_array($call_center_queues)) {
|
||||
foreach ($call_center_queues as $queue) {
|
||||
//get the queue list from event socket
|
||||
$switch_cmd = "callcenter_config queue list agents ".$queue['call_center_queue_uuid'];
|
||||
$event_socket_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
|
||||
$queue_list = csv_to_named_array($event_socket_str, '|');
|
||||
$call_center_queues[$x]['queue_list'] = $queue_list;
|
||||
$x++;
|
||||
}
|
||||
}
|
||||
//view_array($call_center_queues, false);
|
||||
|
||||
//get the agent status from mod_callcenter and update the agent status in the agents array
|
||||
$x = 0;
|
||||
foreach ($agents as $row) {
|
||||
//add the domain name
|
||||
$domain_name = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
|
||||
$agents[$x]['domain_name'] = $domain_name;
|
||||
if (is_array($agents)) {
|
||||
foreach ($agents as $row) {
|
||||
//add the domain name
|
||||
$domain_name = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
|
||||
$agents[$x]['domain_name'] = $domain_name;
|
||||
|
||||
//update the queue status
|
||||
$i = 0;
|
||||
foreach ($call_center_queues as $queue) {
|
||||
$agents[$x]['queues'][$i]['agent_name'] = $row['agent_name'];
|
||||
$agents[$x]['queues'][$i]['queue_name'] = $queue['queue_name'];
|
||||
$agents[$x]['queues'][$i]['call_center_agent_uuid'] = $row['call_center_agent_uuid'];
|
||||
$agents[$x]['queues'][$i]['call_center_queue_uuid'] = $queue['call_center_queue_uuid'];
|
||||
$agents[$x]['queues'][$i]['queue_status'] = 'Logged Out';
|
||||
foreach ($queue['queue_list'] as $queue_list) {
|
||||
if ($row['call_center_agent_uuid'] == $queue_list['name']) {
|
||||
$agents[$x]['queues'][$i]['queue_status'] = 'Available';
|
||||
//update the queue status
|
||||
$i = 0;
|
||||
if (is_array($call_center_queues)) {
|
||||
foreach ($call_center_queues as $queue) {
|
||||
$agents[$x]['queues'][$i]['agent_name'] = $row['agent_name'];
|
||||
$agents[$x]['queues'][$i]['queue_name'] = $queue['queue_name'];
|
||||
$agents[$x]['queues'][$i]['call_center_agent_uuid'] = $row['call_center_agent_uuid'];
|
||||
$agents[$x]['queues'][$i]['call_center_queue_uuid'] = $queue['call_center_queue_uuid'];
|
||||
$agents[$x]['queues'][$i]['queue_status'] = 'Logged Out';
|
||||
if (is_array($queue['queue_list'])) {
|
||||
foreach ($queue['queue_list'] as $queue_list) {
|
||||
if ($row['call_center_agent_uuid'] == $queue_list['name']) {
|
||||
$agents[$x]['queues'][$i]['queue_status'] = 'Available';
|
||||
}
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
//update the agent status
|
||||
foreach ($agent_list as $r) {
|
||||
if ($r['name'] == $row['call_center_agent_uuid']) {
|
||||
$agents[$x]['agent_status'] = $r['status'];
|
||||
//update the agent status
|
||||
if (is_array($agent_list)) {
|
||||
foreach ($agent_list as $r) {
|
||||
if ($r['name'] == $row['call_center_agent_uuid']) {
|
||||
$agents[$x]['agent_status'] = $r['status'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//increment x
|
||||
$x++;
|
||||
|
||||
//increment x
|
||||
$x++;
|
||||
}
|
||||
}
|
||||
|
||||
//remove rows from the http post array where the status has not changed
|
||||
if (count($_POST['agents']) > 0 && !$per_queue_login) {
|
||||
if (is_array($_POST['agents']) && !$per_queue_login) {
|
||||
foreach($_POST['agents'] as $key => $row) {
|
||||
foreach($agents as $k => $field) {
|
||||
if ($field['agent_name'] === $row['agent_name'] && $field['agent_status'] === $row['agent_status']) {
|
||||
@@ -146,7 +156,7 @@
|
||||
}
|
||||
|
||||
//use the http post array to change the status
|
||||
if (count($_POST['agents']) > 0) {
|
||||
if (is_array($_POST['agents'])) {
|
||||
foreach($_POST['agents'] as $row) {
|
||||
if (strlen($row['agent_status']) > 0) {
|
||||
//agent set status
|
||||
@@ -302,7 +312,7 @@
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
if (count($_POST['agents']) > 0 && !$per_queue_login) {
|
||||
if (is_array($_POST['agents']) && !$per_queue_login) {
|
||||
echo $text['description-call_center_agent_status']."\n";
|
||||
echo "<br /><br />\n";
|
||||
}
|
||||
@@ -349,29 +359,31 @@
|
||||
$html .= " <th>".$text['label-status']."</th>\n";
|
||||
$html .= " <th>".$text['label-options']."</th>\n";
|
||||
$html .= " </tr>\n";
|
||||
foreach ($row['queues'] as $queue) {
|
||||
$x++;
|
||||
$onclick = "onclick=\"cycle('agents[".$x."][agent_status]');\"";
|
||||
$html .= " <tr class='list-row'>\n";
|
||||
$html .= " <td ".$onclick." class='pct-80 no-wrap'>".$queue['queue_name']."</td>\n";
|
||||
$html .= " <td>\n";
|
||||
if ($queue['queue_status'] == "Available") {
|
||||
$html .= " ".$text['option-available']."\n";
|
||||
if (is_array($row['queues'])) {
|
||||
foreach ($row['queues'] as $queue) {
|
||||
$x++;
|
||||
$onclick = "onclick=\"cycle('agents[".$x."][agent_status]');\"";
|
||||
$html .= " <tr class='list-row'>\n";
|
||||
$html .= " <td ".$onclick." class='pct-80 no-wrap'>".$queue['queue_name']."</td>\n";
|
||||
$html .= " <td>\n";
|
||||
if ($queue['queue_status'] == "Available") {
|
||||
$html .= " ".$text['option-available']."\n";
|
||||
}
|
||||
if ($queue['queue_status'] == "Logged Out") {
|
||||
$html .= " ".$text['option-logged_out']."\n";
|
||||
}
|
||||
$html .= " </td>\n";
|
||||
$html .= " <td class='no-wrap right'>";
|
||||
$html .= " <input type='hidden' name='agents[".$x."][queue_name]' value='".escape($queue['queue_name'])."'>\n";
|
||||
$html .= " <input type='hidden' name='agents[".$x."][agent_name]' value='".escape($row['agent_name'])."'>\n";
|
||||
$html .= " <input type='hidden' name='agents[".$x."][user_uuid]' value='".escape($row['user_uuid'])."'>\n";
|
||||
$html .= " <input type='hidden' name='agents[".$x."][queue_uuid]' value='".escape($queue['call_center_queue_uuid'])."'>\n";
|
||||
$html .= " <input type='hidden' name='agents[".$x."][agent_uuid]' value='".escape($row['call_center_agent_uuid'])."'>\n";
|
||||
$html .= " <label style='margin: 0; cursor: pointer; margin-right: 10px;'><input type='radio' name='agents[".$x."][agent_status]' value='Available' ".($queue['queue_status'] == 'Available' ? "checked='checked'" : null)."> ".$text['option-available']."</label> \n";
|
||||
$html .= " <label style='margin: 0; cursor: pointer;'><input type='radio' name='agents[".$x."][agent_status]' value='Logged Out' ".($queue['queue_status'] == 'Logged Out' ? "checked='checked'" : null)."> ".$text['option-logged_out']."</label>\n";
|
||||
$html .= " </td>\n";
|
||||
$html .= " </tr>\n";
|
||||
}
|
||||
if ($queue['queue_status'] == "Logged Out") {
|
||||
$html .= " ".$text['option-logged_out']."\n";
|
||||
}
|
||||
$html .= " </td>\n";
|
||||
$html .= " <td class='no-wrap right'>";
|
||||
$html .= " <input type='hidden' name='agents[".$x."][queue_name]' value='".escape($queue['queue_name'])."'>\n";
|
||||
$html .= " <input type='hidden' name='agents[".$x."][agent_name]' value='".escape($row['agent_name'])."'>\n";
|
||||
$html .= " <input type='hidden' name='agents[".$x."][user_uuid]' value='".escape($row['user_uuid'])."'>\n";
|
||||
$html .= " <input type='hidden' name='agents[".$x."][queue_uuid]' value='".escape($queue['call_center_queue_uuid'])."'>\n";
|
||||
$html .= " <input type='hidden' name='agents[".$x."][agent_uuid]' value='".escape($row['call_center_agent_uuid'])."'>\n";
|
||||
$html .= " <label style='margin: 0; cursor: pointer; margin-right: 10px;'><input type='radio' name='agents[".$x."][agent_status]' value='Available' ".($queue['queue_status'] == 'Available' ? "checked='checked'" : null)."> ".$text['option-available']."</label> \n";
|
||||
$html .= " <label style='margin: 0; cursor: pointer;'><input type='radio' name='agents[".$x."][agent_status]' value='Logged Out' ".($queue['queue_status'] == 'Logged Out' ? "checked='checked'" : null)."> ".$text['option-logged_out']."</label>\n";
|
||||
$html .= " </td>\n";
|
||||
$html .= " </tr>\n";
|
||||
}
|
||||
$html .= " </table>\n";
|
||||
}
|
||||
|
||||
@@ -97,6 +97,8 @@
|
||||
$queue_discard_abandoned_after = $_POST["queue_discard_abandoned_after"];
|
||||
$queue_abandoned_resume_allowed = $_POST["queue_abandoned_resume_allowed"];
|
||||
$queue_cid_prefix = $_POST["queue_cid_prefix"];
|
||||
$queue_outbound_caller_id_name = $_POST["queue_outbound_caller_id_name"];
|
||||
$queue_outbound_caller_id_number = $_POST["queue_outbound_caller_id_number"];
|
||||
$queue_announce_sound = $_POST["queue_announce_sound"];
|
||||
$queue_announce_frequency = $_POST["queue_announce_frequency"];
|
||||
$queue_cc_exit_keys = $_POST["queue_cc_exit_keys"];
|
||||
@@ -280,6 +282,12 @@
|
||||
$array['call_center_queues'][0]['queue_discard_abandoned_after'] = $queue_discard_abandoned_after;
|
||||
$array['call_center_queues'][0]['queue_abandoned_resume_allowed'] = $queue_abandoned_resume_allowed;
|
||||
$array['call_center_queues'][0]['queue_cid_prefix'] = $queue_cid_prefix;
|
||||
if (permission_exists('call_center_outbound_caller_id_name')) {
|
||||
$array['call_center_queues'][0]['queue_outbound_caller_id_name'] = $queue_outbound_caller_id_name;
|
||||
}
|
||||
if (permission_exists('call_center_outbound_caller_id_number')) {
|
||||
$array['call_center_queues'][0]['queue_outbound_caller_id_number'] = $queue_outbound_caller_id_number;
|
||||
}
|
||||
$array['call_center_queues'][0]['queue_announce_sound'] = $queue_announce_sound;
|
||||
$array['call_center_queues'][0]['queue_announce_frequency'] = $queue_announce_frequency;
|
||||
$array['call_center_queues'][0]['queue_cc_exit_keys'] = $queue_cc_exit_keys;
|
||||
@@ -364,9 +372,6 @@
|
||||
//debug info
|
||||
//echo "<pre>". print_r($message, true) ."</pre>"; exit;
|
||||
|
||||
//save the xml
|
||||
save_dialplan_xml();
|
||||
|
||||
//apply settings reminder
|
||||
$_SESSION["reload_xml"] = true;
|
||||
|
||||
@@ -474,6 +479,8 @@
|
||||
$queue_discard_abandoned_after = $row["queue_discard_abandoned_after"];
|
||||
$queue_abandoned_resume_allowed = $row["queue_abandoned_resume_allowed"];
|
||||
$queue_cid_prefix = $row["queue_cid_prefix"];
|
||||
$queue_outbound_caller_id_name = $row["queue_outbound_caller_id_name"];
|
||||
$queue_outbound_caller_id_number = $row["queue_outbound_caller_id_number"];
|
||||
$queue_announce_sound = $row["queue_announce_sound"];
|
||||
$queue_announce_frequency = $row["queue_announce_frequency"];
|
||||
$queue_cc_exit_keys = $row["queue_cc_exit_keys"];
|
||||
@@ -1050,6 +1057,32 @@
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if (permission_exists('call_center_outbound_caller_id_name')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " ".$text['label-outbound_caller_id_name']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='queue_outbound_caller_id_name' maxlength='255' value='".escape($queue_outbound_caller_id_name)."'>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-outbound_caller_id_name']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
if (permission_exists('call_center_outbound_caller_id_number')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " ".$text['label-outbound_caller_id_number']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='queue_outbound_caller_id_number' maxlength='255' value='".escape($queue_outbound_caller_id_number)."'>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-outbound_caller_id_number']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " ".$text['label-caller_announce_sound']."\n";
|
||||
|
||||
@@ -265,9 +265,6 @@
|
||||
//revoke temporary permissions
|
||||
$p->delete('call_center_queue_edit', 'temp');
|
||||
|
||||
//synchronize the xml config
|
||||
save_dialplan_xml();
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION['context']);
|
||||
@@ -373,7 +370,6 @@
|
||||
remove_config_from_cache('configuration:callcenter.conf');
|
||||
|
||||
//synchronize configuration
|
||||
save_dialplan_xml();
|
||||
save_call_center_xml();
|
||||
|
||||
//apply settings reminder
|
||||
@@ -591,9 +587,6 @@
|
||||
$p->delete('call_center_tier_add', 'temp');
|
||||
$p->delete('dialplan_add', 'temp');
|
||||
|
||||
//save the xml
|
||||
save_dialplan_xml();
|
||||
|
||||
//apply settings reminder
|
||||
$_SESSION["reload_xml"] = true;
|
||||
|
||||
@@ -627,4 +620,4 @@ $c->queue_cc_exit_keys = "";
|
||||
$c->dialplan();
|
||||
*/
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -36,9 +36,11 @@
|
||||
$apps[$x]['destinations'][$y]['name'] = "call_flows";
|
||||
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and call_flow_enabled = 'true' ";
|
||||
$apps[$x]['destinations'][$y]['order_by'] = "call_flow_name asc";
|
||||
$apps[$x]['destinations'][$y]['field']['context'] = "call_flow_context";
|
||||
$apps[$x]['destinations'][$y]['field']['call_flow_uuid'] = "call_flow_uuid";
|
||||
$apps[$x]['destinations'][$y]['field']['name'] = "call_flow_name";
|
||||
$apps[$x]['destinations'][$y]['field']['destination'] = "call_flow_extension";
|
||||
$apps[$x]['destinations'][$y]['field']['extension'] = "call_flow_extension";
|
||||
$apps[$x]['destinations'][$y]['field']['context'] = "call_flow_context";
|
||||
$apps[$x]['destinations'][$y]['select_value']['dialplan'] = "transfer:\${destination} XML \${context}";
|
||||
$apps[$x]['destinations'][$y]['select_value']['ivr'] = "menu-exec-app:transfer \${destination} XML \${context}";
|
||||
$apps[$x]['destinations'][$y]['select_label'] = "\${destination} \${name}";
|
||||
|
||||
@@ -248,9 +248,6 @@
|
||||
//echo "</pre>";
|
||||
//exit;
|
||||
|
||||
//save the xml
|
||||
save_dialplan_xml();
|
||||
|
||||
//apply settings reminder
|
||||
$_SESSION["reload_xml"] = true;
|
||||
|
||||
|
||||
@@ -146,9 +146,6 @@ if (!class_exists('call_flows')) {
|
||||
$p->delete('dialplan_delete', 'temp');
|
||||
$p->delete('dialplan_detail_delete', 'temp');
|
||||
|
||||
//syncrhonize configuration
|
||||
save_dialplan_xml();
|
||||
|
||||
//apply settings reminder
|
||||
$_SESSION["reload_xml"] = true;
|
||||
|
||||
@@ -241,9 +238,6 @@ if (!class_exists('call_flows')) {
|
||||
//revoke temporary permissions
|
||||
$p->delete('dialplan_edit', 'temp');
|
||||
|
||||
//syncrhonize configuration
|
||||
save_dialplan_xml();
|
||||
|
||||
//apply settings reminder
|
||||
$_SESSION["reload_xml"] = true;
|
||||
|
||||
@@ -361,9 +355,6 @@ if (!class_exists('call_flows')) {
|
||||
//revoke temporary permissions
|
||||
$p->delete('dialplan_add', 'temp');
|
||||
|
||||
//syncrhonize configuration
|
||||
save_dialplan_xml();
|
||||
|
||||
//apply settings reminder
|
||||
$_SESSION["reload_xml"] = true;
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, $parameters, 'column');
|
||||
|
||||
|
||||
//prepare to page the results
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = "&search=".$search;
|
||||
@@ -174,10 +174,10 @@
|
||||
$x = 0;
|
||||
foreach ($call_recordings as $row) {
|
||||
//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;'><td class='playback_progress_bar_background' style='padding: 0; border: none;' 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";
|
||||
echo "<tr class='list-row' style='display: none;'><td></td></tr>\n"; // dummy row to maintain alternating background color
|
||||
}
|
||||
if (permission_exists('call_recording_play')) {
|
||||
echo "<tr class='list-row' id='recording_progress_bar_".escape($row['call_recording_uuid'])."' style='display: none;'><td class='playback_progress_bar_background' style='padding: 0; border: none;' 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";
|
||||
echo "<tr class='list-row' style='display: none;'><td></td></tr>\n"; // dummy row to maintain alternating background color
|
||||
}
|
||||
if (permission_exists('call_recording_play')) {
|
||||
$list_row_url = "javascript:recording_play('".escape($row['call_recording_uuid'])."');";
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
//application details
|
||||
$apps[$x]['name'] = "Calls";
|
||||
$apps[$x]['name'] = "Call Forward";
|
||||
$apps[$x]['uuid'] = "19806921-e8ed-dcff-b325-dd3e5da4959d";
|
||||
$apps[$x]['category'] = "Switch";;
|
||||
$apps[$x]['subcategory'] = "";
|
||||
@@ -49,6 +49,9 @@
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "user";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "agent";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_forward_all";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_forward_caller_id";
|
||||
|
||||
//default settings
|
||||
|
||||
@@ -1,26 +1,47 @@
|
||||
<?php
|
||||
#This file was last reorganized on 19th of September 2017 08:54:24 AM UTC
|
||||
|
||||
$text['title-call_routing']['en-us'] = "Call Routing";
|
||||
$text['title-call_routing']['en-gb'] = "Call Routing";
|
||||
$text['title-call_routing']['ar-eg'] = "توجيه الدعوة";
|
||||
$text['title-call_routing']['de-at'] = "Call Routing"; //copied from de-de
|
||||
$text['title-call_routing']['de-ch'] = "Call Routing"; //copied from de-de
|
||||
$text['title-call_routing']['de-de'] = "Call Routing";
|
||||
$text['title-call_routing']['es-cl'] = "enrutamiento de llamadas";
|
||||
$text['title-call_routing']['es-mx'] = "enrutamiento de llamadas"; //copied from es-cl
|
||||
$text['title-call_routing']['fr-ca'] = "routage des appels"; //copied from fr-fr
|
||||
$text['title-call_routing']['fr-fr'] = "routage des appels";
|
||||
$text['title-call_routing']['he-il'] = "ניתוב שיחות";
|
||||
$text['title-call_routing']['it-it'] = "Istradamento Chiamate";
|
||||
$text['title-call_routing']['nl-nl'] = "Oproep routering";
|
||||
$text['title-call_routing']['pl-pl'] = "Call Routing";
|
||||
$text['title-call_routing']['pt-br'] = "Roteamento de chamadas"; //copied from pt-pt
|
||||
$text['title-call_routing']['pt-pt'] = "Roteamento de chamadas";
|
||||
$text['title-call_routing']['ro-ro'] = "rutare de apel";
|
||||
$text['title-call_routing']['ru-ru'] = "Маршрутизация вызовов";
|
||||
$text['title-call_routing']['sv-se'] = "Call Routing";
|
||||
$text['title-call_routing']['uk-ua'] = "маршрутизація викликів";
|
||||
$text['title-call_forward']['en-us'] = "Call Forward";
|
||||
$text['title-call_forward']['en-gb'] = "Call Forward";
|
||||
$text['title-call_forward']['ar-eg'] = "";
|
||||
$text['title-call_forward']['de-at'] = "Rufumleitung"; //copied from de-de
|
||||
$text['title-call_forward']['de-ch'] = "Rufumleitung"; //copied from de-de
|
||||
$text['title-call_forward']['de-de'] = "Rufumleitung";
|
||||
$text['title-call_forward']['es-cl'] = "Reenvio de Llamadas";
|
||||
$text['title-call_forward']['es-mx'] = "Reenvio de Llamadas"; //copied from es-cl
|
||||
$text['title-call_forward']['fr-ca'] = "Renvoi d'appel"; //copied from fr-fr
|
||||
$text['title-call_forward']['fr-fr'] = "Renvoi d'appel";
|
||||
$text['title-call_forward']['he-il'] = "";
|
||||
$text['title-call_forward']['it-it'] = "Inoltro";
|
||||
$text['title-call_forward']['nl-nl'] = "Oproep doorsturen";
|
||||
$text['title-call_forward']['pl-pl'] = "Przekierowanie";
|
||||
$text['title-call_forward']['pt-br'] = "Encaminhamento de chamadas";
|
||||
$text['title-call_forward']['pt-pt'] = "Encaminhamento de Chamadas";
|
||||
$text['title-call_forward']['ro-ro'] = "";
|
||||
$text['title-call_forward']['ru-ru'] = "Переадресация";
|
||||
$text['title-call_forward']['sv-se'] = "Vidarekoppling";
|
||||
$text['title-call_forward']['uk-ua'] = "Переадресація";
|
||||
|
||||
$text['header-call_forward']['en-us'] = "Call Forward";
|
||||
$text['header-call_forward']['en-gb'] = "Call Forward";
|
||||
$text['header-call_forward']['ar-eg'] = "";
|
||||
$text['header-call_forward']['de-at'] = "Rufumleitung"; //copied from de-de
|
||||
$text['header-call_forward']['de-ch'] = "Rufumleitung"; //copied from de-de
|
||||
$text['header-call_forward']['de-de'] = "Rufumleitung";
|
||||
$text['header-call_forward']['es-cl'] = "Reenvio de Llamadas";
|
||||
$text['header-call_forward']['es-mx'] = "Reenvio de Llamadas"; //copied from es-cl
|
||||
$text['header-call_forward']['fr-ca'] = "Renvoi d'appel"; //copied from fr-fr
|
||||
$text['header-call_forward']['fr-fr'] = "Renvoi d'appel";
|
||||
$text['header-call_forward']['he-il'] = "";
|
||||
$text['header-call_forward']['it-it'] = "Inoltro";
|
||||
$text['header-call_forward']['nl-nl'] = "Oproep doorsturen";
|
||||
$text['header-call_forward']['pl-pl'] = "Przekierowanie";
|
||||
$text['header-call_forward']['pt-br'] = "Encaminhamento de chamadas";
|
||||
$text['header-call_forward']['pt-pt'] = "Encaminhamento de Chamadas";
|
||||
$text['header-call_forward']['ro-ro'] = "";
|
||||
$text['header-call_forward']['ru-ru'] = "Переадресация";
|
||||
$text['header-call_forward']['sv-se'] = "Vidarekoppling";
|
||||
$text['header-call_forward']['uk-ua'] = "Переадресація";
|
||||
|
||||
$text['table-tools']['en-us'] = "Tools";
|
||||
$text['table-tools']['en-gb'] = "Tools";
|
||||
@@ -274,26 +295,26 @@ $text['label-ignore_busy']['ru-ru'] = "Игногировать занятост
|
||||
$text['label-ignore_busy']['sv-se'] = "Ignorera Upptaget";
|
||||
$text['label-ignore_busy']['uk-ua'] = "";
|
||||
|
||||
$text['label-follow-me']['en-us'] = "Follow Me";
|
||||
$text['label-follow-me']['en-gb'] = "Follow Me";
|
||||
$text['label-follow-me']['ar-eg'] = "";
|
||||
$text['label-follow-me']['de-at'] = "Anrufweiterschaltung"; //copied from de-de
|
||||
$text['label-follow-me']['de-ch'] = "Anrufweiterschaltung"; //copied from de-de
|
||||
$text['label-follow-me']['de-de'] = "Anrufweiterschaltung";
|
||||
$text['label-follow-me']['es-cl'] = "Sígueme";
|
||||
$text['label-follow-me']['es-mx'] = "Sígueme"; //copied from es-cl
|
||||
$text['label-follow-me']['fr-ca'] = "Suis moi"; //copied from fr-fr
|
||||
$text['label-follow-me']['fr-fr'] = "Suis moi";
|
||||
$text['label-follow-me']['he-il'] = "";
|
||||
$text['label-follow-me']['it-it'] = "Seguimi";
|
||||
$text['label-follow-me']['nl-nl'] = "Volg mij";
|
||||
$text['label-follow-me']['pl-pl'] = "Podążaj za mną";
|
||||
$text['label-follow-me']['pt-br'] = "Siga-me";
|
||||
$text['label-follow-me']['pt-pt'] = "Segue-me";
|
||||
$text['label-follow-me']['ro-ro'] = "";
|
||||
$text['label-follow-me']['ru-ru'] = "Перенаправление";
|
||||
$text['label-follow-me']['sv-se'] = "Följ Mig";
|
||||
$text['label-follow-me']['uk-ua'] = "";
|
||||
$text['label-follow_me']['en-us'] = "Follow Me";
|
||||
$text['label-follow_me']['en-gb'] = "Follow Me";
|
||||
$text['label-follow_me']['ar-eg'] = "";
|
||||
$text['label-follow_me']['de-at'] = "Anrufweiterschaltung"; //copied from de-de
|
||||
$text['label-follow_me']['de-ch'] = "Anrufweiterschaltung"; //copied from de-de
|
||||
$text['label-follow_me']['de-de'] = "Anrufweiterschaltung";
|
||||
$text['label-follow_me']['es-cl'] = "Sígueme";
|
||||
$text['label-follow_me']['es-mx'] = "Sígueme"; //copied from es-cl
|
||||
$text['label-follow_me']['fr-ca'] = "Suis moi"; //copied from fr-fr
|
||||
$text['label-follow_me']['fr-fr'] = "Suis moi";
|
||||
$text['label-follow_me']['he-il'] = "";
|
||||
$text['label-follow_me']['it-it'] = "Seguimi";
|
||||
$text['label-follow_me']['nl-nl'] = "Volg mij";
|
||||
$text['label-follow_me']['pl-pl'] = "Podążaj za mną";
|
||||
$text['label-follow_me']['pt-br'] = "Siga-me";
|
||||
$text['label-follow_me']['pt-pt'] = "Segue-me";
|
||||
$text['label-follow_me']['ro-ro'] = "";
|
||||
$text['label-follow_me']['ru-ru'] = "Перенаправление";
|
||||
$text['label-follow_me']['sv-se'] = "Följ Mig";
|
||||
$text['label-follow_me']['uk-ua'] = "";
|
||||
|
||||
$text['label-dnd']['en-us'] = "Do Not Disturb";
|
||||
$text['label-dnd']['en-gb'] = "Do Not Disturb";
|
||||
@@ -568,47 +589,26 @@ $text['label-call-prompt']['ru-ru'] = "Запрос вызова";
|
||||
$text['label-call-prompt']['sv-se'] = "Samtals Verifiering";
|
||||
$text['label-call-prompt']['uk-ua'] = "";
|
||||
|
||||
$text['label-call-forward']['en-us'] = "Call Forward";
|
||||
$text['label-call-forward']['en-gb'] = "Call Forward";
|
||||
$text['label-call-forward']['ar-eg'] = "";
|
||||
$text['label-call-forward']['de-at'] = "Rufumleitung"; //copied from de-de
|
||||
$text['label-call-forward']['de-ch'] = "Rufumleitung"; //copied from de-de
|
||||
$text['label-call-forward']['de-de'] = "Rufumleitung";
|
||||
$text['label-call-forward']['es-cl'] = "Reenvio de Llamadas";
|
||||
$text['label-call-forward']['es-mx'] = "Reenvio de Llamadas"; //copied from es-cl
|
||||
$text['label-call-forward']['fr-ca'] = "Renvoi d'appel"; //copied from fr-fr
|
||||
$text['label-call-forward']['fr-fr'] = "Renvoi d'appel";
|
||||
$text['label-call-forward']['he-il'] = "";
|
||||
$text['label-call-forward']['it-it'] = "Inoltro";
|
||||
$text['label-call-forward']['nl-nl'] = "Oproep doorsturen";
|
||||
$text['label-call-forward']['pl-pl'] = "Przekierowanie";
|
||||
$text['label-call-forward']['pt-br'] = "Encaminhamento de chamadas";
|
||||
$text['label-call-forward']['pt-pt'] = "Encaminhamento de Chamadas";
|
||||
$text['label-call-forward']['ro-ro'] = "";
|
||||
$text['label-call-forward']['ru-ru'] = "Переадресация";
|
||||
$text['label-call-forward']['sv-se'] = "Vidarekoppling";
|
||||
$text['label-call-forward']['uk-ua'] = "Переадресація";
|
||||
|
||||
$text['header-call_routing']['en-us'] = "Call Routing";
|
||||
$text['header-call_routing']['en-gb'] = "Call Routing";
|
||||
$text['header-call_routing']['ar-eg'] = "توجيه الدعوة";
|
||||
$text['header-call_routing']['de-at'] = "Anrufweiterleitung"; //copied from de-de
|
||||
$text['header-call_routing']['de-ch'] = "Anrufweiterleitung"; //copied from de-de
|
||||
$text['header-call_routing']['de-de'] = "Anrufweiterleitung";
|
||||
$text['header-call_routing']['es-cl'] = "Enrutamiento de Llamadas";
|
||||
$text['header-call_routing']['es-mx'] = "Enrutamiento de Llamadas"; //copied from es-cl
|
||||
$text['header-call_routing']['fr-ca'] = "Routage des Appels"; //copied from fr-fr
|
||||
$text['header-call_routing']['fr-fr'] = "Routage des Appels";
|
||||
$text['header-call_routing']['he-il'] = "ניתוב שיחות";
|
||||
$text['header-call_routing']['it-it'] = "Istradamento Chiamate";
|
||||
$text['header-call_routing']['nl-nl'] = "Oproep routering";
|
||||
$text['header-call_routing']['pl-pl'] = "Trasy połączeń";
|
||||
$text['header-call_routing']['pt-br'] = "Roteamento de Chamadas"; //copied from pt-pt
|
||||
$text['header-call_routing']['pt-pt'] = "Roteamento de Chamadas";
|
||||
$text['header-call_routing']['ro-ro'] = "Маршрутизация вызовов";
|
||||
$text['header-call_routing']['ru-ru'] = "Маршрутизация вызовов";
|
||||
$text['header-call_routing']['sv-se'] = "Samtals Styrning";
|
||||
$text['header-call_routing']['uk-ua'] = "маршрутизація викликів";
|
||||
$text['label-call_forward']['en-us'] = "Call Forward";
|
||||
$text['label-call_forward']['en-gb'] = "Call Forward";
|
||||
$text['label-call_forward']['ar-eg'] = "";
|
||||
$text['label-call_forward']['de-at'] = "Rufumleitung"; //copied from de-de
|
||||
$text['label-call_forward']['de-ch'] = "Rufumleitung"; //copied from de-de
|
||||
$text['label-call_forward']['de-de'] = "Rufumleitung";
|
||||
$text['label-call_forward']['es-cl'] = "Reenvio de Llamadas";
|
||||
$text['label-call_forward']['es-mx'] = "Reenvio de Llamadas"; //copied from es-cl
|
||||
$text['label-call_forward']['fr-ca'] = "Renvoi d'appel"; //copied from fr-fr
|
||||
$text['label-call_forward']['fr-fr'] = "Renvoi d'appel";
|
||||
$text['label-call_forward']['he-il'] = "";
|
||||
$text['label-call_forward']['it-it'] = "Inoltro";
|
||||
$text['label-call_forward']['nl-nl'] = "Oproep doorsturen";
|
||||
$text['label-call_forward']['pl-pl'] = "Przekierowanie";
|
||||
$text['label-call_forward']['pt-br'] = "Encaminhamento de chamadas";
|
||||
$text['label-call_forward']['pt-pt'] = "Encaminhamento de Chamadas";
|
||||
$text['label-call_forward']['ro-ro'] = "";
|
||||
$text['label-call_forward']['ru-ru'] = "Переадресация";
|
||||
$text['label-call_forward']['sv-se'] = "Vidarekoppling";
|
||||
$text['label-call_forward']['uk-ua'] = "Переадресація";
|
||||
|
||||
$text['description-on-busy']['en-us'] = "If enabled, it overrides the value of voicemail enabling in extension.";
|
||||
$text['description-on-busy']['en-gb'] = "If enabled, it overrides the value of voicemail enabling in extension.";
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
<?php
|
||||
|
||||
$y=0;
|
||||
$apps[$x]['menu'][$y]['title']['en-us'] = "Call Routing";
|
||||
$apps[$x]['menu'][$y]['title']['en-gb'] = "Call Routing";
|
||||
$apps[$x]['menu'][$y]['title']['en-us'] = "Call Forward";
|
||||
$apps[$x]['menu'][$y]['title']['en-gb'] = "Call Forward";
|
||||
$apps[$x]['menu'][$y]['title']['ar-eg'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['de-at'] = "Call Routing";
|
||||
$apps[$x]['menu'][$y]['title']['de-ch'] = "Call Routing";
|
||||
$apps[$x]['menu'][$y]['title']['de-de'] = "Call Routing";
|
||||
$apps[$x]['menu'][$y]['title']['es-cl'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['es-mx'] = "enrutamiento de llamadas";
|
||||
$apps[$x]['menu'][$y]['title']['fr-ca'] = "routage des appels";
|
||||
$apps[$x]['menu'][$y]['title']['fr-fr'] = "routage des appels";
|
||||
$apps[$x]['menu'][$y]['title']['de-at'] = "Rufumleitung";
|
||||
$apps[$x]['menu'][$y]['title']['de-ch'] = "Rufumleitung";
|
||||
$apps[$x]['menu'][$y]['title']['de-de'] = "Rufumleitung";
|
||||
$apps[$x]['menu'][$y]['title']['es-cl'] = "Reenvio de Llamadas";
|
||||
$apps[$x]['menu'][$y]['title']['es-mx'] = "Reenvio de Llamadas";
|
||||
$apps[$x]['menu'][$y]['title']['fr-ca'] = "Renvoi d'appel";
|
||||
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Renvoi d'appel";
|
||||
$apps[$x]['menu'][$y]['title']['he-il'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['it-it'] = "Istradamento Chiamate";
|
||||
$apps[$x]['menu'][$y]['title']['nl-nl'] = "Oproep routering";
|
||||
$apps[$x]['menu'][$y]['title']['pl-pl'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['pt-br'] = "roteamento de chamadas";
|
||||
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Roteamento de chamadas";
|
||||
$apps[$x]['menu'][$y]['title']['it-it'] = "Inoltro";
|
||||
$apps[$x]['menu'][$y]['title']['nl-nl'] = "Oproep doorsturen";
|
||||
$apps[$x]['menu'][$y]['title']['pl-pl'] = "Przekierowanie";
|
||||
$apps[$x]['menu'][$y]['title']['pt-br'] = "Encaminhamento de chamadas";
|
||||
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Encaminhamento de Chamadas";
|
||||
$apps[$x]['menu'][$y]['title']['ro-ro'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Маршрутизация вызовов";
|
||||
$apps[$x]['menu'][$y]['title']['sv-se'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['uk-ua'] = "";
|
||||
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Переадресация";
|
||||
$apps[$x]['menu'][$y]['title']['sv-se'] = "Vidarekoppling";
|
||||
$apps[$x]['menu'][$y]['title']['uk-ua'] = "Переадресація";
|
||||
|
||||
$apps[$x]['menu'][$y]['uuid'] = "4e4df00b-aafb-45a8-82c1-cdabc921889c";
|
||||
$apps[$x]['menu'][$y]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
|
||||
|
||||
@@ -501,7 +501,7 @@
|
||||
echo "<form method='post' name='frm' id='frm'>\n";
|
||||
|
||||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'><b>".$text['title-call_routing']."</b></div>\n";
|
||||
echo " <div class='heading'><b>".$text['title-call_forward']."</b></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'=>'calls.php']);
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','style'=>'margin-left: 15px;']);
|
||||
@@ -516,7 +516,7 @@
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " <strong>".$text['label-call-forward']."</strong>\n";
|
||||
echo " <strong>".$text['label-call_forward']."</strong>\n";
|
||||
echo "</td>\n";
|
||||
echo "<td width='70%' class='vtable' align='left'>\n";
|
||||
$on_click = "document.getElementById('follow_me_disabled').checked=true; ";
|
||||
@@ -620,7 +620,7 @@
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " <strong>".$text['label-follow-me']."</strong>\n";
|
||||
echo " <strong>".$text['label-follow_me']."</strong>\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
$on_click = "document.getElementById('forward_all_disabled').checked=true; ";
|
||||
@@ -793,4 +793,4 @@
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -81,19 +81,25 @@
|
||||
$order_by = $_GET["order_by"];
|
||||
$order = $_GET["order"];
|
||||
|
||||
//handle search term
|
||||
//get the search
|
||||
$search = strtolower($_GET["search"]);
|
||||
if (strlen($search) > 0) {
|
||||
$sql_search = "and ( ";
|
||||
$sql_search .= "extension like :search ";
|
||||
$sql_search .= "or lower(description) like :search ";
|
||||
$sql_search .= ") ";
|
||||
$parameters['search'] = '%'.$search.'%';
|
||||
}
|
||||
|
||||
//define select count query
|
||||
$sql = "select count(*) from v_extensions ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
|
||||
$sql .= "where true ";
|
||||
}
|
||||
else {
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
if (strlen($search) > 0) {
|
||||
$sql .= "and ( ";
|
||||
$sql .= "extension like :search ";
|
||||
$sql .= "or lower(description) like :search ";
|
||||
$sql .= ") ";
|
||||
$parameters['search'] = '%'.$search.'%';
|
||||
}
|
||||
$sql .= "and enabled = 'true' ";
|
||||
if (!permission_exists('extension_edit')) {
|
||||
if (is_array($_SESSION['user']['extension']) && count($_SESSION['user']['extension']) > 0) {
|
||||
@@ -112,18 +118,26 @@
|
||||
}
|
||||
}
|
||||
$sql .= $sql_search;
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, $parameters, 'column');
|
||||
unset($parameters);
|
||||
|
||||
//prepare to page the results
|
||||
//prepare the paging
|
||||
if ($is_included) {
|
||||
$rows_per_page = 10;
|
||||
}
|
||||
else {
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
}
|
||||
$param = "&search=".$search;
|
||||
$params[] = "app_uuid=".$app_uuid;
|
||||
if ($search) { $params[] = "search=".$search; }
|
||||
if ($order_by) { $params[] = "order_by=".$order_by; }
|
||||
if ($order) { $params[] = "order=".$order; }
|
||||
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
|
||||
$params[] .= "show=all";
|
||||
}
|
||||
$param = $params ? implode('&', $params) : null;
|
||||
unset($params);
|
||||
$page = $_GET['page'];
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
|
||||
@@ -132,7 +146,20 @@
|
||||
|
||||
//get the list
|
||||
$sql = "select * from v_extensions ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
|
||||
$sql .= "where true ";
|
||||
}
|
||||
else {
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
if (strlen($search) > 0) {
|
||||
$sql .= "and ( ";
|
||||
$sql .= "extension like :search ";
|
||||
$sql .= "or lower(description) like :search ";
|
||||
$sql .= ") ";
|
||||
$parameters['search'] = '%'.$search.'%';
|
||||
}
|
||||
$sql .= "and enabled = 'true' ";
|
||||
if (!permission_exists('extension_edit')) {
|
||||
if (is_array($_SESSION['user']['extension']) && count($_SESSION['user']['extension']) > 0) {
|
||||
@@ -163,7 +190,7 @@
|
||||
|
||||
//include header
|
||||
if (!$is_included) {
|
||||
$document['title'] = $text['title-call_routing'];
|
||||
$document['title'] = $text['title-call_forward'];
|
||||
}
|
||||
require_once "resources/header.php";
|
||||
|
||||
@@ -180,7 +207,7 @@
|
||||
//show the content
|
||||
if ($is_included) {
|
||||
echo "<div class='action_bar sub'>\n";
|
||||
echo " <div class='heading'><b>".$text['header-call_routing']."</b></div>\n";
|
||||
echo " <div class='heading'><b>".$text['header-call_forward']."</b></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
if ($num_rows > 10) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-view_all'],'icon'=>'project-diagram','collapse'=>false,'link'=>PROJECT_PATH.'/app/calls/calls.php']);
|
||||
@@ -191,24 +218,31 @@
|
||||
}
|
||||
else {
|
||||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'><b>".$text['header-call_routing']." (".$num_rows.")</b></div>\n";
|
||||
echo " <div class='heading'><b>".$text['header-call_forward']." (".$num_rows.")</b></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
|
||||
if ($extensions) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'name'=>'btn_toggle','onclick'=>"toggle_select(); this.blur();"]);
|
||||
}
|
||||
echo "<select class='formfld' style='display: none; width: auto;' id='call_control_feature' onchange=\"if (this.selectedIndex != 0) { modal_open('modal-toggle','btn_toggle'); }\">";
|
||||
echo " <option value='' selected='selected'>".$text['label-select']."</option>";
|
||||
if (permission_exists('call_forward')) {
|
||||
echo " <option value='call_forward'>".$text['label-call-forward']."</option>";
|
||||
echo " <option value='call_forward'>".$text['label-call_forward']."</option>";
|
||||
}
|
||||
if (permission_exists('follow_me')) {
|
||||
echo " <option value='follow_me'>".$text['label-follow-me']."</option>";
|
||||
echo " <option value='follow_me'>".$text['label-follow_me']."</option>";
|
||||
}
|
||||
if (permission_exists('do_not_disturb')) {
|
||||
echo " <option value='do_not_disturb'>".$text['label-dnd']."</option>";
|
||||
}
|
||||
echo " </select>";
|
||||
if ($_GET['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'.($params ? '&'.implode('&', $params) : null)]);
|
||||
}
|
||||
echo "<form id='form_search' class='inline' method='get'>\n";
|
||||
if ($_GET['show'] == 'all' && permission_exists('call_forward_all')) {
|
||||
echo " <input type='hidden' name='show' value='all'>";
|
||||
}
|
||||
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown='list_search_reset();'>";
|
||||
echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search','style'=>($search != '' ? 'display: none;' : null)]);
|
||||
echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'calls.php','style'=>($search == '' ? 'display: none;' : null)]);
|
||||
@@ -228,6 +262,9 @@
|
||||
echo "<br /><br />\n";
|
||||
|
||||
echo "<form id='form_list' method='post'>\n";
|
||||
if ($_GET['show'] == 'all' && permission_exists('call_forward_all')) {
|
||||
echo " <input type='hidden' name='show' value='all'>";
|
||||
}
|
||||
echo "<input type='hidden' id='action' name='action' value=''>\n";
|
||||
echo "<input type='hidden' name='search' value=\"".escape($search)."\">\n";
|
||||
}
|
||||
@@ -238,13 +275,16 @@
|
||||
echo " <th class='checkbox'>\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle();' ".($extensions ?: "style='visibility: hidden;'").">\n";
|
||||
echo " </th>\n";
|
||||
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
|
||||
echo "<th>".$text['label-domain']."</th>\n";
|
||||
}
|
||||
}
|
||||
echo " <th>".$text['label-extension']."</th>\n";
|
||||
if (permission_exists('call_forward')) {
|
||||
echo " <th>".$text['label-call-forward']."</th>\n";
|
||||
echo " <th>".$text['label-call_forward']."</th>\n";
|
||||
}
|
||||
if (permission_exists('follow_me')) {
|
||||
echo " <th>".$text['label-follow-me']."</th>\n";
|
||||
echo " <th>".$text['label-follow_me']."</th>\n";
|
||||
}
|
||||
if (permission_exists('do_not_disturb')) {
|
||||
echo " <th>".$text['label-dnd']."</th>\n";
|
||||
@@ -265,6 +305,16 @@
|
||||
echo " <input type='checkbox' name='extensions[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"if (!this.checked) { document.getElementById('checkbox_all').checked = false; }\">\n";
|
||||
echo " <input type='hidden' name='extensions[$x][uuid]' value='".escape($row['extension_uuid'])."' />\n";
|
||||
echo " </td>\n";
|
||||
|
||||
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
|
||||
if (strlen($_SESSION['domains'][$row['domain_uuid']]['domain_name']) > 0) {
|
||||
$domain = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
|
||||
}
|
||||
else {
|
||||
$domain = $text['label-global'];
|
||||
}
|
||||
echo " <td>".escape($domain)."</td>\n";
|
||||
}
|
||||
}
|
||||
echo " <td><a href='".$list_row_url."' title=\"".$text['button-edit']."\">".escape($row['extension'])."</a></td>\n";
|
||||
if (permission_exists('call_forward')) {
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
if (isset($results["rows"])) {
|
||||
foreach ($results["rows"] as &$row) {
|
||||
//get the domain
|
||||
if (strlen($row['context']) > 0 and $row['context'] != "public") {
|
||||
if (strlen($row['context']) > 0 && $row['context'] != "public" && $row['context'] != "default") {
|
||||
if (substr_count($row['context'], '@') > 0) {
|
||||
$context_array = explode('@', $row['context']);
|
||||
$row['domain_name'] = $context_array[1];
|
||||
@@ -77,7 +77,7 @@
|
||||
}
|
||||
else if (substr_count($row['presence_id'], '@') > 0) {
|
||||
$presence_id_array = explode('@', $row['presence_id']);
|
||||
$row['domain_name'] = $presence_id_array[1].' '.__line__.' '.$row['presence_id'];
|
||||
$row['domain_name'] = $presence_id_array[1];
|
||||
}
|
||||
//add the row to the array
|
||||
if (($show == 'all' && permission_exists('call_active_all'))) {
|
||||
|
||||
@@ -36,8 +36,10 @@
|
||||
$apps[$x]['destinations'][$y]['name'] = "conference_centers";
|
||||
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and conference_center_enabled = 'true' ";
|
||||
$apps[$x]['destinations'][$y]['order_by'] = "conference_center_name asc";
|
||||
$apps[$x]['destinations'][$y]['field']['conference_center_uuid'] = "conference_center_uuid";
|
||||
$apps[$x]['destinations'][$y]['field']['name'] = "conference_center_name";
|
||||
$apps[$x]['destinations'][$y]['field']['destination'] = "conference_center_extension";
|
||||
$apps[$x]['destinations'][$y]['field']['extension'] = "conference_center_extension";
|
||||
$apps[$x]['destinations'][$y]['field']['description'] = "conference_center_description";
|
||||
$apps[$x]['destinations'][$y]['select_value']['dialplan'] = "transfer:\${destination} XML \${context}";
|
||||
$apps[$x]['destinations'][$y]['select_value']['ivr'] = "menu-exec-app:transfer \${destination} XML \${context}";
|
||||
@@ -118,6 +120,11 @@
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "user";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "conference_room_moderator_endconf";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "user";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "conference_room_schedule";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
@@ -310,6 +317,10 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Wait for the moderator to join before starting the conference.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "moderator_endconf";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "When moderator exits end conference.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "announce_name";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Introduce participants as they enter the conference.";
|
||||
|
||||
@@ -11,7 +11,7 @@ $text['title-conference_centers']['es-cl'] = "Centro de Conferencias";
|
||||
$text['title-conference_centers']['es-mx'] = "Centro de Conferencias"; //copied from es-cl
|
||||
$text['title-conference_centers']['fr-ca'] = "Centre de conférence"; //copied from fr-fr
|
||||
$text['title-conference_centers']['fr-fr'] = "Centre de conférence";
|
||||
$text['title-conference_centers']['he-il'] = "";
|
||||
$text['title-conference_centers']['he-il'] = "מרכזי ועידה";
|
||||
$text['title-conference_centers']['it-it'] = "Centri Conferenza";
|
||||
$text['title-conference_centers']['nl-nl'] = "Cenferentie centra";
|
||||
$text['title-conference_centers']['pl-pl'] = "Centra Konferencyjne";
|
||||
@@ -527,6 +527,27 @@ $text['label-wait_for_moderator']['ru-ru'] = "Ждать модератора";
|
||||
$text['label-wait_for_moderator']['sv-se'] = "Vänta på Moderator";
|
||||
$text['label-wait_for_moderator']['uk-ua'] = "Очікування на модератора";
|
||||
|
||||
$text['label-moderator_endconf']['en-us'] = "Moderator endconf";
|
||||
$text['label-moderator_endconf']['en-gb'] = "Moderator endconf";
|
||||
$text['label-moderator_endconf']['ar-eg'] = "";
|
||||
$text['label-moderator_endconf']['de-at'] = ""; //copied from de-de
|
||||
$text['label-moderator_endconf']['de-ch'] = ""; //copied from de-de
|
||||
$text['label-moderator_endconf']['de-de'] = "";
|
||||
$text['label-moderator_endconf']['es-cl'] = "";
|
||||
$text['label-moderator_endconf']['es-mx'] = ""; //copied from es-cl
|
||||
$text['label-moderator_endconf']['fr-ca'] = ""; //copied from fr-fr
|
||||
$text['label-moderator_endconf']['fr-fr'] = "";
|
||||
$text['label-moderator_endconf']['he-il'] = "";
|
||||
$text['label-moderator_endconf']['it-it'] = "";
|
||||
$text['label-moderator_endconf']['nl-nl'] = "";
|
||||
$text['label-moderator_endconf']['pl-pl'] = "";
|
||||
$text['label-moderator_endconf']['pt-br'] = "";
|
||||
$text['label-moderator_endconf']['pt-pt'] = "";
|
||||
$text['label-moderator_endconf']['ro-ro'] = "";
|
||||
$text['label-moderator_endconf']['ru-ru'] = "";
|
||||
$text['label-moderator_endconf']['sv-se'] = "";
|
||||
$text['label-moderator_endconf']['uk-ua'] = "";
|
||||
|
||||
$text['label-view']['en-us'] = "View";
|
||||
$text['label-view']['en-gb'] = "View";
|
||||
$text['label-view']['ar-eg'] = "";
|
||||
|
||||
@@ -178,9 +178,6 @@
|
||||
//echo "</pre>\n";
|
||||
//exit;
|
||||
|
||||
//syncrhonize configuration
|
||||
save_dialplan_xml();
|
||||
|
||||
//apply settings reminder
|
||||
$_SESSION["reload_xml"] = true;
|
||||
|
||||
@@ -463,4 +460,4 @@
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
$start_datetime = $_POST["start_datetime"];
|
||||
$stop_datetime = $_POST["stop_datetime"];
|
||||
$wait_mod = $_POST["wait_mod"];
|
||||
$moderator_endconf = $_POST["moderator_endconf"];
|
||||
$announce_name = $_POST["announce_name"];
|
||||
$announce_recording = $_POST["announce_recording"];
|
||||
$announce_count = $_POST["announce_count"];
|
||||
@@ -287,6 +288,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
if (strlen($record) == 0) { $record = 'false'; }
|
||||
if (strlen($max_members) == 0) { $max_members = 0; }
|
||||
if (strlen($wait_mod) == 0) { $wait_mod = 'true'; }
|
||||
if (strlen($moderator_endconf) == 0) { $moderator_endconf = 'false'; }
|
||||
if (strlen($announce_name) == 0) { $announce_name = 'true'; }
|
||||
if (strlen($announce_recording) == 0) { $announce_recording = 'true'; }
|
||||
if (strlen($announce_count) == 0) { $announce_count = 'true'; }
|
||||
@@ -327,6 +329,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$array['conference_rooms'][0]['start_datetime'] = $start_datetime;
|
||||
$array['conference_rooms'][0]['stop_datetime'] = $stop_datetime;
|
||||
$array['conference_rooms'][0]['wait_mod'] = $wait_mod;
|
||||
$array['conference_rooms'][0]['moderator_endconf'] = $moderator_endconf;
|
||||
$array['conference_rooms'][0]['announce_name'] = $announce_name;
|
||||
$array['conference_rooms'][0]['announce_recording'] = $announce_recording;
|
||||
$array['conference_rooms'][0]['announce_count'] = $announce_count;
|
||||
@@ -421,6 +424,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
if (strlen($wait_mod) > 0) {
|
||||
$array['conference_rooms'][0]['wait_mod'] = $wait_mod;
|
||||
}
|
||||
if (strlen($moderator_endconf) > 0) {
|
||||
$array['conference_rooms'][0]['moderator_endconf'] = $moderator_endconf;
|
||||
}
|
||||
if (strlen($announce_name) > 0) {
|
||||
$array['conference_rooms'][0]['announce_name'] = $announce_name;
|
||||
}
|
||||
@@ -502,6 +508,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$start_datetime = $row["start_datetime"];
|
||||
$stop_datetime = $row["stop_datetime"];
|
||||
$wait_mod = $row["wait_mod"];
|
||||
$moderator_endconf = $row["moderator_endconf"];
|
||||
$announce_name = $row["announce_name"];
|
||||
$announce_recording = $row["announce_recording"];
|
||||
$announce_count = $row["announce_count"];
|
||||
@@ -569,6 +576,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
if (strlen($record) == 0) { $record = 'false'; }
|
||||
if (strlen($max_members) == 0) { $max_members = 0; }
|
||||
if (strlen($wait_mod) == 0) { $wait_mod = 'true'; }
|
||||
if (strlen($moderator_endconf) == 0) { $moderator_endconf = 'false'; }
|
||||
if (strlen($announce_name) == 0) { $announce_name = 'true'; }
|
||||
if (strlen($announce_recording) == 0) { $announce_recording = 'true'; }
|
||||
if (strlen($announce_count) == 0) { $announce_count = 'true'; }
|
||||
@@ -632,7 +640,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell' valign='top'>".$text['label-moderator-pin']."</td>";
|
||||
echo " <td class='vtable' align='left'>";
|
||||
echo " <input class='formfld' type='text' name='moderator_pin' maxlength='255' value='".escape($moderator_pin)."'>\n";
|
||||
echo " <input class='formfld' type='number' name='moderator_pin' maxlength='255' value='".escape($moderator_pin)."'>\n";
|
||||
echo " <br />\n";
|
||||
echo " ".$text['description-moderator_pin']."\n";
|
||||
echo " </td>";
|
||||
@@ -641,7 +649,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell' valign='top'>".$text['label-participant-pin']."</td>";
|
||||
echo " <td class='vtable' align='left'>";
|
||||
echo " <input class='formfld' type='text' name='participant_pin' maxlength='255' value='".escape($participant_pin)."'>\n";
|
||||
echo " <input class='formfld' type='number' name='participant_pin' maxlength='255' value='".escape($participant_pin)."'>\n";
|
||||
echo " <br />\n";
|
||||
echo " ".$text['description-participant-pin']."\n";
|
||||
echo " </td>";
|
||||
@@ -772,6 +780,30 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
if (permission_exists('conference_room_moderator_endconf')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>".$text['label-moderator_endconf']."</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='moderator_endconf'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
if ($moderator_endconf == "true") {
|
||||
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='true'>".$text['label-true']."</option>\n";
|
||||
}
|
||||
if ($moderator_endconf == "false") {
|
||||
echo " <option value='false' selected='selected'>".$text['label-false']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='false'>".$text['label-false']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
if (permission_exists('conference_room_announce_name')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>".$text['label-announce_name']."</td>\n";
|
||||
|
||||
@@ -86,12 +86,10 @@
|
||||
//prepare to page the results
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = '';
|
||||
if (isset($_GET['page'])) {
|
||||
$page = is_numeric($_GET['page']) ? $_GET['page'] : 0;
|
||||
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
|
||||
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
|
||||
$offset = $rows_per_page * $page;
|
||||
}
|
||||
$page = is_numeric($_GET['page']) ? $_GET['page'] : 0;
|
||||
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
|
||||
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
//get the list
|
||||
$sql = "select * from v_conference_session_details ";
|
||||
@@ -109,7 +107,7 @@
|
||||
|
||||
//show the content
|
||||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'><b>".$text['title-conference_session_details']."</b></div>\n";
|
||||
echo " <div class='heading'><b>".$text['title-conference_session_details']." (".$num_rows.")</b></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'=>'conference_sessions.php']);
|
||||
$tmp_dir = $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day;
|
||||
@@ -206,4 +204,4 @@
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -208,16 +208,9 @@
|
||||
echo " <td>".$end_date." </td>\n";
|
||||
echo " <td>".$time_difference." </td>\n";
|
||||
echo " <td>".escape($row['profile'])." </td>\n";
|
||||
$tmp_dir = $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day;
|
||||
$tmp_name = '';
|
||||
if (file_exists($tmp_dir.'/'.$row['conference_session_uuid'].'.mp3')) {
|
||||
$tmp_name = $row['conference_session_uuid'].".mp3";
|
||||
}
|
||||
elseif (file_exists($tmp_dir.'/'.$row['conference_session_uuid'].'.wav')) {
|
||||
$tmp_name = $row['conference_session_uuid'].".wav";
|
||||
}
|
||||
$recording_name = $row['recording'];
|
||||
echo " <td class='button no-link'>\n";
|
||||
if (strlen($tmp_name) > 0 && file_exists($tmp_dir.'/'.$tmp_name)) {
|
||||
if (strlen($recording_name) > 0 && file_exists($recording_name)) {
|
||||
echo "<table border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td>\n";
|
||||
@@ -225,7 +218,7 @@
|
||||
echo "</td>\n";
|
||||
if (permission_exists('conference_session_play')) {
|
||||
echo "<td>\n";
|
||||
echo " <audio controls=\"controls\">\n";
|
||||
echo " <audio controls=\"controls\" preload=\"none\">\n";
|
||||
echo " <source src=\"download.php?id=".escape($row['conference_session_uuid'])."\" type=\"audio/x-wav\">\n";
|
||||
echo " </audio>\n";
|
||||
//echo " <a href=\"javascript:void(0);\" onclick=\"window.open('".PROJECT_PATH."/app/recordings/recording_play.php?a=download&type=moh&filename=".urlencode('archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name)."', 'play',' width=420,height=150,menubar=no,status=no,toolbar=no')\">\n";
|
||||
@@ -258,4 +251,4 @@
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
//check permisions
|
||||
require_once "resources/check_auth.php";
|
||||
if (permission_exists('call_recording_view')) {
|
||||
if (permission_exists('call_recording_view') || permission_exists('conference_session_play')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -221,7 +221,7 @@ if (!class_exists('conference_centers')) {
|
||||
* download the recordings
|
||||
*/
|
||||
public function download() {
|
||||
if (permission_exists('call_recording_play') || permission_exists('call_recording_download')) {
|
||||
if (permission_exists('conference_session_play') || permission_exists('call_recording_play') || permission_exists('call_recording_download')) {
|
||||
|
||||
//cache limiter
|
||||
session_cache_limiter('public');
|
||||
@@ -375,9 +375,6 @@ if (!class_exists('conference_centers')) {
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
|
||||
//syncrhonize configuration
|
||||
save_dialplan_xml();
|
||||
|
||||
//apply settings reminder
|
||||
$_SESSION["reload_xml"] = true;
|
||||
|
||||
@@ -602,9 +599,6 @@ if (!class_exists('conference_centers')) {
|
||||
//revoke temporary permissions
|
||||
$p->delete("dialplan_edit", "temp");
|
||||
|
||||
//syncrhonize configuration
|
||||
save_dialplan_xml();
|
||||
|
||||
//apply settings reminder
|
||||
$_SESSION["reload_xml"] = true;
|
||||
|
||||
|
||||
@@ -36,8 +36,10 @@
|
||||
$apps[$x]['destinations'][$y]['name'] = "conferences";
|
||||
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and conference_enabled = 'true' ";
|
||||
$apps[$x]['destinations'][$y]['order_by'] = "conference_name asc";
|
||||
$apps[$x]['destinations'][$y]['field']['conference_uuid'] = "conference_uuid";
|
||||
$apps[$x]['destinations'][$y]['field']['name'] = "conference_name";
|
||||
$apps[$x]['destinations'][$y]['field']['destination'] = "conference_extension";
|
||||
$apps[$x]['destinations'][$y]['field']['extension'] = "conference_extension";
|
||||
$apps[$x]['destinations'][$y]['field']['description'] = "conference_description";
|
||||
$apps[$x]['destinations'][$y]['select_value']['dialplan'] = "transfer:\${destination} XML \${context}";
|
||||
$apps[$x]['destinations'][$y]['select_value']['ivr'] = "menu-exec-app:transfer \${destination} XML \${context}";
|
||||
|
||||
@@ -11,7 +11,7 @@ $text['title-conferences']['es-cl'] = "Conferencias";
|
||||
$text['title-conferences']['es-mx'] = "Conferencias"; //copied from es-cl
|
||||
$text['title-conferences']['fr-ca'] = "Conférences"; //copied from fr-fr
|
||||
$text['title-conferences']['fr-fr'] = "Conférences";
|
||||
$text['title-conferences']['he-il'] = "";
|
||||
$text['title-conferences']['he-il'] = "חדר ועידה";
|
||||
$text['title-conferences']['it-it'] = "Conferenze";
|
||||
$text['title-conferences']['nl-nl'] = "Conferenties";
|
||||
$text['title-conferences']['pl-pl'] = "";
|
||||
@@ -43,8 +43,8 @@ $text['title-conference']['ru-ru'] = "Конференции";
|
||||
$text['title-conference']['sv-se'] = "Konferenser";
|
||||
$text['title-conference']['uk-ua'] = "";
|
||||
|
||||
$text['description']['en-us'] = "Conferences is used to setup conference rooms with a name, description, and optional pin number.";
|
||||
$text['description']['en-gb'] = "Conferences is used to setup conference rooms with a name, description, and optional pin number.";
|
||||
$text['description']['en-us'] = "Conference is used to setup conference rooms with a name, description, and optional pin number.";
|
||||
$text['description']['en-gb'] = "Conference is used to setup conference rooms with a name, description, and optional pin number.";
|
||||
$text['description']['ar-eg'] = "";
|
||||
$text['description']['de-at'] = "Konferenzen wird verwendet, um Konferenzräume mit einem Namen, Beschreibung und optionaler PIN zu erstellen."; //copied from de-de
|
||||
$text['description']['de-ch'] = "Konferenzen wird verwendet, um Konferenzräume mit einem Namen, Beschreibung und optionaler PIN zu erstellen."; //copied from de-de
|
||||
|
||||
@@ -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-2018
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2020
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -321,17 +321,18 @@
|
||||
|
||||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'>";
|
||||
if ($action == "add") {
|
||||
echo "<b>".$text['label-conference-add']."</b>";
|
||||
}
|
||||
if ($action == "update") {
|
||||
echo "<b>".$text['label-conference-edit']."</b>";
|
||||
}
|
||||
echo " <b>".$text['title-conference']."</b>";
|
||||
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'=>'conferences.php']);
|
||||
if ($action == 'update' && permission_exists('conference_active_view')) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'style'=>'margin-right: 15px;','link'=>'../conferences_active/conferences_active.php?c='.urlencode(str_replace(' ', '-', $conference_name))]);
|
||||
if ($action == 'update') {
|
||||
if (permission_exists('conference_cdr_view')) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-cdr'],'icon'=>'list','link'=>PROJECT_PATH.'/app/conference_cdr/conference_cdr.php?id='.urlencode($conference_uuid)]);
|
||||
}
|
||||
if (permission_exists('conference_active_view')) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'style'=>'','link'=>'../conferences_active/conferences_active.php?c='.urlencode(str_replace(' ', '-', $conference_name))]);
|
||||
}
|
||||
}
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save']);
|
||||
echo " </div>\n";
|
||||
@@ -370,7 +371,7 @@
|
||||
echo " ".$text['label-pin']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='conference_pin_number' maxlength='255' value=\"".escape($conference_pin_number)."\">\n";
|
||||
echo " <input class='formfld' type='number' name='conference_pin_number' maxlength='255' value=\"".escape($conference_pin_number)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo "".$text['description-pin']."\n";
|
||||
echo "</td>\n";
|
||||
|
||||
@@ -136,9 +136,6 @@ if (!class_exists('conferences')) {
|
||||
$p->delete('dialplan_detail_delete', 'temp');
|
||||
$p->delete('dialplan_delete', 'temp');
|
||||
|
||||
//syncrhonize configuration
|
||||
save_dialplan_xml();
|
||||
|
||||
//apply settings reminder
|
||||
$_SESSION["reload_xml"] = true;
|
||||
|
||||
@@ -225,9 +222,6 @@ if (!class_exists('conferences')) {
|
||||
//revoke temporary permissions
|
||||
$p->delete('dialplan_edit', 'temp');
|
||||
|
||||
//syncrhonize configuration
|
||||
save_dialplan_xml();
|
||||
|
||||
//apply settings reminder
|
||||
$_SESSION["reload_xml"] = true;
|
||||
|
||||
@@ -363,9 +357,6 @@ if (!class_exists('conferences')) {
|
||||
$p->delete('conference_user_add', 'temp');
|
||||
$p->delete('dialplan_add', 'temp');
|
||||
|
||||
//syncrhonize configuration
|
||||
save_dialplan_xml();
|
||||
|
||||
//apply settings reminder
|
||||
$_SESSION["reload_xml"] = true;
|
||||
|
||||
@@ -386,4 +377,4 @@ if (!class_exists('conferences')) {
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -11,7 +11,7 @@ $text['title-active_conferences']['es-cl'] = "Conferencias Activas";
|
||||
$text['title-active_conferences']['es-mx'] = "Conferencias Activas"; //copied from es-cl
|
||||
$text['title-active_conferences']['fr-ca'] = "Conférences Avtives"; //copied from fr-fr
|
||||
$text['title-active_conferences']['fr-fr'] = "Conférences Avtives";
|
||||
$text['title-active_conferences']['he-il'] = "";
|
||||
$text['title-active_conferences']['he-il'] = "ניהול חדרי ועידה";
|
||||
$text['title-active_conferences']['it-it'] = "Conferenze Attive";
|
||||
$text['title-active_conferences']['nl-nl'] = "Aktieve conferenties";
|
||||
$text['title-active_conferences']['pl-pl'] = "Aktywne konferencje";
|
||||
@@ -528,18 +528,18 @@ $text['label-mute']['uk-ua'] = "";
|
||||
|
||||
$text['label-hand_raised']['en-us'] = "Hand Raised";
|
||||
$text['label-hand_raised']['ar-eg'] = "";
|
||||
$text['label-hand_raised']['de-at'] = "";
|
||||
$text['label-hand_raised']['de-ch'] = "";
|
||||
$text['label-hand_raised']['de-at'] = "";
|
||||
$text['label-hand_raised']['de-ch'] = "";
|
||||
$text['label-hand_raised']['de-de'] = "";
|
||||
$text['label-hand_raised']['es-cl'] = "";
|
||||
$text['label-hand_raised']['es-mx'] = "";
|
||||
$text['label-hand_raised']['fr-ca'] = "";
|
||||
$text['label-hand_raised']['es-mx'] = "";
|
||||
$text['label-hand_raised']['fr-ca'] = "";
|
||||
$text['label-hand_raised']['fr-fr'] = "";
|
||||
$text['label-hand_raised']['he-il'] = "";
|
||||
$text['label-hand_raised']['it-it'] = "";
|
||||
$text['label-hand_raised']['nl-nl'] = "";
|
||||
$text['label-hand_raised']['pl-pl'] = "";
|
||||
$text['label-hand_raised']['pt-br'] = "";
|
||||
$text['label-hand_raised']['pt-br'] = "";
|
||||
$text['label-hand_raised']['pt-pt'] = "";
|
||||
$text['label-hand_raised']['ro-ro'] = "";
|
||||
$text['label-hand_raised']['ru-ru'] = "";
|
||||
|
||||
@@ -198,12 +198,11 @@
|
||||
}
|
||||
else {
|
||||
echo "<i class='fas fa-user fa-fw' title=\"".$text['label-participant']."\"></i>";
|
||||
|
||||
}
|
||||
echo "</td>\n";
|
||||
$talking_icon = "<span class='far fa-comment' style='font-size: 14px; margin: -2px 10px -2px 15px; visibility: ".($flag_talking == "true" ? 'visible' : 'hidden').";' align='absmiddle' title=\"".$text['label-talking']."\">";
|
||||
echo "<td ".$list_row_onclick." ".$list_row_title." class='no-wrap'>".escape($caller_id_name).$talking_icon."</td>\n";
|
||||
echo "<td ".$list_row_onclick." ".$list_row_title.">".escape($caller_id_number)."</td>\n";
|
||||
echo "<td ".$list_row_onclick." ".$list_row_title." class='no-wrap'>".escape(urldecode($caller_id_name)).$talking_icon."</td>\n";
|
||||
echo "<td ".$list_row_onclick." ".$list_row_title.">".escape(urldecode($caller_id_number))."</td>\n";
|
||||
echo "<td ".$list_row_onclick." ".$list_row_title." class='hide-sm-dn'>".escape($join_time_formatted)."</td>\n";
|
||||
echo "<td ".$list_row_onclick." ".$list_row_title." class='hide-xs'>".escape($last_talking_formatted)."</td>\n";
|
||||
echo "<td ".$list_row_onclick." ".$list_row_title." class='hide-sm-dn'>".$text['label-'.(($flag_has_floor == "true") ? 'yes' : 'no')]."</td>\n";
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
$apps[$x]['uuid'] = "04481e0e-a478-c559-adad-52bd4174574c";
|
||||
$apps[$x]['category'] = "CRM";
|
||||
$apps[$x]['subcategory'] = "";
|
||||
$apps[$x]['version'] = "1.0";
|
||||
$apps[$x]['version'] = "1.1";
|
||||
$apps[$x]['license'] = "Mozilla Public License 1.1";
|
||||
$apps[$x]['contact_url'] = "http://www.fusionpbx.com";
|
||||
$apps[$x]['description']['en-us'] = "Provides a place to store contact information for individuals and organizations.";
|
||||
|
||||
@@ -172,21 +172,43 @@
|
||||
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
|
||||
//define phone label options
|
||||
if (is_array($_SESSION["contact"]["phone_label"]) && @sizeof($_SESSION["contact"]["phone_label"]) != 0) {
|
||||
sort($_SESSION["contact"]["phone_label"]);
|
||||
foreach($_SESSION["contact"]["phone_label"] as $row) {
|
||||
$label_options[] = "<option value='".$row.">".$row."</option>";
|
||||
}
|
||||
}
|
||||
else {
|
||||
$default_labels[] = $text['option-work'];
|
||||
$default_labels[] = $text['option-home'];
|
||||
$default_labels[] = $text['option-mobile'];
|
||||
$default_labels[] = $text['option-main'];
|
||||
$default_labels[] = $text['option-fax'];
|
||||
$default_labels[] = $text['option-pager'];
|
||||
$default_labels[] = $text['option-voicemail'];
|
||||
$default_labels[] = $text['option-text'];
|
||||
$default_labels[] = $text['option-other'];
|
||||
foreach ($default_labels as $default_label) {
|
||||
$label_options[] = "<option value='".$default_label."'>".$default_label."</option>";
|
||||
}
|
||||
}
|
||||
|
||||
//loop through user columns
|
||||
$x = 0;
|
||||
foreach ($line_fields as $line_field) {
|
||||
$line_field = trim(trim($line_field), $enclosure);
|
||||
echo "<tr>\n";
|
||||
echo " <td width='30%' class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
//echo " ".$text['label-zzz']."\n";
|
||||
echo $line_field;
|
||||
echo " </td>\n";
|
||||
echo " <td width='70%' class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' style='' name='fields[$x]'>\n";
|
||||
echo " <select class='formfld' style='' name='fields[$x]' onchange=\"document.getElementById('labels_$x').style.display = this.options[this.selectedIndex].value == 'contact_phones.phone_number' ? 'inline' : 'none';\">\n";
|
||||
echo " <option value=''></option>\n";
|
||||
foreach($schema as $row) {
|
||||
echo " <optgroup label='".$row['table']."'>\n";
|
||||
foreach($row['fields'] as $field) {
|
||||
if ($field == 'phone_label') { continue; }
|
||||
$selected = '';
|
||||
if ($field == $line_field) {
|
||||
$selected = "selected='selected'";
|
||||
@@ -198,8 +220,9 @@
|
||||
echo " </optgroup>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
//echo "<br />\n";
|
||||
//echo $text['description-zzz']."\n";
|
||||
echo " <select class='formfld' style='display: none;' id='labels_$x' name='labels[$x]'>\n";
|
||||
echo is_array($label_options) ? implode("\n", $label_options) : null;
|
||||
echo " </select>\n";
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
$x++;
|
||||
@@ -251,8 +274,9 @@
|
||||
exit;
|
||||
}
|
||||
|
||||
//user selected fields
|
||||
//user selected fields, labels
|
||||
$fields = $_POST['fields'];
|
||||
$labels = $_POST['labels'];
|
||||
|
||||
//set the domain_uuid
|
||||
$domain_uuid = $_SESSION['domain_uuid'];
|
||||
@@ -312,6 +336,9 @@
|
||||
if ($field_name != "username" && $field_name != "group_name") {
|
||||
$array[$parent][$row_id][$table_name][$y]['domain_uuid'] = $domain_uuid;
|
||||
$array[$parent][$row_id][$table_name][$y][$field_name] = $result[$key];
|
||||
if ($field_name == 'phone_number') {
|
||||
$array[$parent][$row_id][$table_name][$y]['phone_label'] = $labels[$key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -337,11 +364,12 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
if (is_array($array[$parent][$row_id])) { $y++; }
|
||||
}
|
||||
|
||||
//process a chunk of the array
|
||||
if ($row_id === 1000) {
|
||||
|
||||
|
||||
//save to the data
|
||||
$database = new database;
|
||||
$database->app_name = 'contacts';
|
||||
@@ -349,8 +377,8 @@
|
||||
$database->save($array);
|
||||
|
||||
//clear the array
|
||||
unset($array);
|
||||
|
||||
unset($array);
|
||||
|
||||
//set the row id back to 0
|
||||
$row_id = 0;
|
||||
}
|
||||
@@ -359,6 +387,7 @@
|
||||
$row_number++;
|
||||
$row_id++;
|
||||
} //end while
|
||||
|
||||
fclose($handle);
|
||||
|
||||
//save to the data
|
||||
@@ -418,7 +447,7 @@
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='from_row'>\n";
|
||||
$i=1;
|
||||
$i=2;
|
||||
while($i<=99) {
|
||||
$selected = ($i == $from_row) ? "selected" : null;
|
||||
echo " <option value='$i' ".$selected.">$i</option>\n";
|
||||
@@ -485,4 +514,4 @@
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -114,7 +114,7 @@ if ($_POST['a'] == 'import') {
|
||||
//delete duplicate contact
|
||||
$obj = new contacts;
|
||||
$obj->delete($array);
|
||||
unset($array)
|
||||
unset($array);
|
||||
|
||||
//revoke temporary permissions
|
||||
$p->delete('contact_delete', 'temp');
|
||||
@@ -604,4 +604,4 @@ function curl_file_get_contents($url) {
|
||||
curl_close($curl);
|
||||
return $contents;
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -138,23 +138,47 @@
|
||||
$sql_search .= ") ";
|
||||
}
|
||||
else {
|
||||
$sql_search .= "and contact_uuid in ( ";
|
||||
$sql_search .= " select contact_uuid from v_contacts ";
|
||||
$sql_search .= " where domain_uuid = :domain_uuid ";
|
||||
$sql_search .= " and ( ";
|
||||
$sql_search .= " lower(contact_organization) like :search or ";
|
||||
$sql_search .= " lower(contact_name_given) like :search or ";
|
||||
$sql_search .= " lower(contact_name_family) like :search or ";
|
||||
$sql_search .= " lower(contact_nickname) like :search or ";
|
||||
$sql_search .= " lower(contact_title) like :search or ";
|
||||
$sql_search .= " lower(contact_category) like :search or ";
|
||||
$sql_search .= " lower(contact_role) like :search or ";
|
||||
$sql_search .= " lower(contact_url) like :search or ";
|
||||
$sql_search .= " lower(contact_time_zone) like :search or ";
|
||||
$sql_search .= " lower(contact_note) like :search or ";
|
||||
$sql_search .= " lower(contact_type) like :search ";
|
||||
$sql_search .= " ) ";
|
||||
$sql_search .= ") ";
|
||||
//open container
|
||||
$sql_search .= "and ( ";
|
||||
//search contact
|
||||
$sql_search .= "contact_uuid in ( ";
|
||||
$sql_search .= " select contact_uuid from v_contacts ";
|
||||
$sql_search .= " where domain_uuid = :domain_uuid ";
|
||||
$sql_search .= " and ( ";
|
||||
$sql_search .= " lower(contact_organization) like :search or ";
|
||||
$sql_search .= " lower(contact_name_given) like :search or ";
|
||||
$sql_search .= " lower(contact_name_family) like :search or ";
|
||||
$sql_search .= " lower(contact_nickname) like :search or ";
|
||||
$sql_search .= " lower(contact_title) like :search or ";
|
||||
$sql_search .= " lower(contact_category) like :search or ";
|
||||
$sql_search .= " lower(contact_role) like :search or ";
|
||||
$sql_search .= " lower(contact_url) like :search or ";
|
||||
$sql_search .= " lower(contact_time_zone) like :search or ";
|
||||
$sql_search .= " lower(contact_note) like :search or ";
|
||||
$sql_search .= " lower(contact_type) like :search ";
|
||||
$sql_search .= " ) ";
|
||||
$sql_search .= ") ";
|
||||
//search contact emails
|
||||
if (permission_exists('contact_email_view')) {
|
||||
$sql_search .= "or contact_uuid in ( ";
|
||||
$sql_search .= " select contact_uuid from v_contact_emails ";
|
||||
$sql_search .= " where domain_uuid = :domain_uuid ";
|
||||
$sql_search .= " and ( ";
|
||||
$sql_search .= " lower(email_address) like :search or ";
|
||||
$sql_search .= " lower(email_description) like :search ";
|
||||
$sql_search .= " ) ";
|
||||
$sql_search .= ") ";
|
||||
}
|
||||
//search contact notes
|
||||
if (permission_exists('contact_note_view')) {
|
||||
$sql_search .= "or contact_uuid in ( ";
|
||||
$sql_search .= " select contact_uuid from v_contact_notes ";
|
||||
$sql_search .= " where domain_uuid = :domain_uuid ";
|
||||
$sql_search .= " and lower(contact_note) like :search ";
|
||||
$sql_search .= ") ";
|
||||
}
|
||||
//close container
|
||||
$sql_search .= ") ";
|
||||
}
|
||||
$parameters['search'] = '%'.$search.'%';
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ if (is_array($_GET) && @sizeof($_GET) != 0) {
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
if (is_array($result) && @sizeof($result) != 0) {
|
||||
$e = 0;
|
||||
$e = 1;
|
||||
foreach ($result as &$row) {
|
||||
$vcard->data['email'.$e] = $row["email_address"];
|
||||
if ($e++ == 2) { break; } //limit to 2 rows
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
$apps[$x]['uuid'] = "5ec89622-b19c-3559-64f0-afde802ab139";
|
||||
$apps[$x]['category'] = "Switch";
|
||||
$apps[$x]['subcategory'] = "";
|
||||
$apps[$x]['version'] = "1.0";
|
||||
$apps[$x]['version'] = "1.1";
|
||||
$apps[$x]['license'] = "Mozilla Public License 1.1";
|
||||
$apps[$x]['url'] = "http://www.fusionpbx.com";
|
||||
$apps[$x]['description']['en-us'] = "Used to define external destination numbers.";
|
||||
@@ -34,17 +34,17 @@
|
||||
$apps[$x]['destinations'][$y]['type'] = "sql";
|
||||
$apps[$x]['destinations'][$y]['label'] = "destinations";
|
||||
$apps[$x]['destinations'][$y]['name'] = "destinations";
|
||||
$apps[$x]['destinations'][$y]['sql'] = "select destination_number as destination, destination_context as context, destination_description as description from v_destinations ";
|
||||
$apps[$x]['destinations'][$y]['sql'] = "select destination_uuid, destination_number, destination_context, destination_description from v_destinations ";
|
||||
$apps[$x]['destinations'][$y]['where'] = "where (domain_uuid = '\${domain_uuid}' or domain_uuid is null) and (destination_type = 'outbound' or destination_type = 'local') and destination_enabled = 'true' ";
|
||||
$apps[$x]['destinations'][$y]['order_by'] = "destination_number asc";
|
||||
$apps[$x]['destinations'][$y]['field']['uuid'] = "destination_uuid";
|
||||
$apps[$x]['destinations'][$y]['field']['context'] = "destination_context";
|
||||
$apps[$x]['destinations'][$y]['field']['destination'] = "destination_number";
|
||||
$apps[$x]['destinations'][$y]['field']['description'] = "destination_description";
|
||||
$apps[$x]['destinations'][$y]['select_value']['dialplan'] = "transfer:\${destination} XML \${context}";
|
||||
$apps[$x]['destinations'][$y]['select_value']['ivr'] = "menu-exec-app:transfer \${destination} XML \${context}";
|
||||
$apps[$x]['destinations'][$y]['select_value']['user_contact'] = "loopback/\${destination}";
|
||||
$apps[$x]['destinations'][$y]['select_label'] = "\${destination} \${description}";
|
||||
$apps[$x]['destinations'][$y]['field']['destination_uuid'] = "destination_uuid";
|
||||
$apps[$x]['destinations'][$y]['field']['destination_number'] = "destination_number";
|
||||
$apps[$x]['destinations'][$y]['field']['destination_context'] = "destination_context";
|
||||
$apps[$x]['destinations'][$y]['field']['destination_description'] = "destination_description";
|
||||
$apps[$x]['destinations'][$y]['select_value']['dialplan'] = "transfer:\${destination_number} XML \${destination_context}";
|
||||
$apps[$x]['destinations'][$y]['select_value']['ivr'] = "menu-exec-app:transfer \${destination_number} XML \${destination_context}";
|
||||
$apps[$x]['destinations'][$y]['select_value']['user_contact'] = "loopback/\${destination_number}";
|
||||
$apps[$x]['destinations'][$y]['select_label'] = "\${destination_number} \${destination_description}";
|
||||
|
||||
//permission details
|
||||
$y=0;
|
||||
@@ -79,9 +79,15 @@
|
||||
$apps[$x]['permissions'][$y]['name'] = "destination_record";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "destination_trunk_prefix";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "destination_area_code";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "destination_number";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "destination_condition_field";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "destination_caller_id_name";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
@@ -94,7 +100,6 @@
|
||||
$apps[$x]['permissions'][$y]['name'] = "destination_fax";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "destination_destinations";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
@@ -117,6 +122,14 @@
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "3141e4ad-a892-4a51-8789-aa27be54ee94";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "destinations";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "dialplan_mode";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "multiple";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
|
||||
|
||||
//cache details
|
||||
$apps[$x]['cache']['key'] = "dialplan.\${destination_context}";
|
||||
@@ -170,10 +183,22 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the number.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_trunk_prefix";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the trunk prefix.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_area_code";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the area code.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_prefix";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the prefix.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "destination_condition_field";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the condition.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_number_regex";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Regular Expression version of destination number";
|
||||
@@ -201,6 +226,10 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Select whether to record the call.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_hold_music";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Select whether to set music on hold.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_accountcode";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
|
||||
|
||||
@@ -39,8 +39,7 @@
|
||||
if (is_array($extensions) && @sizeof($extensions) != 0) {
|
||||
foreach($extensions as $row) {
|
||||
$sql = "update v_destinations ";
|
||||
$sql .= "set destination_app = :destination_app ";
|
||||
$sql .= "destination_data = :destination_data ";
|
||||
$sql .= "set destination_app = :destination_app, destination_data = :destination_data ";
|
||||
$sql .= "where dialplan_uuid = :dialplan_uuid ";
|
||||
$parameters['destination_app'] = $row['destination_app'];
|
||||
$parameters['destination_data'] = $row['destination_data'];
|
||||
|
||||
@@ -442,26 +442,26 @@ $text['label-destination_type']['ru-ru'] = "Тип";
|
||||
$text['label-destination_type']['sv-se'] = "Typ";
|
||||
$text['label-destination_type']['uk-ua'] = "Тип";
|
||||
|
||||
$text['label-destination_number']['en-us'] = "Destination";
|
||||
$text['label-destination_number']['en-gb'] = "Destination";
|
||||
$text['label-destination_number']['ar-eg'] = "جهه الأتصال";
|
||||
$text['label-destination_number']['de-at'] = "Ziel"; //copied from de-de
|
||||
$text['label-destination_number']['de-ch'] = "Ziel"; //copied from de-de
|
||||
$text['label-destination_number']['de-de'] = "Ziel";
|
||||
$text['label-destination_number']['es-cl'] = "Destino";
|
||||
$text['label-destination_number']['es-mx'] = "Destino"; //copied from es-cl
|
||||
$text['label-destination_number']['fr-ca'] = "Destination"; //copied from fr-fr
|
||||
$text['label-destination_number']['fr-fr'] = "Destination";
|
||||
$text['label-destination_number']['he-il'] = "יעד";
|
||||
$text['label-destination_number']['it-it'] = "Destinazione";
|
||||
$text['label-destination_number']['nl-nl'] = "Bestemming";
|
||||
$text['label-destination_number']['pl-pl'] = "Destynacja";
|
||||
$text['label-destination_number']['pt-br'] = "Destino"; //copied from pt-pt
|
||||
$text['label-destination_number']['pt-pt'] = "Desvio";
|
||||
$text['label-destination_number']['ro-ro'] = "";
|
||||
$text['label-destination_number']['ru-ru'] = "Направление";
|
||||
$text['label-destination_number']['sv-se'] = "Destination";
|
||||
$text['label-destination_number']['uk-ua'] = "Номер";
|
||||
$text['label-destination_country_code']['en-us'] = "Country Code";
|
||||
$text['label-destination_country_code']['en-gb'] = "Country Code";
|
||||
$text['label-destination_country_code']['ar-eg'] = "";
|
||||
$text['label-destination_country_code']['de-at'] = ""; //copied from de-de
|
||||
$text['label-destination_country_code']['de-ch'] = ""; //copied from de-de
|
||||
$text['label-destination_country_code']['de-de'] = "";
|
||||
$text['label-destination_country_code']['es-cl'] = "";
|
||||
$text['label-destination_country_code']['es-mx'] = ""; //copied from es-cl
|
||||
$text['label-destination_country_code']['fr-ca'] = "Préfixe"; //copied from fr-fr
|
||||
$text['label-destination_country_code']['fr-fr'] = "Préfixe";
|
||||
$text['label-destination_country_code']['he-il'] = "";
|
||||
$text['label-destination_country_code']['it-it'] = "";
|
||||
$text['label-destination_country_code']['nl-nl'] = "Voorloop";
|
||||
$text['label-destination_country_code']['pl-pl'] = "";
|
||||
$text['label-destination_country_code']['pt-br'] = "Prefixo"; //copied from pt-pt
|
||||
$text['label-destination_country_code']['pt-pt'] = "";
|
||||
$text['label-destination_country_code']['ro-ro'] = "";
|
||||
$text['label-destination_country_code']['ru-ru'] = "";
|
||||
$text['label-destination_country_code']['sv-se'] = "";
|
||||
$text['label-destination_country_code']['uk-ua'] = "";
|
||||
|
||||
$text['label-destination_prefix']['en-us'] = "Prefix";
|
||||
$text['label-destination_prefix']['en-gb'] = "Prefix";
|
||||
@@ -484,6 +484,90 @@ $text['label-destination_prefix']['ru-ru'] = "";
|
||||
$text['label-destination_prefix']['sv-se'] = "";
|
||||
$text['label-destination_prefix']['uk-ua'] = "";
|
||||
|
||||
$text['label-destination_trunk_prefix']['en-us'] = "Trunk Prefix";
|
||||
$text['label-destination_trunk_prefix']['en-gb'] = "Trunk Prefix";
|
||||
$text['label-destination_trunk_prefix']['ar-eg'] = "";
|
||||
$text['label-destination_trunk_prefix']['de-at'] = ""; //copied from de-de
|
||||
$text['label-destination_trunk_prefix']['de-ch'] = ""; //copied from de-de
|
||||
$text['label-destination_trunk_prefix']['de-de'] = "";
|
||||
$text['label-destination_trunk_prefix']['es-cl'] = "";
|
||||
$text['label-destination_trunk_prefix']['es-mx'] = ""; //copied from es-cl
|
||||
$text['label-destination_trunk_prefix']['fr-ca'] = "Préfixe"; //copied from fr-fr
|
||||
$text['label-destination_trunk_prefix']['fr-fr'] = "Préfixe";
|
||||
$text['label-destination_trunk_prefix']['he-il'] = "";
|
||||
$text['label-destination_trunk_prefix']['it-it'] = "";
|
||||
$text['label-destination_trunk_prefix']['nl-nl'] = "Voorloop";
|
||||
$text['label-destination_trunk_prefix']['pl-pl'] = "";
|
||||
$text['label-destination_trunk_prefix']['pt-br'] = "Prefixo"; //copied from pt-pt
|
||||
$text['label-destination_trunk_prefix']['pt-pt'] = "";
|
||||
$text['label-destination_trunk_prefix']['ro-ro'] = "";
|
||||
$text['label-destination_trunk_prefix']['ru-ru'] = "";
|
||||
$text['label-destination_trunk_prefix']['sv-se'] = "";
|
||||
$text['label-destination_trunk_prefix']['uk-ua'] = "";
|
||||
|
||||
$text['label-destination_area_code']['en-us'] = "Area Code";
|
||||
$text['label-destination_area_code']['en-gb'] = "Area Code";
|
||||
$text['label-destination_area_code']['ar-eg'] = "";
|
||||
$text['label-destination_area_code']['de-at'] = ""; //copied from de-de
|
||||
$text['label-destination_area_code']['de-ch'] = ""; //copied from de-de
|
||||
$text['label-destination_area_code']['de-de'] = "";
|
||||
$text['label-destination_area_code']['es-cl'] = "";
|
||||
$text['label-destination_area_code']['es-mx'] = ""; //copied from es-cl
|
||||
$text['label-destination_area_code']['fr-ca'] = ""; //copied from fr-fr
|
||||
$text['label-destination_area_code']['fr-fr'] = "";
|
||||
$text['label-destination_area_code']['he-il'] = "";
|
||||
$text['label-destination_area_code']['it-it'] = "";
|
||||
$text['label-destination_area_code']['nl-nl'] = "";
|
||||
$text['label-destination_area_code']['pl-pl'] = "";
|
||||
$text['label-destination_area_code']['pt-br'] = ""; //copied from pt-pt
|
||||
$text['label-destination_area_code']['pt-pt'] = "";
|
||||
$text['label-destination_area_code']['ro-ro'] = "";
|
||||
$text['label-destination_area_code']['ru-ru'] = "";
|
||||
$text['label-destination_area_code']['sv-se'] = "";
|
||||
$text['label-destination_area_code']['uk-ua'] = "";
|
||||
|
||||
$text['label-destination_number']['en-us'] = "Destination";
|
||||
$text['label-destination_number']['en-gb'] = "Destination";
|
||||
$text['label-destination_number']['ar-eg'] = "جهه الأتصال";
|
||||
$text['label-destination_number']['de-at'] = "Ziel"; //copied from de-de
|
||||
$text['label-destination_number']['de-ch'] = "Ziel"; //copied from de-de
|
||||
$text['label-destination_number']['de-de'] = "Ziel";
|
||||
$text['label-destination_number']['es-cl'] = "Destino";
|
||||
$text['label-destination_number']['es-mx'] = "Destino"; //copied from es-cl
|
||||
$text['label-destination_number']['fr-ca'] = "Destination"; //copied from fr-fr
|
||||
$text['label-destination_number']['fr-fr'] = "Destination";
|
||||
$text['label-destination_number']['he-il'] = "יעד";
|
||||
$text['label-destination_number']['it-it'] = "Destinazione";
|
||||
$text['label-destination_number']['nl-nl'] = "Bestemming";
|
||||
$text['label-destination_number']['pl-pl'] = "Destynacja";
|
||||
$text['label-destination_number']['pt-br'] = "Destino"; //copied from pt-pt
|
||||
$text['label-destination_number']['pt-pt'] = "Desvio";
|
||||
$text['label-destination_number']['ro-ro'] = "";
|
||||
$text['label-destination_number']['ru-ru'] = "Направление";
|
||||
$text['label-destination_number']['sv-se'] = "Destination";
|
||||
$text['label-destination_number']['uk-ua'] = "Номер";
|
||||
|
||||
$text['label-destination_condition_field']['en-us'] = "Condition";
|
||||
$text['label-destination_condition_field']['en-gb'] = "Condition";
|
||||
$text['label-destination_condition_field']['ar-eg'] = "";
|
||||
$text['label-destination_condition_field']['de-at'] = ""; //copied from de-de
|
||||
$text['label-destination_condition_field']['de-ch'] = ""; //copied from de-de
|
||||
$text['label-destination_condition_field']['de-de'] = "";
|
||||
$text['label-destination_condition_field']['es-cl'] = "";
|
||||
$text['label-destination_condition_field']['es-mx'] = ""; //copied from es-cl
|
||||
$text['label-destination_condition_field']['fr-ca'] = ""; //copied from fr-fr
|
||||
$text['label-destination_condition_field']['fr-fr'] = "";
|
||||
$text['label-destination_condition_field']['he-il'] = "";
|
||||
$text['label-destination_condition_field']['it-it'] = "";
|
||||
$text['label-destination_condition_field']['nl-nl'] = "";
|
||||
$text['label-destination_condition_field']['pl-pl'] = "";
|
||||
$text['label-destination_condition_field']['pt-br'] = ""; //copied from pt-pt
|
||||
$text['label-destination_condition_field']['pt-pt'] = "";
|
||||
$text['label-destination_condition_field']['ro-ro'] = "";
|
||||
$text['label-destination_condition_field']['ru-ru'] = "";
|
||||
$text['label-destination_condition_field']['sv-se'] = "";
|
||||
$text['label-destination_condition_field']['uk-ua'] = "";
|
||||
|
||||
$text['label-destination_enabled']['en-us'] = "Enabled";
|
||||
$text['label-destination_enabled']['en-gb'] = "Enabled";
|
||||
$text['label-destination_enabled']['ar-eg'] = "مفعل";
|
||||
@@ -631,6 +715,27 @@ $text['label-carrier']['ru-ru'] = "Название оператора";
|
||||
$text['label-carrier']['sv-se'] = "Operatör";
|
||||
$text['label-carrier']['uk-ua'] = "Назва оператора";
|
||||
|
||||
$text['label-destination_hold_music']['en-us'] = "Hold Music";
|
||||
$text['label-destination_hold_music']['en-gb'] = "Hold Music";
|
||||
$text['label-destination_hold_music']['ar-eg'] = "";
|
||||
$text['label-destination_hold_music']['de-at'] = "Wartemusik"; //copied from de-de
|
||||
$text['label-destination_hold_music']['de-ch'] = "Wartemusik"; //copied from de-de
|
||||
$text['label-destination_hold_music']['de-de'] = "Wartemusik";
|
||||
$text['label-destination_hold_music']['es-cl'] = "Música en Espera";
|
||||
$text['label-destination_hold_music']['es-mx'] = "Música en Espera"; //copied from es-cl
|
||||
$text['label-destination_hold_music']['fr-ca'] = "Musique de Garde"; //copied from fr-fr
|
||||
$text['label-destination_hold_music']['fr-fr'] = "Musique de Garde";
|
||||
$text['label-destination_hold_music']['he-il'] = "מוסיקה בהמתנה";
|
||||
$text['label-destination_hold_music']['it-it'] = "Musica di Attesa";
|
||||
$text['label-destination_hold_music']['nl-nl'] = "Wachtmuziek";
|
||||
$text['label-destination_hold_music']['pl-pl'] = "Muzyka na czekanie";
|
||||
$text['label-destination_hold_music']['pt-br'] = "Música de espera";
|
||||
$text['label-destination_hold_music']['pt-pt'] = "Música em Espera";
|
||||
$text['label-destination_hold_music']['ro-ro'] = "";
|
||||
$text['label-destination_hold_music']['ru-ru'] = "Музыка на Удержании";
|
||||
$text['label-destination_hold_music']['sv-se'] = "Vänt-musik";
|
||||
$text['label-destination_hold_music']['uk-ua'] = "";
|
||||
|
||||
$text['label-destination_record']['en-us'] = "Record";
|
||||
$text['label-destination_record']['en-gb'] = "Record";
|
||||
$text['label-destination_record']['ar-eg'] = "";
|
||||
@@ -1009,26 +1114,89 @@ $text['description-destination_number']['ru-ru'] = "Введите номер н
|
||||
$text['description-destination_number']['sv-se'] = "Ange destinationen.";
|
||||
$text['description-destination_number']['uk-ua'] = "Введіть номер";
|
||||
|
||||
$text['description-destination_prefix']['en-us'] = "Enter the destination prefix.";
|
||||
$text['description-destination_prefix']['en-gb'] = "Enter the destination prefix.";
|
||||
$text['description-destination_prefix']['ar-eg'] = "";
|
||||
$text['description-destination_prefix']['de-at'] = ""; //copied from de-de
|
||||
$text['description-destination_prefix']['de-ch'] = ""; //copied from de-de
|
||||
$text['description-destination_prefix']['de-de'] = "";
|
||||
$text['description-destination_prefix']['es-cl'] = "";
|
||||
$text['description-destination_prefix']['es-mx'] = ""; //copied from es-cl
|
||||
$text['description-destination_prefix']['fr-ca'] = "Entrez le préfixe de destination."; //copied from fr-fr
|
||||
$text['description-destination_prefix']['fr-fr'] = "Entrez le préfixe de destination.";
|
||||
$text['description-destination_prefix']['he-il'] = "";
|
||||
$text['description-destination_prefix']['it-it'] = "";
|
||||
$text['description-destination_prefix']['nl-nl'] = "Voer de bestemming prefix in.";
|
||||
$text['description-destination_prefix']['pl-pl'] = "";
|
||||
$text['description-destination_prefix']['pt-br'] = "Insira o prefixo do destino.";
|
||||
$text['description-destination_prefix']['pt-pt'] = "";
|
||||
$text['description-destination_prefix']['ro-ro'] = "";
|
||||
$text['description-destination_prefix']['ru-ru'] = "";
|
||||
$text['description-destination_prefix']['sv-se'] = "";
|
||||
$text['description-destination_prefix']['uk-ua'] = "";
|
||||
$text['description-destination_condition_field']['en-us'] = "Enter the destination condition.";
|
||||
$text['description-destination_condition_field']['en-gb'] = "Enter the destination condition.";
|
||||
$text['description-destination_condition_field']['ar-eg'] = "";
|
||||
$text['description-destination_condition_field']['de-at'] = ""; //copied from de-de
|
||||
$text['description-destination_condition_field']['de-ch'] = ""; //copied from de-de
|
||||
$text['description-destination_condition_field']['de-de'] = "";
|
||||
$text['description-destination_condition_field']['es-cl'] = "";
|
||||
$text['description-destination_condition_field']['es-mx'] = ""; //copied from es-cl
|
||||
$text['description-destination_condition_field']['fr-ca'] = ""; //copied from fr-fr
|
||||
$text['description-destination_condition_field']['fr-fr'] = "";
|
||||
$text['description-destination_condition_field']['he-il'] = "";
|
||||
$text['description-destination_condition_field']['it-it'] = "";
|
||||
$text['description-destination_condition_field']['nl-nl'] = "";
|
||||
$text['description-destination_condition_field']['pl-pl'] = "";
|
||||
$text['description-destination_condition_field']['pt-br'] = "";
|
||||
$text['description-destination_condition_field']['pt-pt'] = "";
|
||||
$text['description-destination_condition_field']['ro-ro'] = "";
|
||||
$text['description-destination_condition_field']['ru-ru'] = "";
|
||||
$text['description-destination_condition_field']['sv-se'] = "";
|
||||
$text['description-destination_condition_field']['uk-ua'] = "";
|
||||
|
||||
$text['description-destination_country_code']['en-us'] = "Enter the country code.";
|
||||
$text['description-destination_country_code']['en-gb'] = "Enter the country code.";
|
||||
$text['description-destination_country_code']['ar-eg'] = "";
|
||||
$text['description-destination_country_code']['de-at'] = ""; //copied from de-de
|
||||
$text['description-destination_country_code']['de-ch'] = ""; //copied from de-de
|
||||
$text['description-destination_country_code']['de-de'] = "";
|
||||
$text['description-destination_country_code']['es-cl'] = "";
|
||||
$text['description-destination_country_code']['es-mx'] = ""; //copied from es-cl
|
||||
$text['description-destination_country_code']['fr-ca'] = "Entrez le préfixe de destination."; //copied from fr-fr
|
||||
$text['description-destination_country_code']['fr-fr'] = "Entrez le préfixe de destination.";
|
||||
$text['description-destination_country_code']['he-il'] = "";
|
||||
$text['description-destination_country_code']['it-it'] = "";
|
||||
$text['description-destination_country_code']['nl-nl'] = "Voer de bestemming prefix in.";
|
||||
$text['description-destination_country_code']['pl-pl'] = "";
|
||||
$text['description-destination_country_code']['pt-br'] = "Insira o prefixo do destino.";
|
||||
$text['description-destination_country_code']['pt-pt'] = "";
|
||||
$text['description-destination_country_code']['ro-ro'] = "";
|
||||
$text['description-destination_country_code']['ru-ru'] = "";
|
||||
$text['description-destination_country_code']['sv-se'] = "";
|
||||
$text['description-destination_country_code']['uk-ua'] = "";
|
||||
|
||||
$text['description-destination_trunk_prefix']['en-us'] = "Enter the trunk prefix.";
|
||||
$text['description-destination_trunk_prefix']['en-gb'] = "Enter the trunk prefix.";
|
||||
$text['description-destination_trunk_prefix']['ar-eg'] = "";
|
||||
$text['description-destination_trunk_prefix']['de-at'] = ""; //copied from de-de
|
||||
$text['description-destination_trunk_prefix']['de-ch'] = ""; //copied from de-de
|
||||
$text['description-destination_trunk_prefix']['de-de'] = "";
|
||||
$text['description-destination_trunk_prefix']['es-cl'] = "";
|
||||
$text['description-destination_trunk_prefix']['es-mx'] = ""; //copied from es-cl
|
||||
$text['description-destination_trunk_prefix']['fr-ca'] = "Préfixe"; //copied from fr-fr
|
||||
$text['description-destination_trunk_prefix']['fr-fr'] = "Préfixe";
|
||||
$text['description-destination_trunk_prefix']['he-il'] = "";
|
||||
$text['description-destination_trunk_prefix']['it-it'] = "";
|
||||
$text['description-destination_trunk_prefix']['nl-nl'] = "Voorloop";
|
||||
$text['description-destination_trunk_prefix']['pl-pl'] = "";
|
||||
$text['description-destination_trunk_prefix']['pt-br'] = "Prefixo"; //copied from pt-pt
|
||||
$text['description-destination_trunk_prefix']['pt-pt'] = "";
|
||||
$text['description-destination_trunk_prefix']['ro-ro'] = "";
|
||||
$text['description-destination_trunk_prefix']['ru-ru'] = "";
|
||||
$text['description-destination_trunk_prefix']['sv-se'] = "";
|
||||
$text['description-destination_trunk_prefix']['uk-ua'] = "";
|
||||
|
||||
$text['description-destination_area_code']['en-us'] = "Enter the area code.";
|
||||
$text['description-destination_area_code']['en-gb'] = "Enter the area code.";
|
||||
$text['description-destination_area_code']['ar-eg'] = "";
|
||||
$text['description-destination_area_code']['de-at'] = ""; //copied from de-de
|
||||
$text['description-destination_area_code']['de-ch'] = ""; //copied from de-de
|
||||
$text['description-destination_area_code']['de-de'] = "";
|
||||
$text['description-destination_area_code']['es-cl'] = "";
|
||||
$text['description-destination_area_code']['es-mx'] = ""; //copied from es-cl
|
||||
$text['description-destination_area_code']['fr-ca'] = ""; //copied from fr-fr
|
||||
$text['description-destination_area_code']['fr-fr'] = "";
|
||||
$text['description-destination_area_code']['he-il'] = "";
|
||||
$text['description-destination_area_code']['it-it'] = "";
|
||||
$text['description-destination_area_code']['nl-nl'] = "";
|
||||
$text['description-destination_area_code']['pl-pl'] = "";
|
||||
$text['description-destination_area_code']['pt-br'] = ""; //copied from pt-pt
|
||||
$text['description-destination_area_code']['pt-pt'] = "";
|
||||
$text['description-destination_area_code']['ro-ro'] = "";
|
||||
$text['description-destination_area_code']['ru-ru'] = "";
|
||||
$text['description-destination_area_code']['sv-se'] = "";
|
||||
$text['description-destination_area_code']['uk-ua'] = "";
|
||||
|
||||
$text['description-destination_enabled']['en-us'] = "Set the current status of this destination.";
|
||||
$text['description-destination_enabled']['en-gb'] = "Set the current status of this destination.";
|
||||
@@ -1177,6 +1345,27 @@ $text['description-carrier']['ru-ru'] = "Введите имя оператор
|
||||
$text['description-carrier']['sv-se'] = "Ange operatörens namn. Detta används för att hålla reda på debitering.";
|
||||
$text['description-carrier']['uk-ua'] = "Введіть назву оператора. Використовується для тарифікації";
|
||||
|
||||
$text['description-destination_hold_music']['en-us'] = "Select the MOH Category here.";
|
||||
$text['description-destination_hold_music']['en-gb'] = "Select the MOH Category here.";
|
||||
$text['description-destination_hold_music']['ar-eg'] = "";
|
||||
$text['description-destination_hold_music']['de-at'] = "Wählen Sie die Wartemusik Kategorie."; //copied from de-de
|
||||
$text['description-destination_hold_music']['de-ch'] = "Wählen Sie die Wartemusik Kategorie."; //copied from de-de
|
||||
$text['description-destination_hold_music']['de-de'] = "Wählen Sie die Wartemusik Kategorie.";
|
||||
$text['description-destination_hold_music']['es-cl'] = "Ingrese la categoría de música en espera aquí";
|
||||
$text['description-destination_hold_music']['es-mx'] = "Ingrese la categoría de música en espera aquí"; //copied from es-cl
|
||||
$text['description-destination_hold_music']['fr-ca'] = "Choisir la musique de garde."; //copied from fr-fr
|
||||
$text['description-destination_hold_music']['fr-fr'] = "Choisir la musique de garde.";
|
||||
$text['description-destination_hold_music']['he-il'] = "";
|
||||
$text['description-destination_hold_music']['it-it'] = "Seleziona la categoria di Musica d'attesa.";
|
||||
$text['description-destination_hold_music']['nl-nl'] = "Kies Wachtmuziek hier.";
|
||||
$text['description-destination_hold_music']['pl-pl'] = "Wybierz kategorie muzyki na czekanie.";
|
||||
$text['description-destination_hold_music']['pt-br'] = "Escolha a categoria de música de espera aqui (MOH).";
|
||||
$text['description-destination_hold_music']['pt-pt'] = "Escolha a categoria MOH da música aqui.";
|
||||
$text['description-destination_hold_music']['ro-ro'] = "";
|
||||
$text['description-destination_hold_music']['ru-ru'] = "Выберите мелодию Музыки на Ожидании (MOH).";
|
||||
$text['description-destination_hold_music']['sv-se'] = "Välj MOH Kategori här.";
|
||||
$text['description-destination_hold_music']['uk-ua'] = "";
|
||||
|
||||
$text['description-destination_record']['en-us'] = "Save the recording.";
|
||||
$text['description-destination_record']['en-gb'] = "Save the recording.";
|
||||
$text['description-destination_record']['ar-eg'] = "";
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
switch ($_GET['type']) {
|
||||
case 'inbound': $destination_type = 'inbound'; break;
|
||||
case 'outbound': $destination_type = 'outbound'; break;
|
||||
//case 'local': $destination_type = 'local'; break;
|
||||
case 'local': $destination_type = 'local'; break;
|
||||
default: $destination_type = 'inbound';
|
||||
}
|
||||
|
||||
@@ -84,8 +84,11 @@
|
||||
$dialplan_uuid = trim($_POST["dialplan_uuid"]);
|
||||
$domain_uuid = trim($_POST["domain_uuid"]);
|
||||
$destination_type = trim($_POST["destination_type"]);
|
||||
$destination_condition_field = trim($_POST["destination_condition_field"]);
|
||||
$destination_number = trim($_POST["destination_number"]);
|
||||
$destination_prefix = trim($_POST["destination_prefix"]);
|
||||
$destination_trunk_prefix = trim($_POST["destination_trunk_prefix"]);
|
||||
$destination_area_code = trim($_POST["destination_area_code"]);
|
||||
$db_destination_number = trim($_POST["db_destination_number"]);
|
||||
$destination_caller_id_name = trim($_POST["destination_caller_id_name"]);
|
||||
$destination_caller_id_number = trim($_POST["destination_caller_id_number"]);
|
||||
@@ -98,6 +101,7 @@
|
||||
$currency = trim($_POST["currency"]);
|
||||
$destination_buy = check_float($_POST["destination_buy"]);
|
||||
$currency_buy = trim($_POST["currency_buy"]);
|
||||
$destination_hold_music = trim($_POST["destination_hold_music"]);
|
||||
$destination_record = trim($_POST["destination_record"]);
|
||||
$destination_accountcode = trim($_POST["destination_accountcode"]);
|
||||
$destination_type_voice = $_POST["destination_type_voice"];
|
||||
@@ -233,10 +237,19 @@
|
||||
$database = new database;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (is_array($row) && @sizeof($row) != 0) {
|
||||
if (!permission_exists('destination_trunk_prefix')) {
|
||||
$destination_trunk_prefix = $row["destination_trunk_prefix"];
|
||||
}
|
||||
if (!permission_exists('destination_area_code')) {
|
||||
$destination_area_code = $row["destination_area_code"];
|
||||
}
|
||||
if (!permission_exists('destination_number')) {
|
||||
$destination_number = $row["destination_number"];
|
||||
$destination_prefix = $row["destination_prefix"];
|
||||
}
|
||||
if (!permission_exists('destination_condition_field')) {
|
||||
$destination_condition_field = $row["destination_condition_field"];
|
||||
}
|
||||
if (!permission_exists('destination_context')) {
|
||||
$destination_context = $row["destination_context"];
|
||||
}
|
||||
@@ -245,7 +258,7 @@
|
||||
}
|
||||
|
||||
//convert the number to a regular expression
|
||||
$destination_number_regex = string_to_regex($destination_number, $destination_prefix);
|
||||
$destination_number_regex = string_to_regex($destination_area_code.$destination_number, $destination_prefix);
|
||||
|
||||
//if empty then get new uuid
|
||||
if (!is_uuid($dialplan_uuid)) {
|
||||
@@ -264,8 +277,8 @@
|
||||
}
|
||||
$dialplan["dialplan_uuid"] = $dialplan_uuid;
|
||||
$dialplan["domain_uuid"] = $domain_uuid;
|
||||
$dialplan["dialplan_name"] = ($dialplan_name != '') ? $dialplan_name : format_phone($destination_number);
|
||||
$dialplan["dialplan_number"] = $destination_number;
|
||||
$dialplan["dialplan_name"] = ($dialplan_name != '') ? $dialplan_name : format_phone($destination_area_code.$destination_number);
|
||||
$dialplan["dialplan_number"] = $destination_area_code.$destination_number;
|
||||
$dialplan["dialplan_context"] = $destination_context;
|
||||
$dialplan["dialplan_continue"] = "false";
|
||||
$dialplan["dialplan_order"] = "100";
|
||||
@@ -274,7 +287,10 @@
|
||||
$dialplan_detail_order = 10;
|
||||
|
||||
//set the dialplan detail type
|
||||
if (strlen($_SESSION['dialplan']['destination']['text']) > 0) {
|
||||
if (strlen($destination_condition_field) > 0) {
|
||||
$dialplan_detail_type = $destination_condition_field;
|
||||
}
|
||||
elseif (strlen($_SESSION['dialplan']['destination']['text']) > 0) {
|
||||
$dialplan_detail_type = $_SESSION['dialplan']['destination']['text'];
|
||||
}
|
||||
else {
|
||||
@@ -301,6 +317,9 @@
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"recording_follow_transfer=true\" inline=\"true\"/>\n";
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"record_session\" data=\"\${record_path}/\${record_name}\" inline=\"false\"/>\n";
|
||||
}
|
||||
if (strlen($destination_hold_music) > 0) {
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"hold_music=".$destination_hold_music."\" inline=\"true\"/>\n";
|
||||
}
|
||||
if (strlen($destination_accountcode) > 0) {
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"accountcode=".$destination_accountcode."\" inline=\"true\"/>\n";
|
||||
}
|
||||
@@ -348,7 +367,10 @@
|
||||
//check the destination number
|
||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "condition";
|
||||
if (strlen($_SESSION['dialplan']['destination']['text']) > 0) {
|
||||
if (strlen($destination_condition_field) > 0) {
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = $destination_condition_field;
|
||||
}
|
||||
elseif (strlen($_SESSION['dialplan']['destination']['text']) > 0) {
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = $_SESSION['dialplan']['destination']['text'];
|
||||
}
|
||||
else {
|
||||
@@ -366,6 +388,7 @@
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "hangup_after_bridge=true";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_inline"] = "true";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
$y++;
|
||||
|
||||
@@ -377,6 +400,7 @@
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "continue_on_fail=true";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_inline"] = "true";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
$y++;
|
||||
|
||||
@@ -389,6 +413,7 @@
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "effective_caller_id_name=".$destination_cid_name_prefix."#\${caller_id_name}";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_inline"] = "true";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
$y++;
|
||||
|
||||
@@ -402,6 +427,7 @@
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "accountcode=".$destination_accountcode;
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_inline"] = "true";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
$y++;
|
||||
|
||||
@@ -415,6 +441,7 @@
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "carrier=$destination_carrier";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_inline"] = "true";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
$y++;
|
||||
|
||||
@@ -422,6 +449,17 @@
|
||||
$dialplan_detail_order = $dialplan_detail_order + 10;
|
||||
}
|
||||
|
||||
//set the hold music
|
||||
if (strlen($destination_hold_music) > 0) {
|
||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "hold_music=".$destination_hold_music;
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_inline"] = "true";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
$y++;
|
||||
}
|
||||
|
||||
//add fax detection
|
||||
if (is_uuid($fax_uuid)) {
|
||||
|
||||
@@ -430,6 +468,7 @@
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "tone_detect_hits=1";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_inline"] = "true";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
$y++;
|
||||
|
||||
@@ -441,6 +480,7 @@
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "execute_on_tone_detect=transfer ".$fax_extension." XML \${domain_name}";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_inline"] = "true";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
$y++;
|
||||
|
||||
@@ -593,15 +633,25 @@
|
||||
$array['destinations'][0]["dialplan_uuid"] = $dialplan_uuid;
|
||||
$array['destinations'][0]["fax_uuid"] = $fax_uuid;
|
||||
$array['destinations'][0]["destination_type"] = $destination_type;
|
||||
if (permission_exists('destination_condition_field')) {
|
||||
$array['destinations'][0]["destination_condition_field"] = $destination_condition_field;
|
||||
}
|
||||
if (permission_exists('destination_number')) {
|
||||
$array['destinations'][0]["destination_number"] = $destination_number;
|
||||
$array['destinations'][0]["destination_number_regex"] = $destination_number_regex;
|
||||
$array['destinations'][0]["destination_prefix"] = $destination_prefix;
|
||||
}
|
||||
if (permission_exists('destination_trunk_prefix')) {
|
||||
$array['destinations'][0]["destination_trunk_prefix"] = $destination_trunk_prefix;
|
||||
}
|
||||
if (permission_exists('destination_area_code')) {
|
||||
$array['destinations'][0]["destination_area_code"] = $destination_area_code;
|
||||
}
|
||||
$array['destinations'][0]["destination_caller_id_name"] = $destination_caller_id_name;
|
||||
$array['destinations'][0]["destination_caller_id_number"] = $destination_caller_id_number;
|
||||
$array['destinations'][0]["destination_cid_name_prefix"] = $destination_cid_name_prefix;
|
||||
$array['destinations'][0]["destination_context"] = $destination_context;
|
||||
$array['destinations'][0]["destination_hold_music"] = $destination_hold_music;
|
||||
$array['destinations'][0]["destination_record"] = $destination_record;
|
||||
$array['destinations'][0]["destination_accountcode"] = $destination_accountcode;
|
||||
$array['destinations'][0]["destination_type_voice"] = $destination_type_voice ? 1 : null;
|
||||
@@ -617,7 +667,6 @@
|
||||
}
|
||||
$array['destinations'][0]["destination_enabled"] = $destination_enabled;
|
||||
$array['destinations'][0]["destination_description"] = $destination_description;
|
||||
|
||||
//prepare the array
|
||||
$array['dialplans'][] = $dialplan;
|
||||
unset($dialplan);
|
||||
@@ -652,9 +701,6 @@
|
||||
$dialplans->uuid = $dialplan_uuid;
|
||||
$dialplans->xml();
|
||||
|
||||
//synchronize the xml config
|
||||
save_dialplan_xml();
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$destination_context);
|
||||
@@ -713,10 +759,14 @@
|
||||
$dialplan_uuid = $row["dialplan_uuid"];
|
||||
$destination_type = $row["destination_type"];
|
||||
$destination_number = $row["destination_number"];
|
||||
$destination_condition_field = $row["destination_condition_field"];
|
||||
$destination_prefix = $row["destination_prefix"];
|
||||
$destination_trunk_prefix = $row["destination_trunk_prefix"];
|
||||
$destination_area_code = $row["destination_area_code"];
|
||||
$destination_caller_id_name = $row["destination_caller_id_name"];
|
||||
$destination_caller_id_number = $row["destination_caller_id_number"];
|
||||
$destination_cid_name_prefix = $row["destination_cid_name_prefix"];
|
||||
$destination_hold_music = $row["destination_hold_music"];
|
||||
$destination_record = $row["destination_record"];
|
||||
$destination_accountcode = $row["destination_accountcode"];
|
||||
$destination_type_voice = $row["destination_type_voice"];
|
||||
@@ -793,7 +843,7 @@
|
||||
if (strlen($destination_type) == 0) { $destination_type = 'inbound'; }
|
||||
if (strlen($destination_context) == 0) { $destination_context = 'public'; }
|
||||
if ($destination_type =="outbound") { $destination_context = $_SESSION['domain_name']; }
|
||||
//if ($destination_type =="local") { $destination_context = $_SESSION['domain_name']; }
|
||||
if ($destination_type =="local") { $destination_context = $_SESSION['domain_name']; }
|
||||
|
||||
//initialize the destinations object
|
||||
$destination = new destinations;
|
||||
@@ -827,7 +877,7 @@
|
||||
echo " if (document.getElementById('tr_buy')) { document.getElementById('tr_buy').style.display = 'none'; }\n";
|
||||
echo " if (document.getElementById('tr_carrier')) { document.getElementById('tr_carrier').style.display = 'none'; }\n";
|
||||
echo " document.getElementById('tr_account_code').style.display = 'none';\n";
|
||||
// echo " document.getElementById('destination_context').value = '".$destination_context."'";
|
||||
//echo " document.getElementById('destination_context').value = '".$destination_context."'";
|
||||
echo " }\n";
|
||||
echo " else if (dir == 'inbound') {\n";
|
||||
echo " if (document.getElementById('tr_caller_id_name')) { document.getElementById('tr_caller_id_name').style.display = ''; }\n";
|
||||
@@ -841,18 +891,18 @@
|
||||
echo " document.getElementById('tr_account_code').style.display = '';\n";
|
||||
echo " document.getElementById('destination_context').value = 'public'";
|
||||
echo " }\n";
|
||||
//echo " else if (dir == 'local') {\n";
|
||||
//echo " if (document.getElementById('tr_caller_id_name')) { document.getElementById('tr_caller_id_name').style.display = 'none'; }\n";
|
||||
//echo " if (document.getElementById('tr_caller_id_number')) { document.getElementById('tr_caller_id_number').style.display = 'none'; }\n";
|
||||
//echo " document.getElementById('tr_actions').style.display = '';\n";
|
||||
//echo " if (document.getElementById('tr_fax_detection')) { document.getElementById('tr_fax_detection').style.display = 'none'; }\n";
|
||||
//echo " document.getElementById('tr_cid_name_prefix').style.display = 'none';\n";
|
||||
//echo " if (document.getElementById('tr_sell')) { document.getElementById('tr_sell').style.display = 'none'; }\n";
|
||||
//echo " if (document.getElementById('tr_buy')) { document.getElementById('tr_buy').style.display = 'none'; }\n";
|
||||
//echo " if (document.getElementById('tr_carrier')) { document.getElementById('tr_carrier').style.display = 'none'; }\n";
|
||||
//echo " document.getElementById('tr_account_code').style.display = '';\n";
|
||||
echo " else if (dir == 'local') {\n";
|
||||
echo " if (document.getElementById('tr_caller_id_name')) { document.getElementById('tr_caller_id_name').style.display = 'none'; }\n";
|
||||
echo " if (document.getElementById('tr_caller_id_number')) { document.getElementById('tr_caller_id_number').style.display = 'none'; }\n";
|
||||
echo " document.getElementById('tr_actions').style.display = '';\n";
|
||||
echo " if (document.getElementById('tr_fax_detection')) { document.getElementById('tr_fax_detection').style.display = 'none'; }\n";
|
||||
echo " document.getElementById('tr_cid_name_prefix').style.display = 'none';\n";
|
||||
echo " if (document.getElementById('tr_sell')) { document.getElementById('tr_sell').style.display = 'none'; }\n";
|
||||
echo " if (document.getElementById('tr_buy')) { document.getElementById('tr_buy').style.display = 'none'; }\n";
|
||||
echo " if (document.getElementById('tr_carrier')) { document.getElementById('tr_carrier').style.display = 'none'; }\n";
|
||||
echo " document.getElementById('tr_account_code').style.display = '';\n";
|
||||
//echo " document.getElementById('destination_context').value = '".$destination_context."'";
|
||||
//echo " }\n";
|
||||
echo " }\n";
|
||||
echo " ";
|
||||
echo " }\n";
|
||||
echo " \n";
|
||||
@@ -903,11 +953,11 @@
|
||||
switch ($destination_type) {
|
||||
case "inbound" : $selected[0] = "selected='selected'"; break;
|
||||
case "outbound" : $selected[1] = "selected='selected'"; break;
|
||||
//case "local" : $selected[2] = "selected='selected'"; break;
|
||||
case "local" : $selected[2] = "selected='selected'"; break;
|
||||
}
|
||||
echo " <option value='inbound' ".$selected[0].">".$text['option-inbound']."</option>\n";
|
||||
echo " <option value='outbound' ".$selected[1].">".$text['option-outbound']."</option>\n";
|
||||
//echo " <option value='local' ".$selected[2].">".$text['option-local']."</option>\n";
|
||||
echo " <option value='local' ".$selected[2].">".$text['option-local']."</option>\n";
|
||||
unset($selected);
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
@@ -918,12 +968,38 @@
|
||||
if (permission_exists('destination_number')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-destination_prefix']."\n";
|
||||
echo " ".$text['label-destination_country_code']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='destination_prefix' maxlength='32' value=\"".escape($destination_prefix)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-destination_prefix']."\n";
|
||||
echo $text['description-destination_country_code']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
if (permission_exists('destination_trunk_prefix')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-destination_trunk_prefix']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='destination_trunk_prefix' maxlength='32' value=\"".escape($destination_trunk_prefix)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-destination_trunk_prefix']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
if (permission_exists('destination_area_code')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-destination_area_code']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='destination_area_code' maxlength='32' value=\"".escape($destination_area_code)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-destination_area_code']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
@@ -943,6 +1019,19 @@
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if (permission_exists('destination_condition_field')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-destination_condition_field']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='destination_condition_field' maxlength='32' value=\"".escape($destination_condition_field)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-destination_condition_field']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
if (permission_exists('destination_caller_id_name')) {
|
||||
echo "<tr id='tr_caller_id_name'>\n";
|
||||
@@ -1097,6 +1186,21 @@
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/music_on_hold')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td width=\"30%\" class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
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";
|
||||
echo $text['description-destination_hold_music']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
echo "<tr id='tr_account_code'>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-account_code']."\n";
|
||||
|
||||
@@ -896,7 +896,7 @@
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='from_row'>\n";
|
||||
$i=1;
|
||||
$i=2;
|
||||
while($i<=99) {
|
||||
$selected = ($i == $from_row) ? "selected" : null;
|
||||
echo " <option value='$i' ".$selected.">$i</option>\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-2019
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2020
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -100,7 +100,7 @@
|
||||
switch ($_GET['type']) {
|
||||
case 'inbound': $destination_type = 'inbound'; break;
|
||||
case 'outbound': $destination_type = 'outbound'; break;
|
||||
//case 'local': $destination_type = 'local'; break;
|
||||
case 'local': $destination_type = 'local'; break;
|
||||
default: $destination_type = 'inbound';
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
echo " <div class='actions'>\n";
|
||||
echo button::create(['type'=>'button','label'=>$text['button-inbound'],'icon'=>'location-arrow fa-rotate-90','link'=>'?type=inbound'.($_GET['show'] == 'all' ? '&show=all' : null).($search != '' ? "&search=".urlencode($search) : null)]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-outbound'],'icon'=>'location-arrow','link'=>'?type=outbound'.($_GET['show'] == 'all' ? '&show=all' : null).($search != '' ? "&search=".urlencode($search) : null)]);
|
||||
//echo button::create(['type'=>'button','label'=>$text['button-local'],'icon'=>'vector-square','link'=>'?type=local'.($_GET['show'] == 'all' ? '&show=all' : null).($search != '' ? "&search=".urlencode($search) : null)]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-local'],'icon'=>'vector-square','link'=>'?type=local'.($_GET['show'] == 'all' ? '&show=all' : null).($search != '' ? "&search=".urlencode($search) : null)]);
|
||||
if (permission_exists('destination_import')) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-import'],'icon'=>$_SESSION['theme']['button_icon_import'],'link'=>'destination_imports.php']);
|
||||
}
|
||||
@@ -225,6 +225,13 @@
|
||||
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, $param, "class='shrink'");
|
||||
}
|
||||
echo th_order_by('destination_type', $text['label-destination_type'], $order_by, $order, $param, "class='shrink'");
|
||||
echo th_order_by('destination_prefix', $text['label-destination_prefix'], $order_by, $order, $param, "class='shrink'");
|
||||
if (permission_exists('destination_trunk_prefix')) {
|
||||
echo th_order_by('destination_trunk_prefix', '', $order_by, $order, $param, "class='shrink'");
|
||||
}
|
||||
if (permission_exists('destination_area_code')) {
|
||||
echo th_order_by('destination_area_code', '', $order_by, $order, $param, "class='shrink'");
|
||||
}
|
||||
echo th_order_by('destination_number', $text['label-destination_number'], $order_by, $order, $param, "class='shrink'");
|
||||
if (!$_GET['show'] == "all") {
|
||||
echo "<th>". $text['label-detail_action']."</th>";
|
||||
@@ -266,14 +273,24 @@
|
||||
echo " <td>".escape($domain)."</td>\n";
|
||||
}
|
||||
echo " <td>".escape($row['destination_type'])." </td>\n";
|
||||
echo " <td class='no-wrap'>";
|
||||
|
||||
echo " <td>".escape($row['destination_prefix'])." </td>\n";
|
||||
if (permission_exists('destination_trunk_prefix')) {
|
||||
echo " <td>".escape($row['destination_trunk_prefix'])." </td>\n";
|
||||
}
|
||||
if (permission_exists('destination_area_code')) {
|
||||
echo " <td>".escape($row['destination_area_code'])." </td>\n";
|
||||
}
|
||||
|
||||
echo " <td class='no-wrap'>\n";
|
||||
if (permission_exists('destination_edit')) {
|
||||
echo "<a href='".$list_row_url."'>".escape(format_phone($row['destination_number']))."</a>";
|
||||
echo " <a href='".$list_row_url."'>".escape(format_phone($row['destination_number']))."</a>\n";
|
||||
}
|
||||
else {
|
||||
echo escape(format_phone($row['destination_number']));
|
||||
echo " ".escape(format_phone($row['destination_number']));
|
||||
}
|
||||
echo " </td>\n";
|
||||
|
||||
if (!$_GET['show'] == "all") {
|
||||
echo " <td class='overflow' style='min-width: 125px;'>".action_name($destination_array, $row['destination_app'].':'.$row['destination_data'])." </td>\n";
|
||||
}
|
||||
@@ -308,4 +325,4 @@
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -125,7 +125,7 @@ if (!class_exists('destinations')) {
|
||||
if ($this->destinations !== null && is_array($this->destinations)) {
|
||||
$x = 0;
|
||||
foreach ($this->destinations as $row) {
|
||||
if ($row['type'] = 'sql') {
|
||||
if ($row['type'] === 'sql') {
|
||||
$table_name = preg_replace('#[^a-zA-Z0-9_]#', '', $row['name']);
|
||||
if (isset($row['sql'])) {
|
||||
if (is_array($row['sql'])) {
|
||||
@@ -160,6 +160,9 @@ if (!class_exists('destinations')) {
|
||||
$this->destinations[$x]['result']['sql'] = $sql;
|
||||
$this->destinations[$x]['result']['data'] = $result;
|
||||
}
|
||||
if ($row['type'] === 'array') {
|
||||
$this->destinations[$x] = $row;
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
}
|
||||
@@ -260,7 +263,7 @@ if (!class_exists('destinations')) {
|
||||
$text2 = $language2->get($_SESSION['domain']['language']['code'], 'app/'.$name);
|
||||
}
|
||||
|
||||
if (count($row['result']['data']) > 0 and strlen($row['select_value'][$destination_type]) > 0) {
|
||||
if (is_array($row['result']['data']) && count($row['result']['data']) > 0 and strlen($row['select_value'][$destination_type]) > 0) {
|
||||
$response .= " <optgroup label='".$text2['title-'.$label]."'>\n";
|
||||
$label2 = $label;
|
||||
foreach ($row['result']['data'] as $data) {
|
||||
@@ -268,7 +271,7 @@ if (!class_exists('destinations')) {
|
||||
$select_label = $row['select_label'];
|
||||
foreach ($row['field'] as $key => $value) {
|
||||
if ($key == 'destination' and is_array($value)){
|
||||
if ($value['type'] == 'csv') {
|
||||
if ($value['type'] === 'csv') {
|
||||
$array = explode($value['delimiter'], $data[$key]);
|
||||
$select_value = str_replace("\${destination}", $array[0], $select_value);
|
||||
$select_label = str_replace("\${destination}", $array[0], $select_label);
|
||||
@@ -384,7 +387,7 @@ if (!class_exists('destinations')) {
|
||||
//add the sql and data to the array
|
||||
$x = 0;
|
||||
foreach ($this->destinations as $row) {
|
||||
if ($row['type'] = 'sql') {
|
||||
if ($row['type'] === 'sql') {
|
||||
$table_name = preg_replace('#[^a-zA-Z0-9_]#', '', $row['name']);
|
||||
if (isset($row['sql'])) {
|
||||
if (is_array($row['sql'])) {
|
||||
@@ -419,8 +422,12 @@ if (!class_exists('destinations')) {
|
||||
$this->destinations[$x]['result']['sql'] = $sql;
|
||||
$this->destinations[$x]['result']['data'] = $result;
|
||||
}
|
||||
if ($row['type'] === 'array') {
|
||||
$this->destinations[$x] = $row;
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
|
||||
$this->destinations[$x]['type'] = 'array';
|
||||
$this->destinations[$x]['label'] = 'other';
|
||||
$this->destinations[$x]['name'] = 'dialplans';
|
||||
@@ -468,7 +475,7 @@ if (!class_exists('destinations')) {
|
||||
$text2 = $language2->get($_SESSION['domain']['language']['code'], 'app/'.$name);
|
||||
}
|
||||
|
||||
if (count($row['result']['data']) > 0 and strlen($row['select_value'][$destination_type]) > 0) {
|
||||
if (is_array($row['result']['data']) && strlen($row['select_value'][$destination_type]) > 0) {
|
||||
$label2 = $label;
|
||||
foreach ($row['result']['data'] as $data) {
|
||||
$select_value = $row['select_value'][$destination_type];
|
||||
@@ -540,11 +547,242 @@ if (!class_exists('destinations')) {
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all the destinations
|
||||
* @var string $destination_type can be ivr, dialplan, call_center_contact or bridge
|
||||
*/
|
||||
public function get($destination_type) {
|
||||
|
||||
//set the global variables
|
||||
global $db_type;
|
||||
|
||||
//get the domain_name
|
||||
$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');
|
||||
|
||||
//get the destinations
|
||||
if (!is_array($this->destinations)) {
|
||||
|
||||
//get the array from the app_config.php files
|
||||
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php");
|
||||
$x = 0;
|
||||
foreach ($config_list as &$config_path) {
|
||||
include($config_path);
|
||||
$x++;
|
||||
}
|
||||
$i = 0;
|
||||
foreach ($apps as $x => &$app) {
|
||||
if (isset($app['destinations'])) {
|
||||
foreach ($app['destinations'] as &$row) {
|
||||
$this->destinations[] = $row;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//put the array in order
|
||||
foreach ($this->destinations as $row) {
|
||||
$option_groups[] = $row['label'];
|
||||
}
|
||||
array_multisort($option_groups, SORT_ASC, $this->destinations);
|
||||
|
||||
//add the sql and data to the array
|
||||
$x = 0;
|
||||
foreach ($this->destinations as $row) {
|
||||
if ($row['type'] === 'sql') {
|
||||
$table_name = preg_replace('#[^a-zA-Z0-9_]#', '', $row['name']);
|
||||
if (isset($row['sql'])) {
|
||||
if (is_array($row['sql'])) {
|
||||
$sql = trim($row['sql'][$db_type])." ";
|
||||
}
|
||||
else {
|
||||
$sql = trim($row['sql'])." ";
|
||||
}
|
||||
}
|
||||
else {
|
||||
$field_count = count($row['field']);
|
||||
$fields = '';
|
||||
$c = 1;
|
||||
foreach ($row['field'] as $key => $value) {
|
||||
$key = preg_replace('#[^a-zA-Z0-9_]#', '', $key);
|
||||
$value = preg_replace('#[^a-zA-Z0-9_]#', '', $value);
|
||||
if ($field_count != $c) { $delimiter = ','; } else { $delimiter = ''; }
|
||||
$fields .= $value." as ".$key.$delimiter." ";
|
||||
$c++;
|
||||
}
|
||||
//$sql = "select * ";
|
||||
$sql = "select ".$fields;
|
||||
$sql .= " from v_".$table_name." ";
|
||||
}
|
||||
if (isset($row['where'])) {
|
||||
$sql .= trim($row['where'])." ";
|
||||
}
|
||||
$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');
|
||||
|
||||
$this->destinations[$x]['result']['sql'] = $sql;
|
||||
$this->destinations[$x]['result']['data'] = $result;
|
||||
}
|
||||
if ($row['type'] === 'array') {
|
||||
$this->destinations[$x] = $row['result']['data'];
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
|
||||
$this->destinations[$x]['type'] = 'array';
|
||||
$this->destinations[$x]['label'] = 'other';
|
||||
$this->destinations[$x]['name'] = 'dialplans';
|
||||
$this->destinations[$x]['field']['name'] = "name";
|
||||
$this->destinations[$x]['field']['destination'] = "destination";
|
||||
$this->destinations[$x]['select_value']['dialplan'] = "transfer:\${destination}";
|
||||
$this->destinations[$x]['select_value']['ivr'] = "menu-exec-app:transfer \${destination}";
|
||||
$this->destinations[$x]['select_label'] = "\${name}";
|
||||
$y = 0;
|
||||
$this->destinations[$x]['result']['data'][$y]['label'] = 'check_voicemail';
|
||||
$this->destinations[$x]['result']['data'][$y]['name'] = '*98';
|
||||
$this->destinations[$x]['result']['data'][$y]['extension'] = '*98';
|
||||
$this->destinations[$x]['result']['data'][$y]['destination'] = '*98 XML ${context}';
|
||||
$y++;
|
||||
$this->destinations[$x]['result']['data'][$y]['label'] = 'company_directory';
|
||||
$this->destinations[$x]['result']['data'][$y]['name'] = '*411';
|
||||
$this->destinations[$x]['result']['data'][$y]['extension'] = '*411';
|
||||
$this->destinations[$x]['result']['data'][$y]['destination'] = '*411 XML ${context}';
|
||||
$y++;
|
||||
$this->destinations[$x]['result']['data'][$y]['label'] = 'hangup';
|
||||
$this->destinations[$x]['result']['data'][$y]['name'] = 'hangup';
|
||||
$this->destinations[$x]['result']['data'][$y]['application'] = 'hangup';
|
||||
$this->destinations[$x]['result']['data'][$y]['destination'] = '';
|
||||
$y++;
|
||||
$this->destinations[$x]['result']['data'][$y]['label'] = 'record';
|
||||
$this->destinations[$x]['result']['data'][$y]['name'] = '*732';
|
||||
$this->destinations[$x]['result']['data'][$y]['extension'] = '*732';
|
||||
$this->destinations[$x]['result']['data'][$y]['destination'] = '*732 XML ${context}';
|
||||
$y++;
|
||||
}
|
||||
|
||||
//remove special characters from the name
|
||||
$destination_id = str_replace("]", "", $destination_name);
|
||||
$destination_id = str_replace("[", "_", $destination_id);
|
||||
|
||||
//set default to false
|
||||
$select_found = false;
|
||||
|
||||
$i = 0;
|
||||
foreach ($this->destinations as $row) {
|
||||
|
||||
$name = $row['name'];
|
||||
$label = $row['label'];
|
||||
$destination = $row['field']['destination'];
|
||||
|
||||
//add multi-lingual support
|
||||
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/".$name."/app_languages.php")) {
|
||||
$language2 = new text;
|
||||
$text2 = $language2->get($_SESSION['domain']['language']['code'], 'app/'.$name);
|
||||
}
|
||||
|
||||
if (count($row['result']['data']) > 0 and strlen($row['select_value'][$destination_type]) > 0) {
|
||||
$label2 = $label;
|
||||
foreach ($row['result']['data'] as $data) {
|
||||
$select_value = $row['select_value'][$destination_type];
|
||||
$select_label = $row['select_label'];
|
||||
foreach ($row['field'] as $key => $value) {
|
||||
if ($key == 'destination' and is_array($value)) {
|
||||
if ($value['type'] == 'csv') {
|
||||
$array = explode($value['delimiter'], $data[$key]);
|
||||
$select_value = str_replace("\${destination}", $array[0], $select_value);
|
||||
$select_label = str_replace("\${destination}", $array[0], $select_label);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (strpos($value,',') !== false) {
|
||||
$keys = explode(",", $value);
|
||||
foreach ($keys as $k) {
|
||||
if (strlen($data[$k]) > 0) {
|
||||
$select_value = str_replace("\${".$key."}", $data[$k], $select_value);
|
||||
if (strlen($data['label']) == 0) {
|
||||
$select_label = str_replace("\${".$key."}", $data[$k], $select_label);
|
||||
}
|
||||
else {
|
||||
$label = $data['label'];
|
||||
$select_label = str_replace("\${".$key."}", $text2['option-'.$label], $select_label);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$select_value = str_replace("\${".$key."}", $data[$key], $select_value);
|
||||
if (strlen($data['label']) == 0) {
|
||||
$select_label = str_replace("\${".$key."}", $data[$key], $select_label);
|
||||
}
|
||||
else {
|
||||
$label = $data['label'];
|
||||
$select_label = str_replace("\${".$key."}", $text2['option-'.$label], $select_label);
|
||||
}
|
||||
}
|
||||
//application: hangup
|
||||
if (strlen($data['application']) > 0) {
|
||||
$select_value = str_replace("transfer", $data['application'], $select_value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$select_value = str_replace("\${domain_name}", $this->domain_name, $select_value);
|
||||
$select_value = str_replace("\${context}", $this->domain_name, $select_value);
|
||||
$select_label = str_replace("\${domain_name}", $this->domain_name, $select_label);
|
||||
$select_label = str_replace("\${context}", $this->domain_name, $select_label);
|
||||
$select_label = str_replace("✉", 'email-icon', $select_label);
|
||||
$select_label = escape(trim($select_label));
|
||||
$select_label = str_replace('email-icon', '✉', $select_label);
|
||||
if ($select_value == $destination_value) { $selected = "true' "; } else { $selected = 'false'; }
|
||||
if ($label2 == 'destinations') { $select_label = format_phone($select_label); }
|
||||
|
||||
$array[$name][$i] = $data;
|
||||
$array[$name][$i]['label'] = $select_label;
|
||||
//$array[$name][$i]['destination'] = $select_value;
|
||||
//$array[$name][$i]['select_name'] = $select_name;
|
||||
//$array[$name][$i]['select_value'] = $select_value;
|
||||
//$array[$name][$i]['selected'] = $selected;
|
||||
$array[$name][$i]['destination'] = $select_value;
|
||||
$array[$name][$i]["extension"] = $data["extension"];
|
||||
|
||||
$i++;
|
||||
}
|
||||
$i = 0;
|
||||
unset($text);
|
||||
}
|
||||
}
|
||||
if (!$selected) {
|
||||
$destination_label = str_replace(":", " ", $destination_value);
|
||||
$destination_label = str_replace("menu-exec-app", "", $destination_label);
|
||||
$destination_label = str_replace("transfer", "", $destination_label);
|
||||
$destination_label = str_replace("XML ".$this->domain_name, "", $destination_label);
|
||||
|
||||
$array[$name][$i] = $row;
|
||||
$array[$name][$i]['label'] = $destination_label;
|
||||
//$array[$name][$i]['destination'] = $destination_value;
|
||||
//$array[$name][$i]['select_name'] = $select_name;
|
||||
//$array[$name][$i]['select_value'] = $select_value;
|
||||
$array[$name][$i]['destination'] = $destination_value;
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
//set the previous application name
|
||||
$previous_application = $name;
|
||||
|
||||
//return the formatted destinations
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* valid destination
|
||||
*/
|
||||
public function valid($destination) {
|
||||
$destinations = $this->all('dialplan');
|
||||
public function valid($destination, $type = 'dialplan') {
|
||||
$destinations = $this->all($type);
|
||||
foreach($destinations as $category => $array) {
|
||||
if (is_array($array)) {
|
||||
foreach ($array as $key => $value) {
|
||||
@@ -622,9 +860,6 @@ if (!class_exists('destinations')) {
|
||||
$p->delete('dialplan_delete', 'temp');
|
||||
$p->delete('dialplan_detail_delete', 'temp');
|
||||
|
||||
//synchronize the xml config
|
||||
save_dialplan_xml();
|
||||
|
||||
//clear the cache
|
||||
if (is_array($destination_contexts) && @sizeof($destination_contexts) != 0) {
|
||||
$destination_contexts = array_unique($destination_contexts);
|
||||
|
||||
@@ -2755,6 +2755,13 @@
|
||||
$vendors[$y]['functions'][$z]['groups'][] = "superadmin";
|
||||
$vendors[$y]['functions'][$z]['groups'][] = "admin";
|
||||
$z++;
|
||||
$vendors[$y]['functions'][$z]['uuid'] = "298ea214-4773-42e8-ac9b-b72c10be6a75";
|
||||
$vendors[$y]['functions'][$z]['label'] = "label-na";
|
||||
$vendors[$y]['functions'][$z]['name'] = "na";
|
||||
$vendors[$y]['functions'][$z]['value'] = "0";
|
||||
$vendors[$y]['functions'][$z]['groups'][] = "superadmin";
|
||||
$vendors[$y]['functions'][$z]['groups'][] = "admin";
|
||||
$z++;
|
||||
$vendors[$y]['functions'][$z]['uuid'] = "f2b3069f-02f6-4035-bccc-2c8c9a37f3fa";
|
||||
$vendors[$y]['functions'][$z]['label'] = "label-speed_dial";
|
||||
$vendors[$y]['functions'][$z]['name'] = "speed_dial";
|
||||
|
||||
@@ -3238,6 +3238,27 @@ $text['label-button']['ru-ru'] = "Кнопка";
|
||||
$text['label-button']['sv-se'] = "Knapp";
|
||||
$text['label-button']['uk-ua'] = "Кнопка";
|
||||
|
||||
$text['label-phonebook']['en-us'] = "Phonebook";
|
||||
$text['label-phonebook']['en-gb'] = "Phonebook";
|
||||
$text['label-phonebook']['ar-eg'] = "";
|
||||
$text['label-phonebook']['de-at'] = "Telefonbuch"; //copied from de-de
|
||||
$text['label-phonebook']['de-ch'] = "Telefonbuch"; //copied from de-de
|
||||
$text['label-phonebook']['de-de'] = "Telefonbuch";
|
||||
$text['label-phonebook']['es-cl'] = "agenda telefónica";
|
||||
$text['label-phonebook']['es-mx'] = "agenda telefónica"; //copied from es-cl
|
||||
$text['label-phonebook']['fr-ca'] = "Annuaire"; //copied from fr-fr
|
||||
$text['label-phonebook']['fr-fr'] = "Annuaire";
|
||||
$text['label-phonebook']['he-il'] = "";
|
||||
$text['label-phonebook']['it-it'] = "Rubrica";
|
||||
$text['label-phonebook']['nl-nl'] = "telefoonboek";
|
||||
$text['label-phonebook']['pl-pl'] = "Ksiażka telefoniczna";
|
||||
$text['label-phonebook']['pt-br'] = "Lista Telefonica";
|
||||
$text['label-phonebook']['pt-pt'] = "Lista Telefónica";
|
||||
$text['label-phonebook']['ro-ro'] = "";
|
||||
$text['label-phonebook']['ru-ru'] = "Телефонная книга";
|
||||
$text['label-phonebook']['sv-se'] = "Telefonbok";
|
||||
$text['label-phonebook']['uk-ua'] = "";
|
||||
|
||||
$text['label-broadsoft_phonebook']['en-us'] = "Broadsoft Phonebook";
|
||||
$text['label-broadsoft_phonebook']['en-gb'] = "Broadsoft Phonebook";
|
||||
$text['label-broadsoft_phonebook']['ar-eg'] = "";
|
||||
@@ -5679,4 +5700,4 @@ $text['label-column_name']['ru-ru'] = "";
|
||||
$text['label-column_name']['sv-se'] = "";
|
||||
$text['label-column_name']['uk-ua'] = "";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
$sql .= "when 'programmable' then 3 ";
|
||||
$sql .= "when 'expansion' then 4 ";
|
||||
$sql .= "else 100 END, ";
|
||||
$sql .= "cast(device_key_id as numeric) asc ";
|
||||
$sql .= "cast(device_key_id as int) asc ";
|
||||
$parameters['device_uuid'] = $device_uuid;
|
||||
$database = new database;
|
||||
$device_keys = $database->select($sql, $parameters, 'all');
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
//validate the token
|
||||
$token = new token;
|
||||
if (!$token->validate('/app/devices/device_dashboard.php')) {
|
||||
if (!$token->validate('/app/devices/device_dashboard.php') && !$token->validate('login')) {
|
||||
message::add($text['message-invalid_token'],'negative');
|
||||
header('Location: '.PROJECT_PATH."/core/user_settings/user_dashboard.php");
|
||||
exit;
|
||||
|
||||
@@ -120,7 +120,6 @@
|
||||
$device_firmware_version = $_POST["device_firmware_version"];
|
||||
$device_enabled = $_POST["device_enabled"];
|
||||
$device_template = $_POST["device_template"];
|
||||
$device_profile_uuid = $_POST["device_profile_uuid"];
|
||||
$device_description = $_POST["device_description"];
|
||||
//lines
|
||||
$device_lines = $_POST["device_lines"];
|
||||
@@ -273,8 +272,8 @@
|
||||
if (permission_exists('device_template')) {
|
||||
$array['devices'][0]['device_template'] = $device_template;
|
||||
}
|
||||
if (permission_exists('device_profile_edit') && is_uuid($device_profile_uuid)) {
|
||||
$array['devices'][0]['device_profile_uuid'] = $device_profile_uuid;
|
||||
if (permission_exists('device_profile_edit')) {
|
||||
$array['devices'][0]['device_profile_uuid'] = is_uuid($device_profile_uuid) ? $device_profile_uuid : null;
|
||||
}
|
||||
if (permission_exists('device_description')) {
|
||||
$array['devices'][0]['device_description'] = $device_description;
|
||||
@@ -1047,28 +1046,65 @@
|
||||
|
||||
if (permission_exists('device_line_server_address_primary')) {
|
||||
echo " <td valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " <input class='formfld' style='width: 100px; width: 100%;' type='text' name='device_lines[".$x."][server_address_primary]' maxlength='255' value=\"".escape($row['server_address_primary'])."\"/>\n";
|
||||
if (is_uuid($_SESSION['provision']['server_address_primary']['uuid'])) {
|
||||
echo " <input class='formfld' style='width: 100px; width: 100%;' type='text' name='device_lines[".$x."][server_address_primary]' maxlength='255' value=\"".escape($row['server_address_primary'])."\"/>\n";
|
||||
}
|
||||
else {
|
||||
echo " <select class='formfld' style='width: 75px;' name='device_lines[".$x."][server_address_primary]'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
foreach($_SESSION['provision']['server_address_primary'] as $field) {
|
||||
echo " <option value='".$field."' ".(($row['server_address_primary'] == $field) ? "selected" : null).">".$field."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
}
|
||||
|
||||
if (permission_exists('device_line_server_address_secondary')) {
|
||||
echo " <td valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " <input class='formfld' style='width: 100px; width: 100%;' type='text' name='device_lines[".$x."][server_address_secondary]' maxlength='255' value=\"".escape($row['server_address_secondary'])."\"/>\n";
|
||||
if (isset($_SESSION['provision']['server_address_secondary']['text'])) {
|
||||
echo " <input class='formfld' style='width: 100px; width: 100%;' type='text' name='device_lines[".$x."][server_address_secondary]' maxlength='255' value=\"".escape($row['server_address_secondary'])."\"/>\n";
|
||||
}
|
||||
else {
|
||||
echo " <select class='formfld' style='width: 75px;' name='device_lines[".$x."][server_address_secondary]'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
foreach($_SESSION['provision']['server_address_secondary'] as $field) {
|
||||
echo " <option value='".$field."' ".(($row['server_address_secondary'] == $field) ? "selected" : null).">".$field."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
}
|
||||
|
||||
if (permission_exists('device_line_outbound_proxy_primary')) {
|
||||
if (permission_exists('device_line_outbound_proxy_secondary')) {
|
||||
$placeholder_label = $text['label-primary'];
|
||||
}
|
||||
echo " <td align='left'>\n";
|
||||
echo " <input class='formfld' style='width: 65px;' type='text' name='device_lines[".$x."][outbound_proxy_primary]' placeholder=\"".escape($placeholder_label)."\" maxlength='255' value=\"".escape($row['outbound_proxy_primary'])."\"/>\n";
|
||||
if (isset($_SESSION['provision']['outbound_proxy_primary']['text'])) {
|
||||
echo " <input class='formfld' style='width: 65px;' type='text' name='device_lines[".$x."][outbound_proxy_primary]' placeholder=\"".escape($text['label-primary'])."\" maxlength='255' value=\"".escape($row['outbound_proxy_primary'])."\"/>\n";
|
||||
}
|
||||
else {
|
||||
echo " <select class='formfld' style='width: 75px;' name='device_lines[".$x."][outbound_proxy_primary]'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
foreach($_SESSION['provision']['outbound_proxy_primary'] as $field) {
|
||||
echo " <option value='".$field."' ".(($row['outbound_proxy_primary'] == $field) ? "selected" : null).">".$field."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
unset($placeholder_label);
|
||||
}
|
||||
|
||||
if (permission_exists('device_line_outbound_proxy_secondary')) {
|
||||
echo " <td align='left'>\n";
|
||||
echo " <input class='formfld' style='width: 65px;' type='text' name='device_lines[".$x."][outbound_proxy_secondary]' placeholder=\"".$text['label-secondary']."\" maxlength='255' value=\"".escape($row['outbound_proxy_secondary'])."\"/>\n";
|
||||
if (isset($_SESSION['provision']['outbound_proxy_secondary']['text'])) {
|
||||
echo " <input class='formfld' style='width: 65px;' type='text' name='device_lines[".$x."][outbound_proxy_secondary]' placeholder=\"".escape($text['label-secondary'])."\" maxlength='255' value=\"".escape($row['outbound_proxy_secondary'])."\"/>\n";
|
||||
}
|
||||
else {
|
||||
echo " <select class='formfld' style='width: 75px;' name='device_lines[".$x."][outbound_proxy_secondary]'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
foreach($_SESSION['provision']['outbound_proxy_secondary'] as $field) {
|
||||
echo " <option value='".$field."' ".(($row['outbound_proxy_secondary'] == $field) ? "selected" : null).">".$field."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
}
|
||||
|
||||
@@ -1137,16 +1173,11 @@
|
||||
echo " </select>\n";
|
||||
echo " </td>\n";
|
||||
|
||||
if (is_array($device_lines) && @sizeof($device_lines) > 1 && permission_exists('device_line_delete')) {
|
||||
if (is_uuid($row['device_line_uuid'])) {
|
||||
echo " <td class='vtable' style='text-align: center; padding-bottom: 3px;'>\n";
|
||||
echo " <input type='checkbox' name='device_lines_delete[".$x."][checked]' value='true' class='chk_delete checkbox_lines' onclick=\"edit_delete_action('lines');\">\n";
|
||||
echo " <input type='hidden' name='device_lines_delete[".$x."][uuid]' value='".escape($row['device_line_uuid'])."' />\n";
|
||||
}
|
||||
else {
|
||||
echo " <td>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
if (is_array($device_lines) && @sizeof($device_lines) > 1 && permission_exists('device_line_delete') && is_uuid($row['device_line_uuid'])) {
|
||||
echo " <td class='vtable' style='text-align: center; padding-bottom: 3px;'>\n";
|
||||
echo " <input type='checkbox' name='device_lines_delete[".$x."][checked]' value='true' class='chk_delete checkbox_lines' onclick=\"edit_delete_action('lines');\">\n";
|
||||
echo " <input type='hidden' name='device_lines_delete[".$x."][uuid]' value='".escape($row['device_line_uuid'])."' />\n";
|
||||
echo " <td>\n";
|
||||
}
|
||||
|
||||
echo "</tr>\n";
|
||||
@@ -1770,4 +1801,4 @@
|
||||
//show the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -401,7 +401,7 @@
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='from_row'>\n";
|
||||
$i=1;
|
||||
$i=2;
|
||||
while($i<=99) {
|
||||
$selected = ($i == $from_row) ? "selected" : null;
|
||||
echo " <option value='$i' ".$selected.">$i</option>\n";
|
||||
@@ -462,4 +462,4 @@
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Copyright (C) 2019 All Rights Reserved.
|
||||
Copyright (C) 2020 All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
@@ -489,21 +489,25 @@
|
||||
echo " <td class='formfld'>\n";
|
||||
echo " <select class='formfld' name='device_profile_keys[$x][profile_key_category]'>\n";
|
||||
echo " <option value='line' ".($row['profile_key_category'] == "line" ? "selected='selected'" : null).">".$text['label-line']."</option>\n";
|
||||
if ($row['device_key_vendor'] !== "polycom") {
|
||||
if ($row['profile_key_vendor'] !== "polycom") {
|
||||
echo " <option value='memory' ".($row['profile_key_category'] == "memory" ? "selected='selected'" : null).">".$text['label-memory']."</option>\n";
|
||||
}
|
||||
echo " <option value='programmable' ".($row['profile_key_category'] == "programmable" ? "selected='selected'" : null).">".$text['label-programmable']."</option>\n";
|
||||
if ($row['device_key_vendor'] !== "polycom") {
|
||||
if (strlen($row['device_key_vendor']) == 0) {
|
||||
echo " <option value='expansion' ".($row['profile_key_category'] == "expansion" ? "selected='selected'" : null).">".$text['label-expansion']." 1</option>\n";
|
||||
if ($row['profile_key_vendor'] !== "polycom") {
|
||||
if (strlen($row['profile_key_vendor']) == 0) {
|
||||
echo " <option value='expansion' ".($row['profile_key_category'] == "expansion" ? "selected='selected'" : null).">".$text['label-expansion']."</option>\n";
|
||||
echo " <option value='expansion-1' ".($row['profile_key_category'] == "expansion-1" ? "selected='selected'" : null).">".$text['label-expansion']." 1</option>\n";
|
||||
echo " <option value='expansion-2' ".($row['profile_key_category'] == "expansion-2" ? "selected='selected'" : null).">".$text['label-expansion']." 2</option>\n";
|
||||
echo " <option value='expansion-3' ".($row['profile_key_category'] == "expansion-3" ? "selected='selected'" : null).">".$text['label-expansion']." 3</option>\n";
|
||||
echo " <option value='expansion-4' ".($row['profile_key_category'] == "expansion-4" ? "selected='selected'" : null).">".$text['label-expansion']." 4</option>\n";
|
||||
echo " <option value='expansion-5' ".($row['profile_key_category'] == "expansion-5" ? "selected='selected'" : null).">".$text['label-expansion']." 5</option>\n";
|
||||
echo " <option value='expansion-6' ".($row['profile_key_category'] == "expansion-6" ? "selected='selected'" : null).">".$text['label-expansion']." 6</option>\n";
|
||||
}
|
||||
elseif (strtolower($row['profile_key_vendor']) == "grandstream") {
|
||||
echo " <option value='expansion' ".($row['profile_key_category'] == "expansion" || $row['profile_key_category'] == "expansion" ? "selected='selected'" : null).">".$text['label-expansion']."</option>\n";
|
||||
}
|
||||
else {
|
||||
if (strtolower($row['device_key_vendor']) == "cisco" || strtolower($row['device_key_vendor']) == "yealink") {
|
||||
if (strtolower($row['profile_key_vendor']) == "cisco" || strtolower($row['profile_key_vendor']) == "yealink") {
|
||||
echo " <option value='expansion-1' ".($row['profile_key_category'] == "expansion-1" || $row['profile_key_category'] == "expansion" ? "selected='selected'" : null).">".$text['label-expansion']." 1</option>\n";
|
||||
echo " <option value='expansion-2' ".($row['profile_key_category'] == "expansion-2" ? "selected='selected'" : null).">".$text['label-expansion']." 2</option>\n";
|
||||
echo " <option value='expansion-3' ".($row['profile_key_category'] == "expansion-3" ? "selected='selected'" : null).">".$text['label-expansion']." 3</option>\n";
|
||||
@@ -738,4 +742,4 @@
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -175,6 +175,9 @@ include "root.php";
|
||||
if (preg_replace('/^.*?(cisco\/spa).*$/i', '$1', $agent) == "cisco/spa") {
|
||||
return "cisco-spa";
|
||||
}
|
||||
if (preg_replace('/^.*?(digium).*$/i', '$1', $agent) == "digium") {
|
||||
return "digium";
|
||||
}
|
||||
if (preg_replace('/^.*?(grandstream).*$/i', '$1', $agent) == "grandstream") {
|
||||
return "grandstream";
|
||||
}
|
||||
@@ -1223,4 +1226,4 @@ include "root.php";
|
||||
|
||||
} //class
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -426,9 +426,6 @@
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:public");
|
||||
|
||||
//synchronize the xml config
|
||||
save_dialplan_xml();
|
||||
|
||||
//redirect message
|
||||
message::add($text['confirm-update-complete']);
|
||||
header("Location: ".PROJECT_PATH."/app/dialplans/dialplans.php?app_uuid=c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4");
|
||||
|
||||
@@ -703,9 +703,6 @@
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$dialplan_context);
|
||||
|
||||
//synchronize the xml config
|
||||
save_dialplan_xml();
|
||||
|
||||
//redirect the browser
|
||||
message::add($text['message-update']);
|
||||
header("Location: ".PROJECT_PATH."/app/dialplans/dialplans.php?app_uuid=8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3");
|
||||
@@ -723,7 +720,7 @@
|
||||
$sql = "select * from v_gateways ";
|
||||
$sql .= "where enabled = 'true' ";
|
||||
if (permission_exists('outbound_route_any_gateway')) {
|
||||
$sql .= "order by domain_uuid ";
|
||||
$sql .= "order by domain_uuid, gateway ";
|
||||
}
|
||||
else {
|
||||
$sql .= "and domain_uuid = :domain_uuid ";
|
||||
|
||||
@@ -184,9 +184,6 @@
|
||||
$database->app_uuid = '742714e5-8cdf-32fd-462c-cbe7e3d655db';
|
||||
$database->save($array);
|
||||
unset($array);
|
||||
|
||||
//synchronize the xml config
|
||||
save_dialplan_xml();
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
|
||||
@@ -269,9 +269,6 @@
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$dialplan_context);
|
||||
|
||||
//synchronize the xml config
|
||||
save_dialplan_xml();
|
||||
|
||||
//set the message
|
||||
if ($action == "add") {
|
||||
message::add($text['message-add']);
|
||||
@@ -1003,4 +1000,4 @@
|
||||
//show the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
include "root.php";
|
||||
|
||||
//define the dialplan class
|
||||
if (!class_exists('dialplan')) {
|
||||
class dialplan {
|
||||
|
||||
//variables
|
||||
public $result;
|
||||
public $domain_uuid;
|
||||
@@ -146,61 +146,6 @@ include "root.php";
|
||||
$p->delete('dialplan_edit', 'temp');
|
||||
}
|
||||
|
||||
public function dialplan_detail_add() {
|
||||
//build insert array
|
||||
$dialplan_detail_uuid = uuid();
|
||||
$array['dialplan_details'][0]['dialplan_detail_uuid'] = $dialplan_detail_uuid;
|
||||
$array['dialplan_details'][0]['domain_uuid'] = !$this->dialplan_global ? $this->domain_uuid : null;
|
||||
$array['dialplan_details'][0]['dialplan_uuid'] = $this->dialplan_uuid;
|
||||
$array['dialplan_details'][0]['dialplan_detail_tag'] = $this->dialplan_detail_tag;
|
||||
$array['dialplan_details'][0]['dialplan_detail_order'] = $this->dialplan_detail_order;
|
||||
$array['dialplan_details'][0]['dialplan_detail_type'] = $this->dialplan_detail_type;
|
||||
$array['dialplan_details'][0]['dialplan_detail_data'] = $this->dialplan_detail_data;
|
||||
$array['dialplan_details'][0]['dialplan_detail_break'] = strlen($this->dialplan_detail_break) != 0 ? $this->dialplan_detail_break : null;
|
||||
$array['dialplan_details'][0]['dialplan_detail_inline'] = strlen($this->dialplan_detail_inline) != 0 ? $this->dialplan_detail_inline : null;
|
||||
$array['dialplan_details'][0]['dialplan_detail_group'] = strlen($this->dialplan_detail_group) != 0 ? $this->dialplan_detail_group : null;
|
||||
//grant temporary permissions
|
||||
$p = new permissions;
|
||||
$p->add('dialplan_detail_add', 'temp');
|
||||
//execute insert
|
||||
$database = new database;
|
||||
$database->app_name = 'dialplans';
|
||||
$database->app_uuid = '742714e5-8cdf-32fd-462c-cbe7e3d655db';
|
||||
$database->save($array);
|
||||
unset($array);
|
||||
//revoke temporary permissions
|
||||
$p->delete('dialplan_detail_add', 'temp');
|
||||
}
|
||||
|
||||
public function dialplan_detail_update() {
|
||||
//build update array
|
||||
$array['dialplan_details'][0]['dialplan_detail_uuid'] = $this->dialplan_detail_uuid;
|
||||
$array['dialplan_details'][0]['dialplan_detail_tag'] = $this->dialplan_detail_tag;
|
||||
$array['dialplan_details'][0]['dialplan_detail_order'] = $this->dialplan_detail_order;
|
||||
$array['dialplan_details'][0]['dialplan_detail_type'] = $this->dialplan_detail_type;
|
||||
$array['dialplan_details'][0]['dialplan_detail_data'] = $this->dialplan_detail_data;
|
||||
if (strlen($this->dialplan_detail_break) != 0) {
|
||||
$array['dialplan_details'][0]['dialplan_detail_break'] = $this->dialplan_detail_break;
|
||||
}
|
||||
if (strlen($this->dialplan_detail_inline) != 0) {
|
||||
$array['dialplan_details'][0]['dialplan_detail_inline'] = $this->dialplan_detail_inline;
|
||||
}
|
||||
if (strlen($this->dialplan_detail_group) != 0) {
|
||||
$array['dialplan_details'][0]['dialplan_detail_group'] = $this->dialplan_detail_group;
|
||||
}
|
||||
//grant temporary permissions
|
||||
$p = new permissions;
|
||||
$p->add('dialplan_detail_edit', 'temp');
|
||||
//execute update
|
||||
$database = new database;
|
||||
$database->app_name = 'dialplans';
|
||||
$database->app_uuid = '742714e5-8cdf-32fd-462c-cbe7e3d655db';
|
||||
$database->save($array);
|
||||
unset($array);
|
||||
//revoke temporary permissions
|
||||
$p->delete('dialplan_detail_edit', 'temp');
|
||||
}
|
||||
|
||||
public function restore_advanced_xml() {
|
||||
$switch_dialplan_dir = $this->switch_dialplan_dir;
|
||||
if (is_dir($switch_dialplan_dir)) {
|
||||
@@ -1100,9 +1045,6 @@ include "root.php";
|
||||
$p->delete('dialplan_delete', 'temp');
|
||||
$p->delete('dialplan_detail_delete', 'temp');
|
||||
|
||||
//synchronize the xml config
|
||||
save_dialplan_xml();
|
||||
|
||||
//clear the cache
|
||||
if (is_array($dialplan_contexts) && @sizeof($dialplan_contexts) != 0) {
|
||||
$dialplan_contexts = array_unique($dialplan_contexts, SORT_STRING);
|
||||
@@ -1200,9 +1142,6 @@ include "root.php";
|
||||
//revoke temporary permissions
|
||||
$p->delete('dialplan_detail_delete', 'temp');
|
||||
|
||||
//synchronize the xml config
|
||||
save_dialplan_xml();
|
||||
|
||||
//clear the cache
|
||||
if (is_array($dialplan_contexts) && @sizeof($dialplan_contexts) != 0) {
|
||||
$dialplan_contexts = array_unique($dialplan_contexts, SORT_STRING);
|
||||
@@ -1309,9 +1248,6 @@ include "root.php";
|
||||
//revoke temporary permissions
|
||||
$p->delete('dialplan_edit', 'temp');
|
||||
|
||||
//synchronize the xml config
|
||||
save_dialplan_xml();
|
||||
|
||||
//clear the cache
|
||||
if (is_array($dialplan_contexts) && @sizeof($dialplan_contexts) != 0) {
|
||||
$dialplan_contexts = array_unique($dialplan_contexts, SORT_STRING);
|
||||
@@ -1446,9 +1382,6 @@ include "root.php";
|
||||
//revoke temporary permissions
|
||||
$p->delete('dialplan_detail_add', 'temp');
|
||||
|
||||
//synchronize the xml config
|
||||
save_dialplan_xml();
|
||||
|
||||
//clear the cache
|
||||
if (is_array($dialplan_contexts) && @sizeof($dialplan_contexts) != 0) {
|
||||
$dialplan_contexts = array_unique($dialplan_contexts, SORT_STRING);
|
||||
@@ -1472,4 +1405,4 @@ include "root.php";
|
||||
} //class
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
</condition>
|
||||
<condition field="${user_exists}" expression="^true$" break="">
|
||||
<action application="set" data="extension_uuid=${user_data ${destination_number}@${domain_name} var extension_uuid}" inline="true"/>
|
||||
<action application="set" data="hold_music=${user_data ${destination_number}@${domain_name} var hold_music}" inline="true"/>
|
||||
<action application="set" data="forward_all_enabled=${user_data ${destination_number}@${domain_name} var forward_all_enabled}" inline="true"/>
|
||||
<action application="set" data="forward_all_destination=${user_data ${destination_number}@${domain_name} var forward_all_destination}" inline="true"/>
|
||||
<action application="set" data="forward_busy_enabled=${user_data ${destination_number}@${domain_name} var forward_busy_enabled}" inline="true"/>
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
<condition>
|
||||
<action application="bind_digit_action" data="local,*2,exec:record_session,$${recordings_dir}/${domain_name}/archive/${strftime(%Y)}/${strftime(%b)}/${strftime(%d)}/${uuid}.${record_ext},${bind_target}"/>
|
||||
<action application="digit_action_set_realm" data="local"/>
|
||||
<action application="bind_digit_action" data="local,*5,api:uuid_record,${uuid} mask ${recordings_dir}/${domain_name}/archive/${strftime(%Y)}/${strftime(%b)}/${strftime(%d)}/${uuid}.${record_ext},${bind_target}"/>
|
||||
<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},${bind_target}"/>
|
||||
</condition>
|
||||
</extension>
|
||||
</context>
|
||||
|
||||
@@ -46,6 +46,8 @@
|
||||
<action application="set" data="record_name=${uuid}.${record_ext}" inline="true"/>
|
||||
<!--<action application="set" data="record_name=${destination_number}-${caller_id_number}_${strftime(%Y-%m-%d %H:%M)}.${record_ext}" inline="true"/>-->
|
||||
<action application="set" data="recording_follow_transfer=true" inline="true"/>
|
||||
<action application="bind_digit_action" data="local,*5,api:uuid_record,${uuid} mask ${recordings_dir}/${domain_name}/archive/${strftime(%Y)}/${strftime(%b)}/${strftime(%d)}/${uuid}.${record_ext},${bind_target}"/>
|
||||
<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},${bind_target}"/>
|
||||
<action application="set" data="record_append=true" inline="true"/>
|
||||
<action application="set" data="record_in_progress=true" inline="true"/>
|
||||
<action application="set" data="${uuid_record ${uuid} start ${record_path}/${record_name}}" inline="false"/>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<context name="{v_context}">
|
||||
<extension name="user_hold_music" number="" continue="true" app_uuid="3ace0990-ef23-45b2-a81d-a5857a671e74" order="80">
|
||||
<condition field="${hold_music}" expression="^$" break="never"/>
|
||||
<condition field="${user_exists}" expression="true">
|
||||
<action application="set" data="hold_music=${user_data ${destination_number}@${domain_name} var hold_music}" inline="true"/>
|
||||
</condition>
|
||||
</extension>
|
||||
</context>
|
||||
@@ -3,7 +3,7 @@
|
||||
<extension name="dx" number="dx" continue="false" app_uuid="ddcf7740-78ca-4035-8c19-e2df10cebf67" order="300">
|
||||
<condition field="destination_number" expression="^dx$">
|
||||
<action application="answer"/>
|
||||
<action application="read" data="11 11 'tone_stream://%(10000,0,350,440)' digits 5000 #"/>
|
||||
<action application="read" data="2 6 'tone_stream://%(10000,0,350,440)' digits 5000 #"/>
|
||||
<action application="transfer" data="-bleg ${digits}"/>
|
||||
</condition>
|
||||
</extension>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<action application="sleep" data="1000"/>
|
||||
<action application="set" data="record_append=false"/>
|
||||
<action application="set" data="voicemail_action=check"/>
|
||||
<action application="set" data="voicemail_id=${sip_from_user}"/>
|
||||
<action application="set" data="voicemail_id=${user_name}"/>
|
||||
<action application="set" data="voicemail_profile=default"/>
|
||||
<action application="lua" data="app.lua voicemail"/>
|
||||
<!--<action application="voicemail" data="check default ${domain_name} ${caller_id_number}"/>-->
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<extension name="voicemail" number="[ext]" continue="false" app_uuid="e3c14f2f-7697-4b5d-9c62-2443c0e22bf2" global="true" order="900">
|
||||
<condition field="${user_exists}" expression="true">
|
||||
<!--<action application="voicemail" data="default ${domain_name} ${dialed_extension}"/>-->
|
||||
<action application="set" data="record_append=false"/>
|
||||
<action application="set" data="voicemail_action=save"/>
|
||||
<action application="set" data="voicemail_id=${destination_number}"/>
|
||||
<action application="set" data="voicemail_profile=default"/>
|
||||
<action application="set" data="record_append=false" inline="true"/>
|
||||
<action application="set" data="voicemail_action=save" inline="true"/>
|
||||
<action application="set" data="voicemail_id=${destination_number}" inline="true"/>
|
||||
<action application="set" data="voicemail_profile=default" inline="true"/>
|
||||
<action application="lua" data="app.lua voicemail"/>
|
||||
</condition>
|
||||
</extension>
|
||||
|
||||
@@ -34,11 +34,13 @@
|
||||
$apps[$x]['destinations'][$y]['type'] = "sql";
|
||||
$apps[$x]['destinations'][$y]['label'] = "extensions";
|
||||
$apps[$x]['destinations'][$y]['name'] = "extensions";
|
||||
$apps[$x]['destinations'][$y]['sql'] = "select extension, number_alias, user_context as context, description from v_extensions ";
|
||||
$apps[$x]['destinations'][$y]['sql'] = "select extension_uuid, extension, number_alias, user_context as context, description from v_extensions ";
|
||||
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and enabled = 'true' ";
|
||||
$apps[$x]['destinations'][$y]['order_by'] = "number_alias, extension asc";
|
||||
$apps[$x]['destinations'][$y]['field']['context'] = "user_context";
|
||||
$apps[$x]['destinations'][$y]['field']['extension_uuid'] = "extension_uuid";
|
||||
$apps[$x]['destinations'][$y]['field']['destination'] = "number_alias,extension";
|
||||
$apps[$x]['destinations'][$y]['field']['extension'] = "number_alias,extension";
|
||||
$apps[$x]['destinations'][$y]['field']['context'] = "user_context";
|
||||
$apps[$x]['destinations'][$y]['field']['description'] = "description";
|
||||
$apps[$x]['destinations'][$y]['select_value']['user_contact'] = "user/\${destination}@\${domain_name}";
|
||||
$apps[$x]['destinations'][$y]['select_value']['dialplan'] = "transfer:\${destination} XML \${context}";
|
||||
@@ -48,9 +50,10 @@
|
||||
$apps[$x]['destinations'][$y]['type'] = "sql";
|
||||
$apps[$x]['destinations'][$y]['label'] = "loopback";
|
||||
$apps[$x]['destinations'][$y]['name'] = "extensions";
|
||||
$apps[$x]['destinations'][$y]['sql'] = "select extension, number_alias, user_context as context, description from v_extensions ";
|
||||
$apps[$x]['destinations'][$y]['sql'] = "select extension_uuid, extension, number_alias, user_context as context, description from v_extensions ";
|
||||
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and enabled = 'true' ";
|
||||
$apps[$x]['destinations'][$y]['order_by'] = "number_alias, extension asc";
|
||||
$apps[$x]['destinations'][$y]['field']['extension_uuid'] = "extension_uuid";
|
||||
$apps[$x]['destinations'][$y]['field']['destination'] = "number_alias,extension";
|
||||
$apps[$x]['destinations'][$y]['field']['context'] = "user_context";
|
||||
$apps[$x]['destinations'][$y]['field']['description'] = "description";
|
||||
@@ -60,11 +63,12 @@
|
||||
$apps[$x]['destinations'][$y]['type'] = "sql";
|
||||
$apps[$x]['destinations'][$y]['label'] = "call_groups";
|
||||
$apps[$x]['destinations'][$y]['name'] = "extensions";
|
||||
$apps[$x]['destinations'][$y]['sql']['pgsql'] = "select distinct(unnest(string_to_array(call_group, ','))) as destination from v_extensions ";
|
||||
$apps[$x]['destinations'][$y]['sql']['pgsql'] = "select extension_uuid, distinct(unnest(string_to_array(call_group, ','))) as destination from v_extensions ";
|
||||
$apps[$x]['destinations'][$y]['sql']['sqlite'] = "select distinct(call_group) as destination from v_extensions";
|
||||
$apps[$x]['destinations'][$y]['sql']['mysql'] = "select distinct(call_group) as destination from v_extensions";
|
||||
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and call_group <> '' and enabled = 'true' ";
|
||||
$apps[$x]['destinations'][$y]['order_by'] = "destination asc";
|
||||
$apps[$x]['destinations'][$y]['field']['extension_uuid'] = "extension_uuid";
|
||||
$apps[$x]['destinations'][$y]['field']['context'] = "user_context";
|
||||
$apps[$x]['destinations'][$y]['field']['destination'] = "destination";
|
||||
//$apps[$x]['destinations'][$y]['field']['destination']['name'] = "destination";
|
||||
@@ -202,6 +206,9 @@
|
||||
$apps[$x]['permissions'][$y]['name'] = "extension_export";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "extension_advanced";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "extension_destinations";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
@@ -215,7 +222,7 @@
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "dial_string";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "{sip_invite_domain=\${domain_name},leg_timeout=\${call_timeout},presence_id=\${dialed_user}@\${dialed_domain}}\${sofia_contact(*/\${dialed_user}@\${dialed_domain})}";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "3eeb3757-f7bb-437a-9021-8ccf3f27c98b";
|
||||
@@ -495,7 +502,7 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "nibble_account";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "sip_force_expires";
|
||||
|
||||
@@ -2872,25 +2872,25 @@ $text['description-accountcode']['ru-ru'] = "Введите здесь код с
|
||||
$text['description-accountcode']['sv-se'] = "Ange 'account code' här.";
|
||||
$text['description-accountcode']['uk-ua'] = "";
|
||||
|
||||
$text['button-call_routing']['en-us'] = "Call Routing";
|
||||
$text['button-call_routing']['en-gb'] = "Call Routing";
|
||||
$text['button-call_routing']['ar-eg'] = "توجيه الدعوة";
|
||||
$text['button-call_routing']['de-at'] = "Call Routing"; //copied from de-de
|
||||
$text['button-call_routing']['de-ch'] = "Call Routing"; //copied from de-de
|
||||
$text['button-call_routing']['de-de'] = "Call Routing";
|
||||
$text['button-call_routing']['es-cl'] = "enrutamiento de llamadas";
|
||||
$text['button-call_routing']['es-mx'] = "enrutamiento de llamadas"; //copied from es-cl
|
||||
$text['button-call_routing']['fr-ca'] = "routage des appels"; //copied from fr-fr
|
||||
$text['button-call_routing']['fr-fr'] = "routage des appels";
|
||||
$text['button-call_routing']['he-il'] = "ניתוב שיחות";
|
||||
$text['button-call_routing']['it-it'] = "Istradamento Chiamate";
|
||||
$text['button-call_routing']['nl-nl'] = "Oproep routering";
|
||||
$text['button-call_routing']['pl-pl'] = "Call Routing";
|
||||
$text['button-call_routing']['pt-br'] = "Roteamento de chamadas"; //copied from pt-pt
|
||||
$text['button-call_routing']['pt-pt'] = "roteamento de chamadas";
|
||||
$text['button-call_routing']['ro-ro'] = "";
|
||||
$text['button-call_routing']['ru-ru'] = "Маршрутизация Вызовов";
|
||||
$text['button-call_routing']['sv-se'] = "Call Routing";
|
||||
$text['button-call_routing']['uk-ua'] = "маршрутизація викликів";
|
||||
$text['button-call_forward']['en-us'] = "Call Forward";
|
||||
$text['button-call_forward']['en-gb'] = "Call Forward";
|
||||
$text['button-call_forward']['ar-eg'] = "";
|
||||
$text['button-call_forward']['de-at'] = "Rufumleitung"; //copied from de-de
|
||||
$text['button-call_forward']['de-ch'] = "Rufumleitung"; //copied from de-de
|
||||
$text['button-call_forward']['de-de'] = "Rufumleitung";
|
||||
$text['button-call_forward']['es-cl'] = "Reenvio de Llamadas";
|
||||
$text['button-call_forward']['es-mx'] = "Reenvio de Llamadas"; //copied from es-cl
|
||||
$text['button-call_forward']['fr-ca'] = "Renvoi d'appel"; //copied from fr-fr
|
||||
$text['button-call_forward']['fr-fr'] = "Renvoi d'appel";
|
||||
$text['button-call_forward']['he-il'] = "";
|
||||
$text['button-call_forward']['it-it'] = "Inoltro";
|
||||
$text['button-call_forward']['nl-nl'] = "Oproep doorsturen";
|
||||
$text['button-call_forward']['pl-pl'] = "Przekierowanie";
|
||||
$text['button-call_forward']['pt-br'] = "Encaminhamento de chamadas";
|
||||
$text['button-call_forward']['pt-pt'] = "Encaminhamento de Chamadas";
|
||||
$text['button-call_forward']['ro-ro'] = "";
|
||||
$text['button-call_forward']['ru-ru'] = "Переадресация";
|
||||
$text['button-call_forward']['sv-se'] = "Vidarekoppling";
|
||||
$text['button-call_forward']['uk-ua'] = "Переадресація";
|
||||
|
||||
?>
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
if (!is_numeric($voicemail_id)) {
|
||||
$voicemail_id = null;
|
||||
}
|
||||
|
||||
|
||||
//change toll allow delimiter
|
||||
$toll_allow = str_replace(',',':', $toll_allow);
|
||||
|
||||
@@ -142,8 +142,11 @@
|
||||
//device provisioning variables
|
||||
if (is_array($_POST["devices"]) && @sizeof($_POST["devices"]) != 0) {
|
||||
foreach ($_POST["devices"] as $d => $device) {
|
||||
$device_mac_address = strtolower($device["device_mac_address"]);
|
||||
$device_mac_address = preg_replace('#[^a-fA-F0-9./]#', '', $device_mac_address);
|
||||
|
||||
$line_numbers[$d] = $device["line_number"];
|
||||
$device_mac_addresses[$d] = format_mac($device["device_mac_address"],'');
|
||||
$device_mac_addresses[$d] = $device_mac_address;
|
||||
$device_templates[$d] = $device["device_template"];
|
||||
}
|
||||
}
|
||||
@@ -151,16 +154,18 @@
|
||||
//get or set the device_uuid
|
||||
if (is_array($device_mac_addresses) && @sizeof($device_mac_addresses) != 0) {
|
||||
foreach ($device_mac_addresses as $d => $device_mac_address) {
|
||||
if (is_mac($device_mac_address)) {
|
||||
$sql = "select device_uuid from v_devices ";
|
||||
$sql .= "where device_mac_address = :device_mac_address ";
|
||||
$sql .= "and domain_uuid = :domain_uuid ";
|
||||
$parameters['device_mac_address'] = $device_mac_address;
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
$database = new database;
|
||||
$device_uuid = $database->select($sql, $parameters, 'column');
|
||||
unset($sql, $parameters);
|
||||
}
|
||||
$device_mac_address = strtolower($device_mac_address);
|
||||
$device_mac_address = preg_replace('#[^a-fA-F0-9./]#', '', $device_mac_address);
|
||||
|
||||
$sql = "select device_uuid from v_devices ";
|
||||
$sql .= "where device_mac_address = :device_mac_address ";
|
||||
$sql .= "and domain_uuid = :domain_uuid ";
|
||||
$parameters['device_mac_address'] = $device_mac_address;
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
$database = new database;
|
||||
$device_uuid = $database->select($sql, $parameters, 'column');
|
||||
unset($sql, $parameters);
|
||||
|
||||
$device_uuids[$d] = is_uuid($device_uuid) ? $device_uuid : uuid();
|
||||
}
|
||||
}
|
||||
@@ -176,16 +181,20 @@
|
||||
$array['extension_users'][0]['extension_uuid'] = $extension_uuid;
|
||||
$array['extension_users'][0]['user_uuid'] = $user_uuid;
|
||||
|
||||
//add temporary permission
|
||||
$p = new permissions;
|
||||
$p->add('extension_user_delete', 'temp');
|
||||
|
||||
//save the array
|
||||
$database = new database;
|
||||
$database->app_name = 'extensions';
|
||||
$database->app_uuid = 'e68d9689-2769-e013-28fa-6214bf47fca3';
|
||||
$database->delete($array);
|
||||
unset($array);
|
||||
|
||||
//remove temporary permission
|
||||
$p->delete('extension_user_delete', 'temp');
|
||||
|
||||
//redirect
|
||||
header("Location: extension_edit.php?id=".$extension_uuid);
|
||||
exit;
|
||||
@@ -196,19 +205,24 @@
|
||||
if ($_REQUEST["delete_type"] == "device_line" && is_uuid($_REQUEST["delete_uuid"]) && permission_exists("extension_delete")) {
|
||||
//set the variables
|
||||
$device_line_uuid = $_REQUEST["delete_uuid"];
|
||||
|
||||
//delete device_line
|
||||
$array['device_lines'][0]['device_line_uuid'] = $device_line_uuid;
|
||||
|
||||
//add temporary permission
|
||||
$p = new permissions;
|
||||
$p->add('device_line_delete', 'temp');
|
||||
|
||||
//save the array
|
||||
$database = new database;
|
||||
$database->app_name = 'extensions';
|
||||
$database->app_uuid = 'e68d9689-2769-e013-28fa-6214bf47fca3';
|
||||
$database->delete($array);
|
||||
unset($array);
|
||||
|
||||
//remove temporary permission
|
||||
$p->delete('device_line_delete', 'temp');
|
||||
|
||||
//redirect
|
||||
header("Location: extension_edit.php?id=".$extension_uuid);
|
||||
exit;
|
||||
@@ -219,7 +233,12 @@
|
||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//set the domain_uuid
|
||||
$domain_uuid = permission_exists('extension_domain') ? $_POST["domain_uuid"] : $_SESSION['domain_uuid'];
|
||||
if (permission_exists('extension_domain') && is_uuid($_POST["domain_uuid"])) {
|
||||
$domain_uuid = $_POST["domain_uuid"];
|
||||
}
|
||||
else {
|
||||
$domain_uuid = $_SESSION['domain_uuid'];
|
||||
}
|
||||
|
||||
//validate the token
|
||||
$token = new token;
|
||||
@@ -315,15 +334,18 @@
|
||||
}
|
||||
else {
|
||||
|
||||
//get the password length and strength
|
||||
$password_length = $_SESSION["extension"]["password_length"]["numeric"];
|
||||
$password_strength = $_SESSION["extension"]["password_strength"]["numeric"];
|
||||
|
||||
//extension does not exist add it
|
||||
if ($action == "add" || $range > 1) {
|
||||
$extension_uuid = uuid();
|
||||
$voicemail_uuid = uuid();
|
||||
$password = generate_password();
|
||||
$password = generate_password($password_length, $password_strength);
|
||||
}
|
||||
|
||||
//prepare the values
|
||||
//mwi account
|
||||
//prepare the values for mwi account
|
||||
if (strlen($mwi_account) > 0) {
|
||||
if (strpos($mwi_account, '@') === false) {
|
||||
if (count($_SESSION["domains"]) > 1) {
|
||||
@@ -337,10 +359,10 @@
|
||||
|
||||
//generate a password
|
||||
if ($action == "add" && strlen($password) == 0) {
|
||||
$password = generate_password();
|
||||
$password = generate_password($password_length, $password_strength);
|
||||
}
|
||||
if ($action == "update" && permission_exists('extension_password') && strlen($password) == 0) {
|
||||
$password = generate_password();
|
||||
$password = generate_password($password_length, $password_strength);
|
||||
}
|
||||
|
||||
//create the data array
|
||||
@@ -814,11 +836,13 @@
|
||||
echo " document.iform.range_to.disabled = endis;\n";
|
||||
echo "}\n";
|
||||
echo "\n";
|
||||
echo "function show_advanced_config() {\n";
|
||||
echo " $('#show_advanced_box').slideToggle();\n";
|
||||
echo " $('#show_advanced').slideToggle();\n";
|
||||
echo "}\n";
|
||||
echo "\n";
|
||||
if (permission_exists('extension_advanced')) {
|
||||
echo "function show_advanced_config() {\n";
|
||||
echo " $('#show_advanced_box').slideToggle();\n";
|
||||
echo " $('#show_advanced').slideToggle();\n";
|
||||
echo "}\n";
|
||||
echo "\n";
|
||||
}
|
||||
echo "function copy_extension() {\n";
|
||||
echo " var new_ext = prompt('".$text['message-extension']."');\n";
|
||||
echo " if (new_ext != null) {\n";
|
||||
@@ -857,12 +881,15 @@
|
||||
unset($button_margin);
|
||||
}
|
||||
if (permission_exists('follow_me') || permission_exists('call_forward') || permission_exists('do_not_disturb')) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-call_routing'],'icon'=>'project-diagram','style'=>$button_margin,'link'=>'../calls/call_edit.php?id='.urlencode($extension_uuid)]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-call_forward'],'icon'=>'project-diagram','style'=>$button_margin,'link'=>'../calls/call_edit.php?id='.urlencode($extension_uuid)]);
|
||||
unset($button_margin);
|
||||
}
|
||||
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();"]);
|
||||
}
|
||||
if (permission_exists('domain_setting_view') && file_exists(PROJECT_PATH.'/app/extension_settings/app_config.php')) {
|
||||
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-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','style'=>'margin-left: 15px;','onclick'=>'submit_form();']);
|
||||
echo " </div>\n";
|
||||
@@ -1148,7 +1175,7 @@
|
||||
}
|
||||
echo " </tr>\n";
|
||||
|
||||
if (is_array($device_lines) && @sizeof($device_lines) != 0) { break; } //show one row when editing extension and no device assigned
|
||||
break; //show one empty row whether adding or editing
|
||||
}
|
||||
echo " </table>\n";
|
||||
echo " <br />\n";
|
||||
@@ -1672,186 +1699,6 @@
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
if (permission_exists("extension_user_context")) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-user_context']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='user_context' maxlength='255' value=\"".escape($user_context)."\" required='required'>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-user_context']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
//--- begin: show_advanced -----------------------
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td style='padding: 0px;' colspan='2' class='' valign='top' align='left' nowrap>\n";
|
||||
|
||||
echo " <div id=\"show_advanced_box\">\n";
|
||||
echo " <table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td width=\"30%\" valign=\"top\" class=\"vncell\"> </td>\n";
|
||||
echo " <td width=\"70%\" class=\"vtable\">\n";
|
||||
echo button::create(['type'=>'button','label'=>$text['button-advanced'],'icon'=>'tools','onclick'=>'show_advanced_config();']);
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
echo " </div>\n";
|
||||
|
||||
echo " <div id=\"show_advanced\" style=\"display:none\">\n";
|
||||
echo " <table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td width=\"30%\" class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-auth_acl']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td width=\"70%\" class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='auth_acl' maxlength='255' value=\"".escape($auth_acl)."\">\n";
|
||||
echo " <br />\n";
|
||||
echo $text['description-auth_acl']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if (permission_exists("extension_cidr")) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-cidr']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='cidr' maxlength='255' value=\"".escape($cidr)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-cidr']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-sip_force_contact']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='sip_force_contact'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
switch ($sip_force_contact) {
|
||||
case "NDLB-connectile-dysfunction": $selected[1] = "selected='selected'"; break;
|
||||
case "NDLB-connectile-dysfunction-2.0": $selected[2] = "selected='selected'"; break;
|
||||
case "NDLB-tls-connectile-dysfunction": $selected[3] = "selected='selected'"; break;
|
||||
}
|
||||
echo " <option value='NDLB-connectile-dysfunction' ".$selected[1].">".$text['label-rewrite_contact_ip_and_port']."</option>\n";
|
||||
echo " <option value='NDLB-connectile-dysfunction-2.0' ".$selected[2].">".$text['label-rewrite_contact_ip_and_port_2']."</option>\n";
|
||||
echo " <option value='NDLB-tls-connectile-dysfunction' ".$selected[3].">".$text['label-rewrite_tls_contact_port']."</option>\n";
|
||||
unset($selected);
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-sip_force_contact']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-sip_force_expires']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='number' name='sip_force_expires' maxlength='255' min='1' step='1' value=\"".escape($sip_force_expires)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-sip_force_expires']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if (permission_exists('extension_nibble_account')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-nibble_account']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='nibble_account' maxlength='255' value=\"".escape($nibble_account)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-nibble_account']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-mwi_account']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='mwi_account' maxlength='255' value=\"".escape($mwi_account)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-mwi_account']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-sip_bypass_media']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='sip_bypass_media'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
switch ($sip_bypass_media) {
|
||||
case "bypass-media" : $selected[1] = "selected='selected'"; break;
|
||||
case "bypass-media-after-bridge" : $selected[2] = "selected='selected'"; break;
|
||||
case "proxy-media" : $selected[3] = "selected='selected'"; break;
|
||||
}
|
||||
echo " <option value='bypass-media' ".$selected[1].">".$text['label-bypass_media']."</option>\n";
|
||||
echo " <option value='bypass-media-after-bridge'".$selected[2].">".$text['label-bypass_media_after_bridge']."</option>\n";
|
||||
echo " <option value='proxy-media'".$selected[3].">".$text['label-proxy_media']."</option>\n";
|
||||
unset($selected);
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-sip_bypass_media']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if (permission_exists('extension_absolute_codec_string')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-absolute_codec_string']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='absolute_codec_string' maxlength='255' value=\"".escape($absolute_codec_string)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-absolute_codec_string']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
if (permission_exists('extension_force_ping')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-force_ping']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='force_ping'>\n";
|
||||
if ($force_ping == "") {
|
||||
echo " <option value='' selected='selected'></option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value=''></option>\n";
|
||||
}
|
||||
if ($force_ping == "true") {
|
||||
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='true'>".$text['label-true']."</option>\n";
|
||||
}
|
||||
if ($force_ping == "false") {
|
||||
echo " <option value='false' selected='selected'>".$text['label-false']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='false'>".$text['label-false']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-force_ping']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
if (permission_exists('extension_domain')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
@@ -1874,25 +1721,207 @@
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
if (permission_exists('extension_dial_string')) {
|
||||
if (permission_exists("extension_user_context")) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-dial_string']."\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-user_context']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='dial_string' maxlength='4096' value=\"".escape($dial_string)."\">\n";
|
||||
echo " <input class='formfld' type='text' name='user_context' maxlength='255' value=\"".escape($user_context)."\" required='required'>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-dial_string']."\n";
|
||||
echo $text['description-user_context']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
echo " </table>\n";
|
||||
echo " </div>";
|
||||
//--- begin: show_advanced -----------------------
|
||||
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
if (permission_exists("extension_advanced")) {
|
||||
echo "<tr>\n";
|
||||
echo "<td style='padding: 0px;' colspan='2' class='' valign='top' align='left' nowrap>\n";
|
||||
|
||||
echo " <div id=\"show_advanced_box\">\n";
|
||||
echo " <table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td width=\"30%\" valign=\"top\" class=\"vncell\"> </td>\n";
|
||||
echo " <td width=\"70%\" class=\"vtable\">\n";
|
||||
echo button::create(['type'=>'button','label'=>$text['button-advanced'],'icon'=>'tools','onclick'=>'show_advanced_config();']);
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
echo " </div>\n";
|
||||
|
||||
echo " <div id=\"show_advanced\" style=\"display:none\">\n";
|
||||
echo " <table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td width=\"30%\" class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-auth_acl']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td width=\"70%\" class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='auth_acl' maxlength='255' value=\"".escape($auth_acl)."\">\n";
|
||||
echo " <br />\n";
|
||||
echo $text['description-auth_acl']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if (permission_exists("extension_cidr")) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-cidr']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='cidr' maxlength='255' value=\"".escape($cidr)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-cidr']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-sip_force_contact']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='sip_force_contact'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
switch ($sip_force_contact) {
|
||||
case "NDLB-connectile-dysfunction": $selected[1] = "selected='selected'"; break;
|
||||
case "NDLB-connectile-dysfunction-2.0": $selected[2] = "selected='selected'"; break;
|
||||
case "NDLB-tls-connectile-dysfunction": $selected[3] = "selected='selected'"; break;
|
||||
}
|
||||
echo " <option value='NDLB-connectile-dysfunction' ".$selected[1].">".$text['label-rewrite_contact_ip_and_port']."</option>\n";
|
||||
echo " <option value='NDLB-connectile-dysfunction-2.0' ".$selected[2].">".$text['label-rewrite_contact_ip_and_port_2']."</option>\n";
|
||||
echo " <option value='NDLB-tls-connectile-dysfunction' ".$selected[3].">".$text['label-rewrite_tls_contact_port']."</option>\n";
|
||||
unset($selected);
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-sip_force_contact']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-sip_force_expires']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='number' name='sip_force_expires' maxlength='255' min='1' step='1' value=\"".escape($sip_force_expires)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-sip_force_expires']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if (permission_exists('extension_nibble_account')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-nibble_account']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='nibble_account' maxlength='255' value=\"".escape($nibble_account)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-nibble_account']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-mwi_account']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='mwi_account' maxlength='255' value=\"".escape($mwi_account)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-mwi_account']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-sip_bypass_media']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='sip_bypass_media'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
switch ($sip_bypass_media) {
|
||||
case "bypass-media" : $selected[1] = "selected='selected'"; break;
|
||||
case "bypass-media-after-bridge" : $selected[2] = "selected='selected'"; break;
|
||||
case "proxy-media" : $selected[3] = "selected='selected'"; break;
|
||||
}
|
||||
echo " <option value='bypass-media' ".$selected[1].">".$text['label-bypass_media']."</option>\n";
|
||||
echo " <option value='bypass-media-after-bridge'".$selected[2].">".$text['label-bypass_media_after_bridge']."</option>\n";
|
||||
echo " <option value='proxy-media'".$selected[3].">".$text['label-proxy_media']."</option>\n";
|
||||
unset($selected);
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-sip_bypass_media']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if (permission_exists('extension_absolute_codec_string')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-absolute_codec_string']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='absolute_codec_string' maxlength='255' value=\"".escape($absolute_codec_string)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-absolute_codec_string']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
if (permission_exists('extension_force_ping')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-force_ping']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='force_ping'>\n";
|
||||
if ($force_ping == "") {
|
||||
echo " <option value='' selected='selected'></option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value=''></option>\n";
|
||||
}
|
||||
if ($force_ping == "true") {
|
||||
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='true'>".$text['label-true']."</option>\n";
|
||||
}
|
||||
if ($force_ping == "false") {
|
||||
echo " <option value='false' selected='selected'>".$text['label-false']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='false'>".$text['label-false']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-force_ping']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
if (permission_exists('extension_dial_string')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-dial_string']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='dial_string' maxlength='4096' value=\"".escape($dial_string)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-dial_string']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
echo " </table>\n";
|
||||
echo " </div>";
|
||||
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
}
|
||||
//--- end: show_advanced -----------------------
|
||||
|
||||
if (permission_exists('extension_enabled')) {
|
||||
@@ -1950,8 +1979,8 @@
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
|
||||
echo "</form>";
|
||||
|
||||
echo "<script>\n";
|
||||
|
||||
//hide password fields before submit
|
||||
echo " function submit_form() {\n";
|
||||
echo " hide_password_fields();\n";
|
||||
@@ -1962,4 +1991,4 @@
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
//copy the csv file
|
||||
//$_POST['submit'] == "Upload" &&
|
||||
if ( is_uploaded_file($_FILES['ulfile']['tmp_name']) && permission_exists('extension_imports')) {
|
||||
if ( is_uploaded_file($_FILES['ulfile']['tmp_name']) && permission_exists('extension_import')) {
|
||||
if ($_POST['type'] == 'csv') {
|
||||
move_uploaded_file($_FILES['ulfile']['tmp_name'], $_SESSION['server']['temp']['dir'].'/'.$_FILES['ulfile']['name']);
|
||||
$save_msg = "Uploaded file to ".$_SESSION['server']['temp']['dir']."/". htmlentities($_FILES['ulfile']['name']);
|
||||
@@ -393,7 +393,7 @@
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='from_row'>\n";
|
||||
$i=1;
|
||||
$i=2;
|
||||
while($i<=99) {
|
||||
$selected = ($i == $from_row) ? "selected" : null;
|
||||
echo " <option value='$i' ".$selected.">$i</option>\n";
|
||||
@@ -454,4 +454,4 @@
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -255,7 +255,9 @@
|
||||
}
|
||||
echo th_order_by('extension', $text['label-extension'], $order_by, $order);
|
||||
echo th_order_by('effective_caller_id_name', $text['label-effective_cid_name'], $order_by, $order, null, "class='hide-xs'");
|
||||
echo th_order_by('outbound_caller_id_name', $text['label-outbound_cid_name'], $order_by, $order, null, "class='hide-sm-dn'");
|
||||
if (permission_exists("outbound_caller_id_name")) {
|
||||
echo th_order_by('outbound_caller_id_name', $text['label-outbound_cid_name'], $order_by, $order, null, "class='hide-sm-dn'");
|
||||
}
|
||||
echo th_order_by('call_group', $text['label-call_group'], $order_by, $order);
|
||||
if (permission_exists("extension_user_context")) {
|
||||
echo th_order_by('user_context', $text['label-user_context'], $order_by, $order);
|
||||
@@ -296,7 +298,9 @@
|
||||
echo " </td>\n";
|
||||
|
||||
echo " <td class='hide-xs'>".escape($row['effective_caller_id_name'])." </td>\n";
|
||||
echo " <td class='hide-sm-dn'>".escape($row['outbound_caller_id_name'])." </td>\n";
|
||||
if (permission_exists("outbound_caller_id_name")) {
|
||||
echo " <td class='hide-sm-dn'>".escape($row['outbound_caller_id_name'])." </td>\n";
|
||||
}
|
||||
echo " <td>".escape($row['call_group'])." </td>\n";
|
||||
if (permission_exists("extension_user_context")) {
|
||||
echo " <td>".escape($row['user_context'])."</td>\n";
|
||||
@@ -358,4 +362,4 @@
|
||||
//show the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -31,21 +31,13 @@
|
||||
|
||||
//default settings
|
||||
$y=0;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "bc2fe268-a8a8-4a92-8096-86ab3c55a644";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_time_zone";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "-20";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Time zone ranges ";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "6de1ba1c-605c-457e-bff6-140d5f7fdc5f";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_time_zone_name";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "UTC-5";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Time zone name example United States-Eastern Time";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Time zone name example: UTC-5 for US Eastern time zone";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "54280025-2cc0-429a-b2f4-5e8e2426ed33";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
@@ -63,6 +55,14 @@
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable Daylight Savings Time. 0 - Disabled, 1 - Automatic, 2 - Manual";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "5820764c-e056-4a31-81b1-a3ca76a4015d";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_enable_sntp";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "1";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable Time Synchronized via SNTP. 0 - Disabled, 1 - Enabled. Default =1";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "983a969a-f96f-469f-8af2-ccbd6e3d62f6";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_dst_fixed_type";
|
||||
@@ -103,7 +103,7 @@
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "value 0-13 Date Format. 9=YYYY MM DD (ISO8601)";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a18c9b2a-a53b-4b9a-aa81-2bffa1771d0b";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a18c9b2a-a53b-4b9a-aa81-2bffa1771d0b";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_date_separator";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
@@ -135,7 +135,7 @@
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Numeric password on phone to access advanced settings.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "3d9497c7-9b03-4a4f-a577-d25d243fef44";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "3d9497c7-9b03-4a4f-a577-d25d243fef44";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_display_brightness_active";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
@@ -143,7 +143,7 @@
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Display brightness level when phone is active. (1 - 16)";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "10593dd2-cf96-4ae8-8488-0f8e49a384fb";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "10593dd2-cf96-4ae8-8488-0f8e49a384fb";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_display_brightness_inactive";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
@@ -158,7 +158,7 @@
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "45";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Backlight inactivity timer in seconds to dim the display. (0 - 120)";
|
||||
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a5194459-9f2d-4f3c-bdf1-d59b0989de84";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_default_ringtone";
|
||||
@@ -247,7 +247,7 @@
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Menu keys to display on desktop. Example 'history;dss1;dss2;dss3;'";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "e7d2f9fb-359d-426a-9f6a-4343f1b61802";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "e7d2f9fb-359d-426a-9f6a-4343f1b61802";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_softkey_talkingsoftkey";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
@@ -255,7 +255,7 @@
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Menu keys to display while on call. Example 'history;dss1;dss2;dss3;'";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "102c3315-af54-4f0d-a462-ac9347ae56a0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "102c3315-af54-4f0d-a462-ac9347ae56a0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_softkey_ringingsoftkey";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
@@ -263,7 +263,7 @@
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Menu keys to display while ringing. Example 'history;dss1;dss2;dss3;'";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "10d62c3e-f64d-4a7d-93fd-99f1b701609e";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "10d62c3e-f64d-4a7d-93fd-99f1b701609e";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_softkey_desktopclick";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
@@ -423,7 +423,7 @@
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Dial call as audio only or audio with video. 1-Audio, 2-Video Note: If you set this to video, then video is offered in the first invite which can cause your call to hang or not complete if going through a sip trunk provider.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "9a878f97-31bf-4d1a-93e2-c3b51c962383";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "9a878f97-31bf-4d1a-93e2-c3b51c962383";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_network_failure_reboot";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
@@ -431,7 +431,7 @@
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "If network fails, automatically reboot. 0 - NO, 1 - Yes";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "2b14337d-8c2b-4f17-8d43-cf0341db6b8c";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "2b14337d-8c2b-4f17-8d43-cf0341db6b8c";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_network_failure_wait_time";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
@@ -439,7 +439,7 @@
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Time to wait before automatic reboot in seconds.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "71fcfa1c-2921-43ed-aadb-9cd335cba6fb";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "71fcfa1c-2921-43ed-aadb-9cd335cba6fb";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_sip_failure_reboot";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
@@ -447,7 +447,7 @@
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "If sip registration fails, automatically reboot. 0 - NO, 1 - Yes";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "793c48b1-092b-44db-ac37-14339744a985";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "793c48b1-092b-44db-ac37-14339744a985";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_sip_failure_wait_time";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
@@ -559,7 +559,7 @@
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the X6 firmware ROM";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "c6842526-ca39-47f1-85af-1c4448b2fbd4";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "c6842526-ca39-47f1-85af-1c4448b2fbd4";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_switch_open_duration";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
@@ -583,7 +583,7 @@
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable RFID Card Reader. 0 - NO, 1 - Yes";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "725a09a9-78a7-40a6-b512-bfdde7e61123";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "725a09a9-78a7-40a6-b512-bfdde7e61123";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_enable_digit_pad";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
@@ -591,7 +591,7 @@
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable numeric digit pad. 0 - NO, 1 - Yes";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "e8480f45-b359-4ad3-9c6f-8d7f471c3057";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "e8480f45-b359-4ad3-9c6f-8d7f471c3057";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_enable_function_key_answer";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
@@ -655,342 +655,429 @@
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "EGS Syslog Server Port";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "68feb973-be9a-42ac-94a1-54263dfde589";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_lldp_tx_enable";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = " LLDP Transmit. 0-Disabled, 1-Enabled";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "f0d1dd5b-7130-428c-bddb-a975d85587f5";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_lldp_refresh";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "60";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "LLDP Refresh Timer. Default 60 seconds";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "10af1d27-ef61-4c7c-94cf-8db797a84ebc";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_lldp_learn";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Use LLDP learned information such as voip vlan";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "b4cc791a-5389-4e1f-9f87-e8394b399d64";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_enable_vlan";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable VLAN Support. 0 - NO, 1 - Yes";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "16d74bd9-7f44-4780-a202-3cfcbaa6ef5a";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_lan_port_vlan";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "256";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Default VLAN for phone LAN port.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "530564ac-17aa-4167-b047-bf764250d91a";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_pc_port_vlan";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "1";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Default VLAN for phone PC port.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "2b72e19b-2437-45c0-9df5-4fef6ac078c6";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_enable_diffserv";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "1";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable DiffServ(DSCP) Support. 0 - NO, 1 - Yes";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "86081f7e-af03-41b9-a5af-b5593182c9ff";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_qos_rtp_voice";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Layer 2 QoS 802.1p Priority Value for RTP Voice media";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "8050cfbd-44d1-46db-b553-2cc0defd5fc2";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_qos_rtp_video";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Layer 2 QoS 802.1p Priority Value for RTP Video media";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "ddf89377-7303-435c-917a-bdd32579cf36";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_qos_sip";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Layer 2 QoS 802.1p Priority Value for SIP signaling";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "b6a89aa6-2e21-489c-8f1f-e819e6ced17b";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_dscp_rtp_voice";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "46";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Layer 3 QoS DSCP Value for RTP Voice media";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "9a22bd5b-c2b0-4c06-bd19-63ef58837011";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_dscp_rtp_video";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "46";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Layer 3 QoS DSCP Value for RTP Video media";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "94effa7d-8c0f-4cca-b617-9d2d24748aa7";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_dscp_sip";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "-1";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Layer 3 QoS DSCP Value for SIP signaling (Disabled by default)";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "49f2ff3f-0628-44fa-a8d2-82cb38fbaf98";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_video_codec";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "H264";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable video codec on sip lines (Only h264 currently supported)";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "be8c1341-3cb6-4aa8-bef5-642ff11199e8";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_syslog_enable";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable Syslog server";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "8281507b-80fa-450a-94b7-6f58a7a9e6e1";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_syslog_server";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0.0.0.0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Syslog Server ip";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "db7595a1-318b-49d8-86a6-8ff4b44e30f5";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_syslog_server_port";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "514";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Syslog Server Port number";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "67a916be-35df-44f1-ab12-81756fd1f911";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_default_answer_mode";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "2";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Answer call as audio only or audio with video. 1-Audio, 2-Video";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "bbbdf01c-d760-43cf-958d-e47c54dd3997";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_default_dial_mode";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "1";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Dial call as audio only or audio with video. 1-Audio, 2-Video Note: If you set this to video, then video is offered in the first invite which can cause your call to hang or not complete if going through a sip trunk provider.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "37ddabf0-8d7c-494f-b381-5bc4e3048bff";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_enable_auto_upgrade";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable firmware auto upgrade 0 - NO, 1 - Yes";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "5a2a79c3-befb-4b7a-998d-3f0bfc9fcde4";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_upgrade_server_1";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "https://server.yourdomain.com/app/fanvil/resources/firmware";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Auto upgrade firmware server 1.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "de60a8fb-628a-4ee3-a76a-ff3e0a7f045f";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_upgrade_server_2";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "https://server2.yourdomain.com/app/fanvil/resources/firmware";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Auto upgrade firmware server 2.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "09134520-647a-4a86-bffd-d927aff2b33b";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_upgrade_interval";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "24";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Check for firmware every X hours.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "3ca2b12b-21f1-4a6d-a0eb-8670105c77d9";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_i20s";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "i20S2.1.1.3664T20180809203309.z";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the i20S firmware ROM";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "d07be0b3-a34b-4739-a227-766231e5bb52";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_i23s";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "i23S2.1.1.3664T20180809204215.z";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the i23S firmware ROM";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "6e0d313d-e44a-446f-9274-99e778d87cf5";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_i30";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "i302.1.1.3664T20180809203614.z";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the i30 firmware ROM";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a3cf0c35-4f92-4607-84a6-b06b29d67134";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_i31s";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "i31S2.1.1.3664T20180809203916.z";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the i31S firmware ROM";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "235ccea6-5ed0-45ff-a03f-d0cbc6ebaf01";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_x2p";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "x2-mono2.8.0.6251T20181017203533.z";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the X2P firmware ROM";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "8912437c-7142-4a85-b4aa-f83c1e50ad30";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_x3";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "x3s2.8.0.6251T20181017202549.z";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the X3S/G firmware ROM";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "756059c7-b754-4285-be22-0d51c82d62b3";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_x4";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "x42.8.0.6251T20181017202853.z";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the X4/G firmware ROM";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "122ba840-7dee-4c8e-a93c-739681b4b1d4";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_x5s";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "x5s-6900-P0.13.3-1.8.0-2698T2018-09-30-15.23.04.z";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the X5S firmware ROM";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "32635e1c-dcb8-44e1-a0c4-5209b4f84392";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_x6";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "x6-6914-P0.13.3-1.8.0-2697T2018-09-30-15.10.00.z";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the X6 firmware ROM";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "4b7f56f3-31a9-46dd-b588-35b253024b1f";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_switch_mode";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "0 - Monostable, 1 - Bistable";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "316ce083-69ba-4932-be02-845d3ed8f585";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_enable_card_reader";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable RFID Card Reader. 0 - NO, 1 - Yes";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "7226d18c-7d49-449b-be7b-8cfb46c1ddb3";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_enable_indoor_open";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Use indoor switch to unlock the door. 0 - NO, 1 - Yes";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "83dce10f-6254-490c-af89-a2a004890c47";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_enable_access_table";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "1";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Default: Enabled. 0 - NO, 1 - Yes";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "d4ffbf45-5abe-4ef3-9cf7-f222257d5633";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_opening_door_code_remote";
|
||||
$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: *";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "c51013fc-765e-4758-99a9-2738cfe9a7dd";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_opening_door_code_local";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "6789";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Default: 6789";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "0c5fe247-0361-4c69-a247-d14b5417e53e";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_enable_syslog";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable EGS Syslog. 0 - NO, 1 - Yes";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "1a74a177-49fc-432e-b10e-39c7d0c7ddc4";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_log_server";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0.0.0.0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "EGS Syslog Server. Hostname or IP";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "3fb2a87b-89b1-4d53-923d-c1478aec4f58";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_log_port";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "514";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "EGS Syslog Server Port";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "68feb973-be9a-42ac-94a1-54263dfde589";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_lldp_tx_enable";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = " LLDP Transmit. 0-Disabled, 1-Enabled";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "f0d1dd5b-7130-428c-bddb-a975d85587f5";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_lldp_refresh";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "60";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "LLDP Refresh Timer. Default 60 seconds";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "10af1d27-ef61-4c7c-94cf-8db797a84ebc";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_lldp_learn";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Use LLDP learned information such as voip vlan";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "b4cc791a-5389-4e1f-9f87-e8394b399d64";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_enable_vlan";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable VLAN Support. 0 - NO, 1 - Yes";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "16d74bd9-7f44-4780-a202-3cfcbaa6ef5a";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_lan_port_vlan";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "256";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Default VLAN for phone LAN port.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "530564ac-17aa-4167-b047-bf764250d91a";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_pc_port_vlan";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "1";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Default VLAN for phone PC port.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "2b72e19b-2437-45c0-9df5-4fef6ac078c6";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_enable_diffserv";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "1";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable DiffServ(DSCP) Support. 0 - NO, 1 - Yes";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "86081f7e-af03-41b9-a5af-b5593182c9ff";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_qos_rtp_voice";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Layer 2 QoS 802.1p Priority Value for RTP Voice media";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "8050cfbd-44d1-46db-b553-2cc0defd5fc2";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_qos_rtp_video";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Layer 2 QoS 802.1p Priority Value for RTP Video media";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "ddf89377-7303-435c-917a-bdd32579cf36";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_qos_sip";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Layer 2 QoS 802.1p Priority Value for SIP signaling";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "b6a89aa6-2e21-489c-8f1f-e819e6ced17b";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_dscp_rtp_voice";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "46";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Layer 3 QoS DSCP Value for RTP Voice media";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "9a22bd5b-c2b0-4c06-bd19-63ef58837011";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_dscp_rtp_video";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "46";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Layer 3 QoS DSCP Value for RTP Video media";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "94effa7d-8c0f-4cca-b617-9d2d24748aa7";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_dscp_sip";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "-1";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Layer 3 QoS DSCP Value for SIP signaling (Disabled by default)";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "49f2ff3f-0628-44fa-a8d2-82cb38fbaf98";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_video_codec";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "H264";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable video codec on sip lines (Only h264 currently supported)";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "be8c1341-3cb6-4aa8-bef5-642ff11199e8";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_syslog_enable";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable Syslog server";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "8281507b-80fa-450a-94b7-6f58a7a9e6e1";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_syslog_server";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0.0.0.0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Syslog Server ip";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "db7595a1-318b-49d8-86a6-8ff4b44e30f5";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_syslog_server_port";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "514";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Syslog Server Port number";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "67a916be-35df-44f1-ab12-81756fd1f911";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_default_answer_mode";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "2";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Answer call as audio only or audio with video. 1-Audio, 2-Video";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "bbbdf01c-d760-43cf-958d-e47c54dd3997";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_default_dial_mode";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "1";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Dial call as audio only or audio with video. 1-Audio, 2-Video Note: If you set this to video, then video is offered in the first invite which can cause your call to hang or not complete if going through a sip trunk provider.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "37ddabf0-8d7c-494f-b381-5bc4e3048bff";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_enable_auto_upgrade";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable firmware auto upgrade 0 - NO, 1 - Yes";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "5a2a79c3-befb-4b7a-998d-3f0bfc9fcde4";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_upgrade_server_1";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "https://server.yourdomain.com/app/fanvil/resources/firmware";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Auto upgrade firmware server 1.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "de60a8fb-628a-4ee3-a76a-ff3e0a7f045f";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_upgrade_server_2";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "https://server2.yourdomain.com/app/fanvil/resources/firmware";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Auto upgrade firmware server 2.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "09134520-647a-4a86-bffd-d927aff2b33b";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_upgrade_interval";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "24";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Check for firmware every X hours.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "3ca2b12b-21f1-4a6d-a0eb-8670105c77d9";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_i20s";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "i20S2.1.1.3664T20180809203309.z";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the i20S firmware ROM";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "d07be0b3-a34b-4739-a227-766231e5bb52";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_i23s";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "i23S2.1.1.3664T20180809204215.z";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the i23S firmware ROM";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "6e0d313d-e44a-446f-9274-99e778d87cf5";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_i30";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "i302.1.1.3664T20180809203614.z";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the i30 firmware ROM";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a3cf0c35-4f92-4607-84a6-b06b29d67134";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_i31s";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "i31S2.1.1.3664T20180809203916.z";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the i31S firmware ROM";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "235ccea6-5ed0-45ff-a03f-d0cbc6ebaf01";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_x2p";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "x2-mono2.8.0.6251T20181017203533.z";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the X2P firmware ROM";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "8912437c-7142-4a85-b4aa-f83c1e50ad30";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_x3";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "x3s2.8.0.6251T20181017202549.z";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the X3S/G firmware ROM";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "756059c7-b754-4285-be22-0d51c82d62b3";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_x4";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "x42.8.0.6251T20181017202853.z";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the X4/G firmware ROM";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "122ba840-7dee-4c8e-a93c-739681b4b1d4";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_x5s";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "x5s-6900-P0.13.3-1.8.0-2698T2018-09-30-15.23.04.z";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the X5S firmware ROM";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "32635e1c-dcb8-44e1-a0c4-5209b4f84392";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_x6";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "x6-6914-P0.13.3-1.8.0-2697T2018-09-30-15.10.00.z";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the X6 firmware ROM";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "4b7f56f3-31a9-46dd-b588-35b253024b1f";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_switch_mode";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "0 - Monostable, 1 - Bistable";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "316ce083-69ba-4932-be02-845d3ed8f585";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_enable_card_reader";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable RFID Card Reader. 0 - NO, 1 - Yes";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "7226d18c-7d49-449b-be7b-8cfb46c1ddb3";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_enable_indoor_open";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Use indoor switch to unlock the door. 0 - NO, 1 - Yes";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "83dce10f-6254-490c-af89-a2a004890c47";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_enable_access_table";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "1";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Default: Enabled. 0 - NO, 1 - Yes";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "d4ffbf45-5abe-4ef3-9cf7-f222257d5633";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_opening_door_code_remote";
|
||||
$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: *";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "c51013fc-765e-4758-99a9-2738cfe9a7dd";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_opening_door_code_local";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "6789";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Default: 6789";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "0c5fe247-0361-4c69-a247-d14b5417e53e";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_enable_syslog";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable EGS Syslog. 0 - NO, 1 - Yes";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "1a74a177-49fc-432e-b10e-39c7d0c7ddc4";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_log_server";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0.0.0.0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "EGS Syslog Server. Hostname or IP";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "3fb2a87b-89b1-4d53-923d-c1478aec4f58";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_log_port";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "514";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "EGS Syslog Server Port";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "108f26c5-568d-4cc0-af94-097ecb600b8f";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_provision_url";
|
||||
$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'] = "Provisioning URL for Fanvil";
|
||||
$y++;
|
||||
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_provision_url";
|
||||
$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'] = "Provisioning URL for Fanvil";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "8a7e84fb-f625-4ed2-83f4-b9f9d77d2929";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_emergency_number";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "911";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the emergency number.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "0b8ab3e6-a2cb-4f01-8b63-b9892311b77b";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_hotel_name";
|
||||
$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'] = "Option to display hotel name.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "63f8249c-646f-4f7c-bf09-f3148a2b8bf1";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_hotel_floor_number";
|
||||
$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'] = "Option to display hotel floor number.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "ecfe752a-36d1-4b6f-a69a-25d0f749cb78";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_hotel_room_number";
|
||||
$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'] = "Option to display hotel room number.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "9874128d-8331-4f91-9a33-d163d19aca5d";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_hotel_address";
|
||||
$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'] = "Option to display hotel address";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "c9f1075e-a9bc-45af-a21b-fba5b7ece9dd";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_hotel_tel_number";
|
||||
$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'] = "Option to display hotel phone number.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "f5beb1d3-a3dd-4636-b0e6-8f05bc8c0c90";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_hotel_first_text";
|
||||
$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'] = "Optional text on the lcd screen.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a4873d14-c5e0-4623-9027-86f63028a7f6";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_hotel_second_text";
|
||||
$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'] = "Optional text on the lcd screen.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "e59403c0-fa9d-4b93-b106-478fb9ced5d6";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_hotel_third_text";
|
||||
$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'] = "Optional text on the lcd screen.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "0f8ed3f6-9aba-4296-be31-5ab18d9caa64";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_hotel_fourth_text";
|
||||
$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'] = "Optional text on the lcd screen.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "b42dba7d-e7c9-4231-8e4a-edc28b301123";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_hotel_lcd";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "2";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set Fanvil LCD energy saving. 0=Sleep, 1=Normal, 2=Disable";
|
||||
$y++;
|
||||
|
||||
?>
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
$apps[$x]['destinations'][$y]['order_by'] = "fax_extension asc";
|
||||
$apps[$x]['destinations'][$y]['field']['name'] = "fax_name";
|
||||
$apps[$x]['destinations'][$y]['field']['destination'] = "fax_extension";
|
||||
$apps[$x]['destinations'][$y]['field']['extension'] = "fax_extension";
|
||||
$apps[$x]['destinations'][$y]['select_value']['dialplan'] = "transfer:\${destination} XML \${context}";
|
||||
$apps[$x]['destinations'][$y]['select_value']['ivr'] = "menu-exec-app:transfer \${destination} XML \${context}";
|
||||
$apps[$x]['destinations'][$y]['select_label'] = "\${destination} \${name}";
|
||||
|
||||
@@ -267,7 +267,7 @@ if (!function_exists('fax_split_dtmf')) {
|
||||
$token = new token;
|
||||
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||
message::add($text['message-invalid_token'],'negative');
|
||||
header('Location: fax_send.php');
|
||||
header('Location: fax_send.php'.(is_uuid($fax_uuid) ? '?id='.$fax_uuid : null));
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -456,38 +456,48 @@ if (!function_exists('fax_split_dtmf')) {
|
||||
|
||||
//logo
|
||||
$display_logo = false;
|
||||
if (!isset($_SESSION['fax']['cover_logo']['text']) && $_SESSION['fax']['cover_logo']['text'] == '') {
|
||||
$logo = PROJECT_PATH."/app/fax/resources/images/logo.jpg";
|
||||
if (!is_array($_SESSION['fax']['cover_logo'])) {
|
||||
$logo = $_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/fax/resources/images/logo.jpg";
|
||||
$display_logo = true;
|
||||
}
|
||||
if (!isset($_SESSION['fax']['cover_logo']['text']) && $_SESSION['fax']['cover_logo']['text'] != '') {
|
||||
$logo = '';
|
||||
$display_logo = false;
|
||||
else if (is_null($_SESSION['fax']['cover_logo']['text'])) {
|
||||
$logo = ''; //explicitly empty
|
||||
}
|
||||
else if (isset($_SESSION['fax']['cover_logo']['text']) && $_SESSION['fax']['cover_logo']['text'] != '') {
|
||||
$logo = $_SESSION['fax']['cover_logo']['text'];
|
||||
if (substr($logo, 0, 4) == 'http') {
|
||||
$remote_filename = strtolower(pathinfo($logo, PATHINFO_BASENAME));
|
||||
$remote_fileext = pathinfo($remote_filename, PATHINFO_EXTENSION);
|
||||
if ($remote_fileext == 'gif' || $remote_fileext == 'jpg' || $remote_fileext == 'jpeg' || $remote_fileext == 'png' || $remote_fileext == 'bmp') {
|
||||
if (!file_exists($dir_fax_temp.'/'.$remote_filename)) {
|
||||
$raw = file_get_contents($logo);
|
||||
if (file_put_contents($dir_fax_temp.'/'.$remote_filename, $raw)) {
|
||||
$logo = $dir_fax_temp.'/'.$remote_filename;
|
||||
}
|
||||
else {
|
||||
unset($logo);
|
||||
}
|
||||
else if ($_SESSION['fax']['cover_logo']['text'] != '') {
|
||||
if (substr($_SESSION['fax']['cover_logo']['text'], 0, 4) == 'http') {
|
||||
$logo = $_SESSION['fax']['cover_logo']['text'];
|
||||
}
|
||||
else if (substr($_SESSION['fax']['cover_logo']['text'], 0, 1) == '/') {
|
||||
if (substr($_SESSION['fax']['cover_logo']['text'], 0, strlen($_SERVER['DOCUMENT_ROOT'])) != $_SERVER['DOCUMENT_ROOT']) {
|
||||
$logo = $_SERVER['DOCUMENT_ROOT'].$_SESSION['fax']['cover_logo']['text'];
|
||||
}
|
||||
else {
|
||||
$logo = $_SESSION['fax']['cover_logo']['text'];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isset($logo) && $logo) {
|
||||
$logo_filename = strtolower(pathinfo($logo, PATHINFO_BASENAME));
|
||||
$logo_fileext = pathinfo($logo_filename, PATHINFO_EXTENSION);
|
||||
if (in_array($logo_fileext, ['gif','jpg','jpeg','png','bmp'])) {
|
||||
if (!file_exists($dir_fax_temp.'/'.$logo_filename)) {
|
||||
$raw = file_get_contents($logo);
|
||||
if (file_put_contents($dir_fax_temp.'/'.$logo_filename, $raw)) {
|
||||
$logo = $dir_fax_temp.'/'.$logo_filename;
|
||||
$display_logo = true;
|
||||
}
|
||||
else {
|
||||
$logo = $dir_fax_temp.'/'.$remote_filename;
|
||||
unset($logo);
|
||||
}
|
||||
}
|
||||
else {
|
||||
unset($logo);
|
||||
$logo = $dir_fax_temp.'/'.$logo_filename;
|
||||
$display_logo = true;
|
||||
}
|
||||
}
|
||||
$display_logo = true;
|
||||
else {
|
||||
unset($logo);
|
||||
}
|
||||
}
|
||||
|
||||
if ($display_logo) {
|
||||
@@ -758,16 +768,16 @@ if (!function_exists('fax_split_dtmf')) {
|
||||
|
||||
//send the fax
|
||||
$fax_file = $dir_fax_temp."/".$fax_instance_uuid.".tif";
|
||||
$dial_string = "for_fax=1,";
|
||||
$dial_string .= "accountcode='" . $fax_accountcode . "',";
|
||||
$dial_string .= "sip_h_X-accountcode='" . $fax_accountcode . "',";
|
||||
$dial_string .= "domain_uuid=" . $_SESSION["domain_uuid"] . ",";
|
||||
$dial_string .= "domain_name=" . $_SESSION["domain_name"] . ",";
|
||||
$dial_string .= "origination_caller_id_name='" . $fax_caller_id_name . "',";
|
||||
$dial_string .= "origination_caller_id_number='" . $fax_caller_id_number . "',";
|
||||
$dial_string .= "fax_ident='" . $fax_caller_id_number . "',";
|
||||
$dial_string .= "fax_header='" . $fax_caller_id_name . "',";
|
||||
$dial_string .= "fax_file='" . $fax_file . "',";
|
||||
$tmp_dial_string = "for_fax=1,";
|
||||
$tmp_dial_string .= "accountcode='" . $fax_accountcode . "',";
|
||||
$tmp_dial_string .= "sip_h_X-accountcode='" . $fax_accountcode . "',";
|
||||
$tmp_dial_string .= "domain_uuid=" . $_SESSION["domain_uuid"] . ",";
|
||||
$tmp_dial_string .= "domain_name=" . $_SESSION["domain_name"] . ",";
|
||||
$tmp_dial_string .= "origination_caller_id_name='" . $fax_caller_id_name . "',";
|
||||
$tmp_dial_string .= "origination_caller_id_number='" . $fax_caller_id_number . "',";
|
||||
$tmp_dial_string .= "fax_ident='" . $fax_caller_id_number . "',";
|
||||
$tmp_dial_string .= "fax_header='" . $fax_caller_id_name . "',";
|
||||
$tmp_dial_string .= "fax_file='" . $fax_file . "',";
|
||||
foreach ($fax_numbers as $fax_number) {
|
||||
|
||||
$fax_number = trim($fax_number);
|
||||
@@ -793,6 +803,7 @@ if (!function_exists('fax_split_dtmf')) {
|
||||
}
|
||||
|
||||
if ($fax_send_mode != 'queue') {
|
||||
$dial_string = $tmp_dial_string;
|
||||
$dial_string .= $fax_variables;
|
||||
$dial_string .= "mailto_address='" . $mailto_address . "',";
|
||||
$dial_string .= "mailfrom_address='" . $mailfrom_address . "',";
|
||||
@@ -817,6 +828,7 @@ if (!function_exists('fax_split_dtmf')) {
|
||||
}
|
||||
else { // enqueue
|
||||
$wav_file = ''; //! @todo add custom message
|
||||
$dial_string = $tmp_dial_string;
|
||||
$response = fax_enqueue($fax_uuid, $fax_file, $wav_file, $mailto_address, $fax_uri, $fax_dtmf, $dial_string);
|
||||
}
|
||||
}
|
||||
@@ -1175,4 +1187,4 @@ function showgrid($pdf) {
|
||||
}
|
||||
*/
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -193,9 +193,6 @@ if (!class_exists('fax')) {
|
||||
$p->delete("dialplan_edit", 'temp');
|
||||
$p->delete("dialplan_detail_edit", 'temp');
|
||||
|
||||
//synchronize the xml config
|
||||
save_dialplan_xml();
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION['context']);
|
||||
@@ -344,9 +341,6 @@ if (!class_exists('fax')) {
|
||||
$p->delete('dialplan_delete', 'temp');
|
||||
$p->delete('dialplan_detail_delete', 'temp');
|
||||
|
||||
//syncrhonize configuration
|
||||
save_dialplan_xml();
|
||||
|
||||
//apply settings reminder
|
||||
$_SESSION["reload_xml"] = true;
|
||||
|
||||
@@ -647,9 +641,6 @@ if (!class_exists('fax')) {
|
||||
$p->delete('fax_add', 'temp');
|
||||
$p->delete('dialplan_add', 'temp');
|
||||
|
||||
//syncrhonize configuration
|
||||
save_dialplan_xml();
|
||||
|
||||
//apply settings reminder
|
||||
$_SESSION["reload_xml"] = true;
|
||||
|
||||
@@ -682,4 +673,4 @@ $c->fax_description = $fax_description;
|
||||
$c->dialplan();
|
||||
*/
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -17,25 +17,28 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Copyright (C) 2010
|
||||
Copyright (C) 2010 - 2020
|
||||
All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
|
||||
*/
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
require_once "resources/paging.php";
|
||||
|
||||
if (permission_exists('fifo_add')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
//includes
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
require_once "resources/paging.php";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('fifo_add')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
@@ -58,9 +61,10 @@ else {
|
||||
if (strlen($dialplan_enabled) == 0) { $dialplan_enabled = "true"; } //set default to enabled
|
||||
}
|
||||
|
||||
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
//process the HTTP POST
|
||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//validate the token
|
||||
//validate the token
|
||||
$token = new token;
|
||||
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||
message::add($text['message-invalid_token'],'negative');
|
||||
@@ -68,7 +72,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
exit;
|
||||
}
|
||||
|
||||
//check for all required data
|
||||
//check for all required data
|
||||
if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']."domain_uuid<br>\n"; }
|
||||
if (strlen($extension_name) == 0) { $msg .= $text['message-required'].$text['label-name']."<br>\n"; }
|
||||
if (strlen($queue_extension_number) == 0) { $msg .= $text['message-required'].$text['label-extension']."<br>\n"; }
|
||||
@@ -85,206 +89,331 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (strlen($queue_extension_number) > 0) {
|
||||
//--------------------------------------------------------
|
||||
//Caller Queue [FIFO in]
|
||||
//<extension name="Queue_Call_In">
|
||||
// <condition field="destination_number" expression="^7011\$">
|
||||
// <action application="set" data="fifo_music=$${hold_music}"/>
|
||||
// <action application="answer"/>
|
||||
// <action application="fifo" data="myq in"/>
|
||||
// </condition>
|
||||
//</extension>
|
||||
//--------------------------------------------------------
|
||||
if (strlen($queue_extension_number) > 0) {
|
||||
//--------------------------------------------------------
|
||||
//Caller Queue [FIFO in]
|
||||
//<extension name="Queue_Call_In">
|
||||
// <condition field="destination_number" expression="^7011\$">
|
||||
// <action application="set" data="fifo_music=$${hold_music}"/>
|
||||
// <action application="answer"/>
|
||||
// <action application="fifo" data="myq in"/>
|
||||
// </condition>
|
||||
//</extension>
|
||||
//--------------------------------------------------------
|
||||
$queue_name = $extension_name."@\${domain_name}";
|
||||
$app_uuid = '16589224-c876-aeb3-f59f-523a1c0801f7';
|
||||
$dialplan_uuid = uuid();
|
||||
$dialplan_context = $_SESSION['context'];
|
||||
dialplan_add($domain_uuid, $dialplan_uuid, $extension_name, $dialplan_order, $dialplan_context, $dialplan_enabled, $dialplan_description, $app_uuid);
|
||||
$domain_uuid = $_SESSION['domain_uuid'];
|
||||
$dialplan_detail_order = 0;
|
||||
|
||||
//start building the dialplan array
|
||||
$y=0;
|
||||
$array["dialplans"][$y]["domain_uuid"] = $domain_uuid;
|
||||
$array["dialplans"][$y]["dialplan_uuid"] = $dialplan_uuid;
|
||||
$array["dialplans"][$y]["app_uuid"] = $app_uuid;
|
||||
$array["dialplans"][$y]["dialplan_name"] = $extension_name;
|
||||
$array["dialplans"][$y]["dialplan_order"] = "$dialplan_order";
|
||||
$array["dialplans"][$y]["dialplan_context"] = $dialplan_context;
|
||||
$array["dialplans"][$y]["dialplan_enabled"] = $dialplan_enabled;
|
||||
$array["dialplans"][$y]["dialplan_order"] = $dialplan_order;
|
||||
$array["dialplans"][$y]["dialplan_description"] = $dialplan_description;
|
||||
$y++;
|
||||
|
||||
if (is_uuid($dialplan_uuid)) {
|
||||
//set the destination number
|
||||
$dialplan_detail_tag = 'condition'; //condition, action, antiaction
|
||||
$dialplan_detail_type = 'destination_number';
|
||||
$dialplan_detail_data = '^'.$queue_extension_number.'$';
|
||||
$dialplan_detail_order = '000';
|
||||
$dialplan_detail_group = '1';
|
||||
if ((strlen($agent_queue_extension_number) > 0) || (strlen($agent_login_logout_extension_number) > 0)) {
|
||||
$dialplan_detail_break = 'on-true';
|
||||
}
|
||||
else {
|
||||
$dialplan_detail_break = '';
|
||||
}
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data, $dialplan_detail_break);
|
||||
$array["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_tag"] = "condition";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_type"] = "destination_number";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_data"] = '^'.$queue_extension_number.'$';
|
||||
$array["dialplan_details"][$y]["dialplan_detail_inline"] = "";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
if ((strlen($agent_queue_extension_number) > 0) || (strlen($agent_login_logout_extension_number) > 0)) {
|
||||
$array["dialplan_details"][$y]["dialplan_detail_break"] = 'on-true';
|
||||
}
|
||||
$array["dialplan_details"][$y]["dialplan_detail_group"] = '1';
|
||||
$y++;
|
||||
|
||||
//increment the dialplan detial order
|
||||
$dialplan_detail_order = $dialplan_detail_order + 10;
|
||||
|
||||
//set the hold music
|
||||
$dialplan_detail_tag = 'action'; //condition, action, antiaction
|
||||
$dialplan_detail_type = 'set';
|
||||
$dialplan_detail_data = 'fifo_music=$${hold_music}';
|
||||
$dialplan_detail_order = '001';
|
||||
$dialplan_detail_group = '1';
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
$array["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_data"] = "fifo_music=\$\${hold_music}";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_inline"] = "true";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_group"] = '1';
|
||||
$y++;
|
||||
|
||||
//increment the dialplan detial order
|
||||
$dialplan_detail_order = $dialplan_detail_order + 10;
|
||||
|
||||
//action answer
|
||||
$dialplan_detail_tag = 'action'; //condition, action, antiaction
|
||||
$dialplan_detail_type = 'answer';
|
||||
$dialplan_detail_data = '';
|
||||
$dialplan_detail_order = '002';
|
||||
$dialplan_detail_group = '1';
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
$array["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_type"] = "answer";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_data"] = "";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_inline"] = "";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_group"] = '1';
|
||||
$y++;
|
||||
|
||||
//increment the dialplan detial order
|
||||
$dialplan_detail_order = $dialplan_detail_order + 10;
|
||||
|
||||
//action fifo
|
||||
//if (strlen($pin_number) > 0) { $pin_number = "+".$pin_number; }
|
||||
//if (strlen($flags) > 0) { $flags = "+{".$flags."}"; }
|
||||
//$queue_action_data = $extension_name."@\${domain_name}".$profile.$flags.$pin_number;
|
||||
$queue_action_data = $queue_name." in";
|
||||
$dialplan_detail_tag = 'action'; //condition, action, antiaction
|
||||
$dialplan_detail_type = 'fifo';
|
||||
$dialplan_detail_data = $queue_action_data;
|
||||
$dialplan_detail_order = '003';
|
||||
$dialplan_detail_group = '1';
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
//if (strlen($pin_number) > 0) { $pin_number = "+".$pin_number; }
|
||||
//if (strlen($flags) > 0) { $flags = "+{".$flags."}"; }
|
||||
//$queue_action_data = $extension_name."@\${domain_name}".$profile.$flags.$pin_number;
|
||||
$array["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_type"] = "fifo";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_data"] = $queue_action_data;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_inline"] = "";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_group"] = '1';
|
||||
$y++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Caller Queue / Agent Queue
|
||||
if (strlen($agent_queue_extension_number) > 0) {
|
||||
//--------------------------------------------------------
|
||||
// Agent Queue [FIFO out]
|
||||
//<extension name="Agent_Wait">
|
||||
// <condition field="destination_number" expression="^7010\$">
|
||||
// <action application="set" data="fifo_music=$${hold_music}"/>
|
||||
// <action application="answer"/>
|
||||
// <action application="fifo" data="myq out wait"/>
|
||||
// </condition>
|
||||
//</extension>
|
||||
//--------------------------------------------------------
|
||||
// Caller Queue / Agent Queue
|
||||
if (strlen($agent_queue_extension_number) > 0) {
|
||||
//--------------------------------------------------------
|
||||
// Agent Queue [FIFO out]
|
||||
//<extension name="Agent_Wait">
|
||||
// <condition field="destination_number" expression="^7010\$">
|
||||
// <action application="set" data="fifo_music=$${hold_music}"/>
|
||||
// <action application="answer"/>
|
||||
// <action application="fifo" data="myq out wait"/>
|
||||
// </condition>
|
||||
//</extension>
|
||||
//--------------------------------------------------------
|
||||
$queue_name = $extension_name."_agent@\${domain_name}";
|
||||
if (is_uuid($dialplan_uuid)) {
|
||||
//set the destination number
|
||||
$dialplan_detail_tag = 'condition'; //condition, action, antiaction
|
||||
$dialplan_detail_type = 'destination_number';
|
||||
$dialplan_detail_data = '^'.$agent_queue_extension_number.'$';
|
||||
$dialplan_detail_order = '000';
|
||||
$dialplan_detail_group = '2';
|
||||
if (strlen($agent_login_logout_extension_number) > 0) {
|
||||
$dialplan_detail_break = 'on-true';
|
||||
}
|
||||
else {
|
||||
$dialplan_detail_break = '';
|
||||
}
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data, $dialplan_detail_break);
|
||||
//set the hold music
|
||||
$dialplan_detail_tag = 'action'; //condition, action, antiaction
|
||||
$dialplan_detail_type = 'set';
|
||||
$dialplan_detail_data = 'fifo_music=$${hold_music}';
|
||||
$dialplan_detail_order = '001';
|
||||
$dialplan_detail_group = '2';
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
//action answer
|
||||
$dialplan_detail_tag = 'action'; //condition, action, antiaction
|
||||
$dialplan_detail_type = 'answer';
|
||||
$dialplan_detail_data = '';
|
||||
$dialplan_detail_order = '002';
|
||||
$dialplan_detail_group = '2';
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
//action fifo
|
||||
//if (strlen($pin_number) > 0) { $pin_number = "+".$pin_number; }
|
||||
//if (strlen($flags) > 0) { $flags = "+{".$flags."}"; }
|
||||
//$queue_action_data = $extension_name."@\${domain_name}".$profile.$flags.$pin_number;
|
||||
$queue_action_data = $queue_name." out wait";
|
||||
$dialplan_detail_tag = 'action'; //condition, action, antiaction
|
||||
$dialplan_detail_type = 'fifo';
|
||||
$dialplan_detail_data = $queue_action_data;
|
||||
$dialplan_detail_order = '003';
|
||||
$dialplan_detail_group = '2';
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
}
|
||||
}
|
||||
|
||||
// agent or member login / logout
|
||||
if (strlen($agent_login_logout_extension_number) > 0) {
|
||||
//--------------------------------------------------------
|
||||
// Agent Queue [FIFO out]
|
||||
//<extension name="Agent_Wait">
|
||||
// <condition field="destination_number" expression="^7010\$">
|
||||
// <action application="set" data="fifo_music=$${hold_music}"/>
|
||||
// <action application="answer"/>
|
||||
// <action application="fifo" data="myq out wait"/>
|
||||
// </condition>
|
||||
//</extension>
|
||||
//--------------------------------------------------------
|
||||
//set the dialplan detial order to zero
|
||||
$dialplan_detail_order = 0;
|
||||
|
||||
//set the destination number
|
||||
$array["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_tag"] = "condition";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_type"] = "destination_number";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_data"] = '^'.$agent_queue_extension_number.'$';
|
||||
$array["dialplan_details"][$y]["dialplan_detail_inline"] = "";
|
||||
if (strlen($agent_login_logout_extension_number) > 0) {
|
||||
$array["dialplan_details"][$y]["dialplan_detail_break"] = $dialplan_detail_break;
|
||||
}
|
||||
$array["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_group"] = '2';
|
||||
$y++;
|
||||
|
||||
//increment the dialplan detial order
|
||||
$dialplan_detail_order = $dialplan_detail_order + 10;
|
||||
|
||||
//set the hold music
|
||||
$array["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_data"] = "fifo_music=\$\${hold_music}";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_inline"] = "true";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_group"] = '2';
|
||||
$y++;
|
||||
|
||||
//increment the dialplan detial order
|
||||
$dialplan_detail_order = $dialplan_detail_order + 10;
|
||||
|
||||
//action answer
|
||||
$array["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_type"] = "answer";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_data"] = "";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_inline"] = "";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_group"] = '2';
|
||||
$y++;
|
||||
|
||||
//increment the dialplan detial order
|
||||
$dialplan_detail_order = $dialplan_detail_order + 10;
|
||||
|
||||
//action fifo
|
||||
$queue_action_data = $queue_name." out wait";
|
||||
$array["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_type"] = "fifo";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_data"] = $queue_action_data;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_inline"] = "";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_group"] = '2';
|
||||
$y++;
|
||||
}
|
||||
}
|
||||
|
||||
// agent or member login / logout
|
||||
if (strlen($agent_login_logout_extension_number) > 0) {
|
||||
//--------------------------------------------------------
|
||||
// Agent Queue [FIFO out]
|
||||
//<extension name="Agent_Wait">
|
||||
// <condition field="destination_number" expression="^7010\$">
|
||||
// <action application="set" data="fifo_music=$${hold_music}"/>
|
||||
// <action application="answer"/>
|
||||
// <action application="fifo" data="myq out wait"/>
|
||||
// </condition>
|
||||
//</extension>
|
||||
//--------------------------------------------------------
|
||||
$queue_name = $extension_name."@\${domain_name}";
|
||||
if (is_uuid($dialplan_uuid)) {
|
||||
|
||||
//set the dialplan detial order to zero
|
||||
$dialplan_detail_order = 0;
|
||||
|
||||
//set the destination number
|
||||
$dialplan_detail_tag = 'condition'; //condition, action, antiaction
|
||||
$dialplan_detail_type = 'destination_number';
|
||||
$dialplan_detail_data = '^'.$agent_login_logout_extension_number.'$';
|
||||
$dialplan_detail_order = '000';
|
||||
$dialplan_detail_group = '3';
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
$array["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_tag"] = "condition";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_type"] = "destination_number";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_data"] = '^'.$agent_login_logout_extension_number.'$';
|
||||
$array["dialplan_details"][$y]["dialplan_detail_inline"] = "";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_group"] = '3';
|
||||
$y++;
|
||||
|
||||
//increment the dialplan detial order
|
||||
$dialplan_detail_order = $dialplan_detail_order + 10;
|
||||
|
||||
//set the queue_name
|
||||
$dialplan_detail_tag = 'action'; //condition, action, antiaction
|
||||
$dialplan_detail_type = 'set';
|
||||
$dialplan_detail_data = 'queue_name='.$queue_name;
|
||||
$dialplan_detail_order = '001';
|
||||
$dialplan_detail_group = '3';
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
$array["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_data"] = 'queue_name='.$queue_name;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_inline"] = "true";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_group"] = '3';
|
||||
$y++;
|
||||
|
||||
//increment the dialplan detial order
|
||||
$dialplan_detail_order = $dialplan_detail_order + 10;
|
||||
|
||||
//set the user_name
|
||||
$dialplan_detail_tag = 'action'; //condition, action, antiaction
|
||||
$dialplan_detail_type = 'set';
|
||||
$dialplan_detail_data = 'user_name=${caller_id_number}@${domain_name}';
|
||||
$dialplan_detail_order = '002';
|
||||
$dialplan_detail_group = '3';
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
$array["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_data"] = 'user_name=${caller_id_number}@${domain_name}';
|
||||
$array["dialplan_details"][$y]["dialplan_detail_inline"] = "true";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_group"] = '3';
|
||||
$y++;
|
||||
|
||||
//increment the dialplan detial order
|
||||
$dialplan_detail_order = $dialplan_detail_order + 10;
|
||||
|
||||
//set the fifo_simo
|
||||
$dialplan_detail_tag = 'action'; //condition, action, antiaction
|
||||
$dialplan_detail_type = 'set';
|
||||
$dialplan_detail_data = 'fifo_simo=1';
|
||||
$dialplan_detail_order = '003';
|
||||
$dialplan_detail_group = '3';
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
$array["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_data"] = 'fifo_simo=1';
|
||||
$array["dialplan_details"][$y]["dialplan_detail_inline"] = "true";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_group"] = '3';
|
||||
$y++;
|
||||
|
||||
//increment the dialplan detial order
|
||||
$dialplan_detail_order = $dialplan_detail_order + 10;
|
||||
|
||||
//set the fifo_timeout
|
||||
$dialplan_detail_tag = 'action'; //condition, action, antiaction
|
||||
$dialplan_detail_type = 'set';
|
||||
$dialplan_detail_data = 'fifo_timeout=10';
|
||||
$dialplan_detail_order = '004';
|
||||
$dialplan_detail_group = '3';
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
$array["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_data"] = 'fifo_timeout=10';
|
||||
$array["dialplan_details"][$y]["dialplan_detail_inline"] = "true";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_group"] = '3';
|
||||
$y++;
|
||||
|
||||
//increment the dialplan detial order
|
||||
$dialplan_detail_order = $dialplan_detail_order + 10;
|
||||
|
||||
//set the fifo_lag
|
||||
$dialplan_detail_tag = 'action'; //condition, action, antiaction
|
||||
$dialplan_detail_type = 'set';
|
||||
$dialplan_detail_data = 'fifo_lag=10';
|
||||
$dialplan_detail_order = '005';
|
||||
$dialplan_detail_group = '3';
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
$array["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_data"] = 'fifo_lag=10';
|
||||
$array["dialplan_details"][$y]["dialplan_detail_inline"] = "true";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_group"] = '3';
|
||||
$y++;
|
||||
|
||||
//increment the dialplan detial order
|
||||
$dialplan_detail_order = $dialplan_detail_order + 10;
|
||||
|
||||
//set the pin_number
|
||||
$dialplan_detail_tag = 'action'; //condition, action, antiaction
|
||||
$dialplan_detail_type = 'set';
|
||||
$dialplan_detail_data = 'pin_number=';
|
||||
$dialplan_detail_order = '006';
|
||||
$dialplan_detail_group = '3';
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
$array["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_data"] = 'pin_number=';
|
||||
$array["dialplan_details"][$y]["dialplan_detail_inline"] = "true";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_group"] = '3';
|
||||
$y++;
|
||||
|
||||
//increment the dialplan detial order
|
||||
$dialplan_detail_order = $dialplan_detail_order + 10;
|
||||
|
||||
//action lua
|
||||
$dialplan_detail_tag = 'action'; //condition, action, antiaction
|
||||
$dialplan_detail_type = 'lua';
|
||||
$dialplan_detail_data = 'fifo_member.lua';
|
||||
$dialplan_detail_order = '007';
|
||||
$dialplan_detail_group = '3';
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
$array["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_type"] = "lua";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_data"] = "fifo_member.lua";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_inline"] = "true";
|
||||
$array["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
$array["dialplan_details"][$y]["dialplan_detail_group"] = '3';
|
||||
$y++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//synchronize the xml config
|
||||
save_dialplan_xml();
|
||||
//add the dialplan permission
|
||||
$p = new permissions;
|
||||
$p->add("dialplan_add", "temp");
|
||||
$p->add("dialplan_edit", "temp");
|
||||
|
||||
//clear the cache
|
||||
//save to the data
|
||||
$database = new database;
|
||||
$database->app_name = 'fifo';
|
||||
$database->app_uuid = '16589224-c876-aeb3-f59f-523a1c0801f7';
|
||||
$database->save($array);
|
||||
//$message = $database->message;
|
||||
|
||||
//remove the temporary permission
|
||||
$p->delete("dialplan_add", "temp");
|
||||
$p->delete("dialplan_edit", "temp");
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
|
||||
//redirect the user
|
||||
//redirect the user
|
||||
message::add($text['message-add']);
|
||||
header("Location: ".PROJECT_PATH."/app/dialplans/dialplans.php?app_uuid=16589224-c876-aeb3-f59f-523a1c0801f7");
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
@@ -430,4 +559,4 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
//show the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -102,6 +102,17 @@
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "follow_me_caller_id";
|
||||
|
||||
//default settings
|
||||
$y=0;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "ee68b6d6-a510-48c4-bb71-4e65fae8a5e5";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "follow_me";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "strategy";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "enterprise";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Options: simultaneous, enterprise ";
|
||||
$y++;
|
||||
|
||||
//schema details
|
||||
$y=0;
|
||||
$apps[$x]['db'][$y]['table']['name'] = "v_follow_me";
|
||||
|
||||
@@ -278,6 +278,14 @@
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Wallpaper Image JPEG 480x272 16-bit depth dithered";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "f7f352d2-a3f0-4ea3-b013-8856404b66a4";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_dial_plan";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '{\+x+|x+|*x+|*++|\p\a\r\k\+*x+|\f\l\o\w\+*x+}';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Define the digits that are allowed to be called.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a004dee4-4621-4c6d-8c20-7f315f812d85";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_bluetooth_power";
|
||||
@@ -630,5 +638,13 @@
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable Blind Transfer to BLF Yes=1, No=0. Default=0";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "82b7076b-e596-49e8-b535-af86e21e0453";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_ip_address_mode";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "IP Address Mode. 0 - DHCP, 1 - Static IP, 2 - PPPoE. Default is 0";
|
||||
$y++;
|
||||
|
||||
?>
|
||||
|
||||
@@ -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-2019
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2020
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -175,7 +175,7 @@
|
||||
|
||||
//html image
|
||||
if (is_uuid($extension_uuid)) {
|
||||
echo "<img src=\"data:image/jpeg;base64,".base64_encode($image)."\" style='margin-top: 30px; max-width: 100%;'>\n";
|
||||
echo "<img src=\"data:image/jpeg;base64,".base64_encode($image)."\" style='margin-top: 30px; padding: 5px; background: white; max-width: 100%;'>\n";
|
||||
}
|
||||
|
||||
echo "</div>\n";
|
||||
@@ -183,4 +183,4 @@
|
||||
//add the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -36,27 +36,45 @@
|
||||
$apps[$x]['destinations'][$y]['name'] = "ivr_menus";
|
||||
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and ivr_menu_enabled = 'true' ";
|
||||
$apps[$x]['destinations'][$y]['order_by'] = "ivr_menu_extension asc";
|
||||
$apps[$x]['destinations'][$y]['field']['ivr_menu_uuid'] = "ivr_menu_uuid";
|
||||
$apps[$x]['destinations'][$y]['field']['name'] = "ivr_menu_name";
|
||||
$apps[$x]['destinations'][$y]['field']['destination'] = "ivr_menu_extension";
|
||||
$apps[$x]['destinations'][$y]['field']['extension'] = "ivr_menu_extension";
|
||||
$apps[$x]['destinations'][$y]['field']['context'] = "ivr_menu_context";
|
||||
$apps[$x]['destinations'][$y]['select_value']['dialplan'] = "transfer:\${destination} XML \${context}";
|
||||
$apps[$x]['destinations'][$y]['select_value']['ivr'] = "menu-exec-app:transfer \${destination} XML \${context}";
|
||||
$apps[$x]['destinations'][$y]['select_label'] = "\${destination} \${name}";
|
||||
//if ($_SESSION['ivr_menu']['application']['text'] != "lua") {
|
||||
// $y++;
|
||||
// $apps[$x]['destinations'][$y]['type'] = "sql";
|
||||
// $apps[$x]['destinations'][$y]['label'] = "ivr_menus_sub";
|
||||
// $apps[$x]['destinations'][$y]['name'] = "ivr_menus";
|
||||
// $apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and ivr_menu_enabled = 'true' ";
|
||||
// $apps[$x]['destinations'][$y]['order_by'] = "ivr_menu_extension asc";
|
||||
// $apps[$x]['destinations'][$y]['field']['name'] = "ivr_menu_name";
|
||||
// $apps[$x]['destinations'][$y]['field']['uuid'] = "ivr_menu_uuid";
|
||||
// //$apps[$x]['destinations'][$y]['select_value']['dialplan'] = "ivr:\${ivr_menu_uuid}";
|
||||
// $apps[$x]['destinations'][$y]['select_value']['ivr'] = "menu-sub:\${uuid}";
|
||||
// $apps[$x]['destinations'][$y]['select_label'] = "\${name}";
|
||||
//}
|
||||
//menu-top
|
||||
//menu-exit
|
||||
|
||||
$y++;
|
||||
$apps[$x]['destinations'][$y]['type'] = "sql";
|
||||
$apps[$x]['destinations'][$y]['label'] = "ivr_menus_sub";
|
||||
$apps[$x]['destinations'][$y]['name'] = "ivr_menus";
|
||||
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and ivr_menu_enabled = 'true' ";
|
||||
$apps[$x]['destinations'][$y]['order_by'] = "ivr_menu_extension asc";
|
||||
$apps[$x]['destinations'][$y]['field']['name'] = "ivr_menu_name";
|
||||
$apps[$x]['destinations'][$y]['field']['uuid'] = "ivr_menu_uuid";
|
||||
$apps[$x]['destinations'][$y]['select_value']['ivr'] = "menu-sub:\${uuid}";
|
||||
$apps[$x]['destinations'][$y]['select_label'] = "\${name}";
|
||||
|
||||
$y++;
|
||||
$apps[$x]['destinations'][$y]['type'] = 'array';
|
||||
$apps[$x]['destinations'][$y]['label'] = 'ivr_menus_other';
|
||||
$apps[$x]['destinations'][$y]['name'] = 'ivr_menus';
|
||||
$apps[$x]['destinations'][$y]['field']['name'] = 'name';
|
||||
$apps[$x]['destinations'][$y]['field']['destination'] = 'destination';
|
||||
$apps[$x]['destinations'][$y]['select_value']['ivr'] = "\${name}:";
|
||||
$apps[$x]['destinations'][$y]['select_label'] = "\${name}";
|
||||
$z=0;
|
||||
$apps[$x]['destinations'][$y]['result']['data'][$z]['label'] = 'top';
|
||||
$apps[$x]['destinations'][$y]['result']['data'][$z]['name'] = 'menu-top';
|
||||
$apps[$x]['destinations'][$y]['result']['data'][$z]['application'] = 'menu-top';
|
||||
$z++;
|
||||
$apps[$x]['destinations'][$y]['result']['data'][$z]['label'] = 'back';
|
||||
$apps[$x]['destinations'][$y]['result']['data'][$z]['label'] = 'back';
|
||||
$apps[$x]['destinations'][$y]['result']['data'][$z]['name'] = 'menu-back';
|
||||
$z++;
|
||||
$apps[$x]['destinations'][$y]['result']['data'][$z]['label'] = 'exit';
|
||||
$apps[$x]['destinations'][$y]['result']['data'][$z]['name'] = 'menu-exit';
|
||||
//menu-say-phrase
|
||||
//menu-play-sound
|
||||
|
||||
@@ -123,6 +141,46 @@
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "ac4ff01d-51a2-433f-9243-be9b6dd8ba9c";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "ivr_menu";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "direct_dial_digits";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "/^(\d{2,11})$/";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "1012fd92-acf9-4ce9-89da-f02d4cd0e794";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "ivr_menu";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "confirm_attempts";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "1";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "028bab4e-60e3-48d0-8892-4f678c8b72af";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "ivr_menu";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "inter_digit_timeout";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "2000";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Digit timeout in milliseconds";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "f5829fb7-8bd6-4c42-af16-565882fad7ca";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "ivr_menu";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "max_failures";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "1";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "46dc3c7b-8a8d-4957-b4bd-27708c933af9";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "ivr_menu";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "max_timeouts";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "1";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "26984efd-2445-4ac9-b459-bb7bda4217c6";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "limit";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "ivr_menus";
|
||||
@@ -187,6 +245,12 @@
|
||||
$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'] = "ivr_menu_parent_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "ivr_menu_language";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
|
||||
@@ -106,6 +106,90 @@ $text['title-ivr_menus_sub']['ru-ru'] = "Суб-опции Голосового
|
||||
$text['title-ivr_menus_sub']['sv-se'] = "IVR Menyer - Sub";
|
||||
$text['title-ivr_menus_sub']['uk-ua'] = "";
|
||||
|
||||
$text['title-ivr_menus_other']['en-us'] = "IVR Menus - Other";
|
||||
$text['title-ivr_menus_other']['en-gb'] = "IVR Menus - Other";
|
||||
$text['title-ivr_menus_other']['ar-eg'] = "";
|
||||
$text['title-ivr_menus_other']['de-at'] = "Automatische Vermittlungen - Other"; //copied from de-de
|
||||
$text['title-ivr_menus_other']['de-ch'] = "Automatische Vermittlungen - Other"; //copied from de-de
|
||||
$text['title-ivr_menus_other']['de-de'] = "Automatische Vermittlungen - Other";
|
||||
$text['title-ivr_menus_other']['es-cl'] = "Menus IVR - Other";
|
||||
$text['title-ivr_menus_other']['es-mx'] = "Menus IVR - Other"; //copied from es-cl
|
||||
$text['title-ivr_menus_other']['fr-ca'] = "Menus SVI - Other"; //copied from fr-fr
|
||||
$text['title-ivr_menus_other']['fr-fr'] = "Menus SVI - Other";
|
||||
$text['title-ivr_menus_other']['he-il'] = "";
|
||||
$text['title-ivr_menus_other']['it-it'] = "Menu IVR - Other";
|
||||
$text['title-ivr_menus_other']['nl-nl'] = "IVR Sub - menu";
|
||||
$text['title-ivr_menus_other']['pl-pl'] = "Menu zapowiedzi głosowych (IVR) - Other";
|
||||
$text['title-ivr_menus_other']['pt-br'] = "Menus de IVR - Other"; //copied from pt-pt
|
||||
$text['title-ivr_menus_other']['pt-pt'] = "Menus de IVR - Other";
|
||||
$text['title-ivr_menus_other']['ro-ro'] = "";
|
||||
$text['title-ivr_menus_other']['ru-ru'] = "Суб-опции Голосового Меню (IVR)";
|
||||
$text['title-ivr_menus_other']['sv-se'] = "IVR Menyer - Other";
|
||||
$text['title-ivr_menus_other']['uk-ua'] = "";
|
||||
|
||||
$text['option-exit']['en-us'] = "Exit";
|
||||
$text['option-exit']['en-gb'] = "";
|
||||
$text['option-exit']['ar-eg'] = "";
|
||||
$text['option-exit']['de-at'] = ""; //copied from de-de
|
||||
$text['option-exit']['de-ch'] = ""; //copied from de-de
|
||||
$text['option-exit']['de-de'] = "";
|
||||
$text['option-exit']['es-cl'] = "";
|
||||
$text['option-exit']['es-mx'] = ""; //copied from es-cl
|
||||
$text['option-exit']['fr-ca'] = ""; //copied from fr-fr
|
||||
$text['option-exit']['fr-fr'] = "";
|
||||
$text['option-exit']['he-il'] = "";
|
||||
$text['option-exit']['it-it'] = "";
|
||||
$text['option-exit']['nl-nl'] = "";
|
||||
$text['option-exit']['pl-pl'] = "";
|
||||
$text['option-exit']['pt-br'] = ""; //copied from pt-pt
|
||||
$text['option-exit']['pt-pt'] = "";
|
||||
$text['option-exit']['ro-ro'] = "";
|
||||
$text['option-exit']['ru-ru'] = "";
|
||||
$text['option-exit']['sv-se'] = "";
|
||||
$text['option-exit']['uk-ua'] = "";
|
||||
|
||||
$text['option-top']['en-us'] = "Top";
|
||||
$text['option-top']['en-gb'] = "";
|
||||
$text['option-top']['ar-eg'] = "";
|
||||
$text['option-top']['de-at'] = ""; //copied from de-de
|
||||
$text['option-top']['de-ch'] = ""; //copied from de-de
|
||||
$text['option-top']['de-de'] = "";
|
||||
$text['option-top']['es-cl'] = "";
|
||||
$text['option-top']['es-mx'] = ""; //copied from es-cl
|
||||
$text['option-top']['fr-ca'] = ""; //copied from fr-fr
|
||||
$text['option-top']['fr-fr'] = "";
|
||||
$text['option-top']['he-il'] = "";
|
||||
$text['option-top']['it-it'] = "";
|
||||
$text['option-top']['nl-nl'] = "";
|
||||
$text['option-top']['pl-pl'] = "";
|
||||
$text['option-top']['pt-br'] = ""; //copied from pt-pt
|
||||
$text['option-top']['pt-pt'] = "";
|
||||
$text['option-top']['ro-ro'] = "";
|
||||
$text['option-top']['ru-ru'] = "";
|
||||
$text['option-top']['sv-se'] = "";
|
||||
$text['option-top']['uk-ua'] = "";
|
||||
|
||||
$text['option-back']['en-us'] = "Back";
|
||||
$text['option-back']['en-gb'] = "Back";
|
||||
$text['option-back']['ar-eg'] = "";
|
||||
$text['option-back']['de-at'] = ""; //copied from de-de
|
||||
$text['option-back']['de-ch'] = ""; //copied from de-de
|
||||
$text['option-back']['de-de'] = "";
|
||||
$text['option-back']['es-cl'] = "";
|
||||
$text['option-back']['es-mx'] = ""; //copied from es-cl
|
||||
$text['option-back']['fr-ca'] = ""; //copied from fr-fr
|
||||
$text['option-back']['fr-fr'] = "";
|
||||
$text['option-back']['he-il'] = "";
|
||||
$text['option-back']['it-it'] = "";
|
||||
$text['option-back']['nl-nl'] = "";
|
||||
$text['option-back']['pl-pl'] = "";
|
||||
$text['option-back']['pt-br'] = ""; //copied from pt-pt
|
||||
$text['option-back']['pt-pt'] = "";
|
||||
$text['option-back']['ro-ro'] = "";
|
||||
$text['option-back']['ru-ru'] = "";
|
||||
$text['option-back']['sv-se'] = "";
|
||||
$text['option-back']['uk-ua'] = "";
|
||||
|
||||
$text['message-maximum_ivr_menus']['en-us'] = "Maximum IVR Menus:";
|
||||
$text['message-maximum_ivr_menus']['en-gb'] = "Maximum IVR Menus:";
|
||||
$text['message-maximum_ivr_menus']['ar-eg'] = "";
|
||||
@@ -421,6 +505,27 @@ $text['label-extension']['ru-ru'] = "Внутренний Номер";
|
||||
$text['label-extension']['sv-se'] = "Anknytning";
|
||||
$text['label-extension']['uk-ua'] = "";
|
||||
|
||||
$text['label-ivr_menu_parent_uuid']['en-us'] = "Parent Menu";
|
||||
$text['label-ivr_menu_parent_uuid']['en-gb'] = "Parent Menu";
|
||||
$text['label-ivr_menu_parent_uuid']['ar-eg'] = "";
|
||||
$text['label-ivr_menu_parent_uuid']['de-at'] = "Übergeordnetes Menü"; //copied from de-de
|
||||
$text['label-ivr_menu_parent_uuid']['de-ch'] = "Übergeordnetes Menü"; //copied from de-de
|
||||
$text['label-ivr_menu_parent_uuid']['de-de'] = "Übergeordnetes Menü";
|
||||
$text['label-ivr_menu_parent_uuid']['es-cl'] = "Nivel Superior";
|
||||
$text['label-ivr_menu_parent_uuid']['es-mx'] = "Nivel Superior"; //copied from es-cl
|
||||
$text['label-ivr_menu_parent_uuid']['fr-ca'] = "Menu Parent"; //copied from fr-fr
|
||||
$text['label-ivr_menu_parent_uuid']['fr-fr'] = "Menu Parent";
|
||||
$text['label-ivr_menu_parent_uuid']['he-il'] = "";
|
||||
$text['label-ivr_menu_parent_uuid']['it-it'] = "Menu Padre";
|
||||
$text['label-ivr_menu_parent_uuid']['nl-nl'] = "";
|
||||
$text['label-ivr_menu_parent_uuid']['pl-pl'] = "Główne menu";
|
||||
$text['label-ivr_menu_parent_uuid']['pt-br'] = "Menu Pai";
|
||||
$text['label-ivr_menu_parent_uuid']['pt-pt'] = "Menu Pai";
|
||||
$text['label-ivr_menu_parent_uuid']['ro-ro'] = "";
|
||||
$text['label-ivr_menu_parent_uuid']['ru-ru'] = "Родительское меню";
|
||||
$text['label-ivr_menu_parent_uuid']['sv-se'] = "Överordnad Meny";
|
||||
$text['label-ivr_menu_parent_uuid']['uk-ua'] = "Батьківське меню";
|
||||
|
||||
$text['label-exit_sound']['en-us'] = "Exit Sound";
|
||||
$text['label-exit_sound']['en-gb'] = "Exit Sound";
|
||||
$text['label-exit_sound']['ar-eg'] = "";
|
||||
|
||||
@@ -154,9 +154,6 @@
|
||||
$p->delete("dialplan_add", "temp");
|
||||
$p->delete("dialplan_edit", "temp");
|
||||
|
||||
//synchronize the xml config
|
||||
save_dialplan_xml();
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
@@ -167,6 +164,5 @@
|
||||
|
||||
//redirect the user
|
||||
header("Location: ivr_menus.php");
|
||||
exit;
|
||||
|
||||
?>
|
||||
|
||||
@@ -105,6 +105,7 @@
|
||||
//get ivr menu
|
||||
$ivr_menu_name = $_POST["ivr_menu_name"];
|
||||
$ivr_menu_extension = $_POST["ivr_menu_extension"];
|
||||
$ivr_menu_parent_uuid = $_POST["ivr_menu_parent_uuid"];
|
||||
$ivr_menu_greet_long = $_POST["ivr_menu_greet_long"];
|
||||
$ivr_menu_greet_short = $_POST["ivr_menu_greet_short"];
|
||||
$ivr_menu_language = $_POST["ivr_menu_language"];
|
||||
@@ -253,6 +254,7 @@
|
||||
$array['ivr_menus'][0]["dialplan_uuid"] = $dialplan_uuid;
|
||||
$array['ivr_menus'][0]["ivr_menu_name"] = $ivr_menu_name;
|
||||
$array['ivr_menus'][0]["ivr_menu_extension"] = $ivr_menu_extension;
|
||||
$array['ivr_menus'][0]["ivr_menu_parent_uuid"] = $ivr_menu_parent_uuid;
|
||||
$array['ivr_menus'][0]["ivr_menu_language"] = $ivr_menu_language;
|
||||
$array['ivr_menus'][0]["ivr_menu_greet_long"] = $ivr_menu_greet_long;
|
||||
$array['ivr_menus'][0]["ivr_menu_greet_short"] = $ivr_menu_greet_short;
|
||||
@@ -264,8 +266,13 @@
|
||||
$array['ivr_menus'][0]["ivr_menu_tts_voice"] = $ivr_menu_tts_voice;
|
||||
$array['ivr_menus'][0]["ivr_menu_confirm_attempts"] = $ivr_menu_confirm_attempts;
|
||||
$array['ivr_menus'][0]["ivr_menu_timeout"] = $ivr_menu_timeout;
|
||||
$array['ivr_menus'][0]["ivr_menu_exit_app"] = $ivr_menu_exit_app;
|
||||
$array['ivr_menus'][0]["ivr_menu_exit_data"] = $ivr_menu_exit_data;
|
||||
if ($destination->valid($ivr_menu_exit_app.":".$ivr_menu_exit_data)) {
|
||||
$array['ivr_menus'][0]["ivr_menu_exit_app"] = $ivr_menu_exit_app;
|
||||
$array['ivr_menus'][0]["ivr_menu_exit_data"] = $ivr_menu_exit_data;
|
||||
}
|
||||
else {
|
||||
$ivr_menu_exit_app = "";
|
||||
}
|
||||
$array['ivr_menus'][0]["ivr_menu_inter_digit_timeout"] = $ivr_menu_inter_digit_timeout;
|
||||
$array['ivr_menus'][0]["ivr_menu_max_failures"] = $ivr_menu_max_failures;
|
||||
$array['ivr_menus'][0]["ivr_menu_max_timeouts"] = $ivr_menu_max_timeouts;
|
||||
@@ -301,7 +308,7 @@
|
||||
$array['ivr_menus'][0]['ivr_menu_options'][$y]["ivr_menu_option_uuid"] = $ivr_menu_option_uuid;
|
||||
$array['ivr_menus'][0]['ivr_menu_options'][$y]["ivr_menu_option_digits"] = $row["ivr_menu_option_digits"];
|
||||
$array['ivr_menus'][0]['ivr_menu_options'][$y]["ivr_menu_option_action"] = $ivr_menu_option_action;
|
||||
if ($destination->valid(preg_replace('/\s/', ':', $ivr_menu_option_param, 1))) {
|
||||
if ($destination->valid($ivr_menu_option_action.":".$ivr_menu_option_param, 'ivr')) {
|
||||
$array['ivr_menus'][0]['ivr_menu_options'][$y]["ivr_menu_option_param"] = $ivr_menu_option_param;
|
||||
}
|
||||
$array['ivr_menus'][0]['ivr_menu_options'][$y]["ivr_menu_option_order"] = $row["ivr_menu_option_order"];
|
||||
@@ -336,7 +343,9 @@
|
||||
$dialplan_xml .= " <action application=\"ivr\" data=\"".$ivr_menu_uuid."\"/>\n";
|
||||
}
|
||||
|
||||
$dialplan_xml .= " <action application=\"".$ivr_menu_exit_app."\" data=\"".$ivr_menu_exit_data."\"/>\n";
|
||||
if (strlen($ivr_menu_exit_app) > 0) {
|
||||
$dialplan_xml .= " <action application=\"".$ivr_menu_exit_app."\" data=\"".$ivr_menu_exit_data."\"/>\n";
|
||||
}
|
||||
$dialplan_xml .= " </condition>\n";
|
||||
$dialplan_xml .= "</extension>\n";
|
||||
|
||||
@@ -391,7 +400,25 @@
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
$cache->delete("configuration:ivr.conf:".$ivr_menu_uuid);
|
||||
|
||||
//get all ivr parent menus
|
||||
$sql = "with recursive ivr_menus as ( ";
|
||||
$sql .=" select ivr_menu_parent_uuid ";
|
||||
$sql .=" from v_ivr_menus ";
|
||||
$sql .=" where ivr_menu_parent_uuid = :ivr_menu_parent_uuid ";
|
||||
$sql .=" and ivr_menu_enabled = 'true' ";
|
||||
$sql .=" union all ";
|
||||
$sql .=" select parent.ivr_menu_parent_uuid ";
|
||||
$sql .=" from v_ivr_menus as parent, ivr_menus as child ";
|
||||
$sql .=" where parent.ivr_menu_uuid = child.ivr_menu_parent_uuid ";
|
||||
$sql .=" and parent.ivr_menu_enabled = 'true' ";
|
||||
$sql .=" ) ";
|
||||
$sql .=" select * from ivr_menus ";
|
||||
$parameters['ivr_menu_parent_uuid'] = $ivr_menu_parent_uuid;
|
||||
$database = new database;
|
||||
$parent_uuids = $database->select($sql, $parameters, "all");
|
||||
foreach ($parent_uuids as $x => $row) {
|
||||
$cache->delete("configuration:ivr.conf:".$row['ivr_menu_parent_uuid']);
|
||||
}
|
||||
//set the add message
|
||||
if ($action == "add" && permission_exists('ivr_menu_add')) {
|
||||
message::add($text['message-add']);
|
||||
@@ -421,6 +448,7 @@
|
||||
$dialplan_uuid = $row["dialplan_uuid"];
|
||||
$ivr_menu_name = $row["ivr_menu_name"];
|
||||
$ivr_menu_extension = $row["ivr_menu_extension"];
|
||||
$ivr_menu_parent_uuid = $row["ivr_menu_parent_uuid"];
|
||||
$ivr_menu_language = $row["ivr_menu_language"];
|
||||
$ivr_menu_dialect = $row["ivr_menu_dialect"];
|
||||
$ivr_menu_voice = $row["ivr_menu_voice"];
|
||||
@@ -469,6 +497,15 @@
|
||||
$ivr_menu_options = $database->select($sql, $parameters, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//get the ivr menus
|
||||
$sql = "select * from v_ivr_menus ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "order by v_ivr_menus asc ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$ivr_menus = $database->select($sql, $parameters, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//add an empty row to the options array
|
||||
if (count($ivr_menu_options) == 0) {
|
||||
$rows = $_SESSION['ivr_menu']['option_add_rows']['numeric'];
|
||||
@@ -499,10 +536,38 @@
|
||||
if (strlen($ivr_menu_voice) == 0) { $ivr_menu_voice = 'callie'; }
|
||||
if (strlen($ivr_menu_tts_engine) == 0) { $ivr_menu_tts_engine = 'flite'; }
|
||||
if (strlen($ivr_menu_tts_voice) == 0) { $ivr_menu_tts_voice = 'rms'; }
|
||||
if (strlen($ivr_menu_confirm_attempts) == 0) { $ivr_menu_confirm_attempts = '1'; }
|
||||
if (strlen($ivr_menu_inter_digit_timeout) == 0) { $ivr_menu_inter_digit_timeout = '2000'; }
|
||||
if (strlen($ivr_menu_max_failures) == 0) { $ivr_menu_max_failures = '1'; }
|
||||
if (strlen($ivr_menu_max_timeouts) == 0) { $ivr_menu_max_timeouts = '1'; }
|
||||
if (strlen($ivr_menu_confirm_attempts) == 0) {
|
||||
if (strlen($_SESSION['ivr_menu']['confirm_attempts']['numeric']) > 0) {
|
||||
$ivr_menu_confirm_attempts = $_SESSION['ivr_menu']['confirm_attempts']['numeric'];
|
||||
}
|
||||
else {
|
||||
$ivr_menu_confirm_attempts = '1';
|
||||
}
|
||||
}
|
||||
if (strlen($ivr_menu_inter_digit_timeout) == 0) {
|
||||
if (strlen($_SESSION['ivr_menu']['inter_digit_timeout']['numeric']) > 0) {
|
||||
$ivr_menu_inter_digit_timeout = $_SESSION['ivr_menu']['inter_digit_timeout']['numeric'];
|
||||
}
|
||||
else {
|
||||
$ivr_menu_inter_digit_timeout = '2000';
|
||||
}
|
||||
}
|
||||
if (strlen($ivr_menu_max_failures) == 0) {
|
||||
if (strlen($_SESSION['ivr_menu']['max_failures']['numeric']) > 0) {
|
||||
$ivr_menu_max_failures = $_SESSION['ivr_menu']['max_failures']['numeric'];
|
||||
}
|
||||
else {
|
||||
$ivr_menu_max_failures = '1';
|
||||
}
|
||||
}
|
||||
if (strlen($ivr_menu_max_timeouts) == 0) {
|
||||
if (strlen($_SESSION['ivr_menu']['max_timeouts']['numeric']) > 0) {
|
||||
$ivr_menu_max_timeouts = $_SESSION['ivr_menu']['max_timeouts']['numeric'];
|
||||
}
|
||||
else {
|
||||
$ivr_menu_max_timeouts = '1';
|
||||
}
|
||||
}
|
||||
if (strlen($ivr_menu_digit_len) == 0) { $ivr_menu_digit_len = '5'; }
|
||||
if (strlen($ivr_menu_direct_dial) == 0) { $ivr_menu_direct_dial = 'false'; }
|
||||
if (!isset($ivr_menu_context)) { $ivr_menu_context = $_SESSION['domain_name']; }
|
||||
@@ -616,7 +681,26 @@
|
||||
echo $text['description-extension']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-ivr_menu_parent_uuid']."</td>";
|
||||
echo " <td class='vtable'>";
|
||||
echo "<select name=\"ivr_menu_parent_uuid\" class='formfld'>\n";
|
||||
echo "<option value=\"\"></option>\n";
|
||||
foreach($ivr_menus as $field) {
|
||||
if ($field['ivr_menu_uuid'] != $ivr_menu_uuid) {
|
||||
if ($ivr_menu_parent_uuid == $field['ivr_menu_uuid']) {
|
||||
echo "<option value='".escape($field['ivr_menu_uuid'])."' selected='selected'>".escape($field['ivr_menu_name'])."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo "<option value='".escape($field['ivr_menu_uuid'])."'>".escape($field['ivr_menu_name'])."</option>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "</select>";
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " ".$text['label-language']."\n";
|
||||
|
||||
@@ -161,9 +161,6 @@ if (!class_exists('ivr_menu')) {
|
||||
$p->delete('ivr_menu_option_delete', 'temp');
|
||||
$p->delete('dialplan_delete', 'temp');
|
||||
|
||||
//synchronize the xml config
|
||||
save_dialplan_xml();
|
||||
|
||||
//clear the cache
|
||||
if (is_array($ivr_menu_contexts) && @sizeof($ivr_menu_contexts) != 0) {
|
||||
$ivr_menu_contexts = array_unique($ivr_menu_contexts);
|
||||
@@ -325,9 +322,6 @@ if (!class_exists('ivr_menu')) {
|
||||
//revoke temporary permissions
|
||||
$p->delete('dialplan_edit', 'temp');
|
||||
|
||||
//synchronize the xml config
|
||||
save_dialplan_xml();
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
@@ -471,9 +465,6 @@ if (!class_exists('ivr_menu')) {
|
||||
$p->delete('ivr_menu_option_add', 'temp');
|
||||
$p->delete('dialplan_add', 'temp');
|
||||
|
||||
//synchronize the xml config
|
||||
save_dialplan_xml();
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
@@ -491,4 +482,4 @@ if (!class_exists('ivr_menu')) {
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -29,28 +29,28 @@
|
||||
global $domain_uuid;
|
||||
|
||||
//prepare for dialplan .xml files to be written. delete all dialplan files that are prefixed with dialplan_ and have a file extension of .xml
|
||||
if (count($_SESSION["domains"]) > 1) {
|
||||
$v_needle = 'v_'.$_SESSION['domain_name'].'_';
|
||||
}
|
||||
else {
|
||||
$v_needle = 'v_';
|
||||
}
|
||||
if($dh = opendir($_SESSION['switch']['conf']['dir']."/ivr_menus/")) {
|
||||
$files = Array();
|
||||
while($file = readdir($dh)) {
|
||||
if($file != "." && $file != ".." && $file[0] != '.') {
|
||||
if(is_dir($dir . "/" . $file)) {
|
||||
//this is a directory
|
||||
} else {
|
||||
if (strpos($file, $v_needle) !== false && substr($file,-4) == '.xml') {
|
||||
//echo "file: $file<br />\n";
|
||||
unlink($_SESSION['switch']['conf']['dir']."/ivr_menus/".$file);
|
||||
}
|
||||
if (count($_SESSION["domains"]) > 1) {
|
||||
$v_needle = 'v_'.$_SESSION['domain_name'].'_';
|
||||
}
|
||||
else {
|
||||
$v_needle = 'v_';
|
||||
}
|
||||
if($dh = opendir($_SESSION['switch']['conf']['dir']."/ivr_menus/")) {
|
||||
$files = Array();
|
||||
while($file = readdir($dh)) {
|
||||
if($file != "." && $file != ".." && $file[0] != '.') {
|
||||
if(is_dir($dir . "/" . $file)) {
|
||||
//this is a directory
|
||||
} else {
|
||||
if (strpos($file, $v_needle) !== false && substr($file,-4) == '.xml') {
|
||||
//echo "file: $file<br />\n";
|
||||
unlink($_SESSION['switch']['conf']['dir']."/ivr_menus/".$file);
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
}
|
||||
closedir($dh);
|
||||
}
|
||||
|
||||
$sql = "select * from v_ivr_menus ";
|
||||
$sql .= " where domain_uuid = :domain_uuid ";
|
||||
@@ -181,11 +181,9 @@
|
||||
}
|
||||
unset($result, $row);
|
||||
|
||||
save_dialplan_xml();
|
||||
|
||||
//apply settings
|
||||
$_SESSION["reload_xml"] = true;
|
||||
$_SESSION["reload_xml"] = true;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -148,6 +148,26 @@ $text['label-size']['ru-ru'] = "KB";
|
||||
$text['label-size']['sv-se'] = "KB";
|
||||
$text['label-size']['uk-ua'] = "КБ";
|
||||
|
||||
$text['label-log_file']['en-us'] = "Log file";
|
||||
$text['label-log_file']['ar-eg'] = "Log file";
|
||||
$text['label-log_file']['de-at'] = "Log file";
|
||||
$text['label-log_file']['de-ch'] = "log_file";
|
||||
$text['label-log_file']['de-de'] = "log_file";
|
||||
$text['label-log_file']['es-cl'] = "log_file";
|
||||
$text['label-log_file']['es-mx'] = "log_file";
|
||||
$text['label-log_file']['fr-ca'] = "Log file";
|
||||
$text['label-log_file']['fr-fr'] = "Log file";
|
||||
$text['label-log_file']['he-il'] = "Log file";
|
||||
$text['label-log_file']['it-it'] = "Log file";
|
||||
$text['label-log_file']['nl-nl'] = "Log file";
|
||||
$text['label-log_file']['pl-pl'] = "Log file";
|
||||
$text['label-log_file']['pt-br'] = "Log file";
|
||||
$text['label-log_file']['pt-pt'] = "Log file";
|
||||
$text['label-log_file']['ro-ro'] = "Log file";
|
||||
$text['label-log_file']['ru-ru'] = "Log file";
|
||||
$text['label-log_file']['sv-se'] = "Log file";
|
||||
$text['label-log_file']['uk-ua'] = "Log file";
|
||||
|
||||
$text['label-filter']['en-us'] = "Filter";
|
||||
$text['label-filter']['en-gb'] = "Filter";
|
||||
$text['label-filter']['ar-eg'] = "";
|
||||
@@ -274,4 +294,4 @@ $text['label-display']['ru-ru'] = "Display";
|
||||
$text['label-display']['sv-se'] = "Display";
|
||||
$text['label-display']['uk-ua'] = "Display";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -55,18 +55,19 @@
|
||||
//set a default filter
|
||||
if (!isset($_POST['filter'])) { $_POST['filter'] = ""; }
|
||||
|
||||
//set default default log file
|
||||
if (!isset($_POST['log_file']) || substr($_POST['log_file'],0,14) != "freeswitch.log") { $_POST['log_file'] = "freeswitch.log"; }
|
||||
|
||||
//download the log
|
||||
if (permission_exists('log_download')) {
|
||||
if (isset($_GET['a']) && $_GET['a'] == "download") {
|
||||
if (isset($_GET['t']) && $_GET['t'] == "logs") {
|
||||
$tmp = $_SESSION['switch']['log']['dir'].'/';
|
||||
$filename = 'freeswitch.log';
|
||||
}
|
||||
if (isset($_GET['n']) && substr($_GET['n'],0,14) == "freeswitch.log") {
|
||||
$dir = $_SESSION['switch']['log']['dir'];
|
||||
$filename = $_GET['n'];
|
||||
session_cache_limiter('public');
|
||||
$fd = fopen($tmp.$filename, "rb");
|
||||
$fd = fopen($dir."/".$filename, "rb");
|
||||
header("Content-Type: binary/octet-stream");
|
||||
header("Content-Length: " . filesize($tmp.$filename));
|
||||
header('Content-Disposition: attachment; filename="'.escape($filename).'"');
|
||||
header("Content-Length: " . filesize($tmp."/".$filename));
|
||||
header('Content-Disposition: attachment; filename="'.$filename.'"');
|
||||
fpassthru($fd);
|
||||
exit;
|
||||
}
|
||||
@@ -81,13 +82,20 @@
|
||||
echo " <div class='heading'><b>".$text['title-log_viewer']."</b></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
echo "<form name='frm' id='frm' class='inline' method='post'>\n";
|
||||
echo " ".$text['label-log_file']." <select name='log_file' class='formfld' style='width: 150px; margin-right: 20px;'>";
|
||||
$files = scandir($_SESSION['switch']['log']['dir']);
|
||||
foreach($files as $file) if (substr($file,0,14) == "freeswitch.log") {
|
||||
$selected = ($file == $_POST['log_file']) ? "selected='selected'" : "";
|
||||
echo " <option value='".$file."'".$selected.">".$file."</option>";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo $text['label-filter']." <input type='text' name='filter' class='formfld' style='width: 150px; text-align: center; margin-right: 20px;' value=\"".escape($_POST['filter'])."\" onclick='this.select();'>";
|
||||
echo "<label style='margin-right: 20px; margin-top: 4px;'><input type='checkbox' name='line_number' id='line_number' value='1' ".($_POST['line_number'] == 1 ? 'checked' : null)."> ".$text['label-line_number']."</label>";
|
||||
echo "<label style='margin-right: 20px; margin-top: 4px;'><input type='checkbox' name='sort' id='sort' value='desc' ".($_POST['sort'] == 'desc' ? 'checked' : null)."> ".$text['label-sort']."</label>";
|
||||
echo $text['label-display']." <input type='text' class='formfld' style='width: 50px; text-align: center;' name='size' value=\"".escape($_POST['size'])."\" onclick='this.select();'> ".$text['label-size'];
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-update'],'icon'=>$_SESSION['theme']['button_icon_save'],'style'=>'margin-left: 15px;','name'=>'submit']);
|
||||
if (permission_exists('log_download')) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-download'],'icon'=>$_SESSION['theme']['button_icon_download'],'style'=>'margin-left: 15px;','link'=>'log_viewer.php?a=download&t=logs']);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-download'],'icon'=>$_SESSION['theme']['button_icon_download'],'style'=>'margin-left: 15px;','link'=>'log_viewer.php?a=download&n='.$_POST['log_file']]);
|
||||
}
|
||||
echo "</form>\n";
|
||||
echo " </div>\n";
|
||||
@@ -107,7 +115,9 @@
|
||||
$default_type = 'normal';
|
||||
$default_font = 'monospace';
|
||||
$default_file_size = '512000';
|
||||
$log_file = $_SESSION['switch']['log']['dir']."/freeswitch.log";
|
||||
if (substr($_POST['log_file'],0,14) == "freeswitch.log") {
|
||||
$log_file = $_SESSION['switch']['log']['dir']."/".$_POST['log_file'];
|
||||
}
|
||||
|
||||
//put the color matches here...
|
||||
$array_filter[0]['pattern'] = '[NOTICE]';
|
||||
@@ -286,4 +296,4 @@
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -83,11 +83,11 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "primary";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "moderator_pin";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the moderator PIN number.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "participant_pin";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the participant PIN number.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "enabled";
|
||||
|
||||
@@ -326,7 +326,7 @@ $text['label-shuffle']['es-cl'] = "Barajar";
|
||||
$text['label-shuffle']['es-mx'] = "Barajar"; //copied from es-cl
|
||||
$text['label-shuffle']['fr-ca'] = "battage"; //copied from fr-fr
|
||||
$text['label-shuffle']['fr-fr'] = "battage";
|
||||
$text['label-shuffle']['he-il'] = "לְעַרְבֵּב";
|
||||
$text['label-shuffle']['he-il'] = "לְעַרְבֵּב";
|
||||
$text['label-shuffle']['it-it'] = "Mischia";
|
||||
$text['label-shuffle']['nl-nl'] = "Wisselen";
|
||||
$text['label-shuffle']['pl-pl'] = "Człapać";
|
||||
@@ -820,26 +820,26 @@ $text['header-music_on_hold_settings']['ru-ru'] = "Музыка на удерж
|
||||
$text['header-music_on_hold_settings']['sv-se'] = "Väntmusik inställningar";
|
||||
$text['header-music_on_hold_settings']['uk-ua'] = "Музика на утриманні настройки";
|
||||
|
||||
$text['title_description-music_on_hold']['en-us'] = "Music on hold can be in WAV or MP3 format. To play an MP3 file you must have mod_shout enabled on the 'Modules' tab. You can adjust the volume of the MP3 audio from the 'Settings' tab. For best performance upload 16 bit, 8/16/32/48 kHz <i>mono</i> WAV files.";
|
||||
$text['title_description-music_on_hold']['en-gb'] = "Music on hold can be in WAV or MP3 format. To play an MP3 file you must have mod_shout enabled on the 'Modules' tab. You can adjust the volume of the MP3 audio from the 'Settings' tab. For best performance upload 16 bit, 8/16/32/48 kHz <i>mono</i> WAV files.";
|
||||
$text['title_description-music_on_hold']['en-us'] = "Music on hold can be in WAV or MP3 format. For best performance upload 16 bit, 8/16/32/48 kHz <i>mono</i> WAV files.";
|
||||
$text['title_description-music_on_hold']['en-gb'] = "Music on hold can be in WAV or MP3 format. For best performance upload 16 bit, 8/16/32/48 kHz <i>mono</i> WAV files.";
|
||||
$text['title_description-music_on_hold']['ar-eg'] = "";
|
||||
$text['title_description-music_on_hold']['de-at'] = "Haltemusik können Dateien im WAV oder MP3 Format sein. Um MP3 Dateien abzuspielen zu können, muss mod_shout installiert und aktiviert sein. Sie können die Lautstärke der MP3 Dateien in den Einstellungen verändern. Für beste Funktionalität laden Sie 16bit, 8/16/32/48 kHz mono WAV Dateien hoch."; //copied from de-de
|
||||
$text['title_description-music_on_hold']['de-ch'] = "Haltemusik können Dateien im WAV oder MP3 Format sein. Um MP3 Dateien abzuspielen zu können, muss mod_shout installiert und aktiviert sein. Sie können die Lautstärke der MP3 Dateien in den Einstellungen verändern. Für beste Funktionalität laden Sie 16bit, 8/16/32/48 kHz mono WAV Dateien hoch."; //copied from de-de
|
||||
$text['title_description-music_on_hold']['de-de'] = "Haltemusik können Dateien im WAV oder MP3 Format sein. Um MP3 Dateien abzuspielen zu können, muss mod_shout installiert und aktiviert sein. Sie können die Lautstärke der MP3 Dateien in den Einstellungen verändern. Für beste Funktionalität laden Sie 16bit, 8/16/32/48 kHz mono WAV Dateien hoch.";
|
||||
$text['title_description-music_on_hold']['es-cl'] = "La música en espera puede estar en formato WAV o MP3. Para reproducir un archivo en frmato MP3 debe tener activado el módulo mod_shout. Puede ajustar el volumen del MP3 desde la pestaña 'Configuraciones'. Para el mejor rendimiento se recomienda utilizar archivos en formato WAV 16 bit, 8/16/32/48 kHz <i>mono</i>.";
|
||||
$text['title_description-music_on_hold']['es-mx'] = "La música en espera puede estar en formato WAV o MP3. Para reproducir un archivo en frmato MP3 debe tener activado el módulo mod_shout. Puede ajustar el volumen del MP3 desde la pestaña 'Configuraciones'. Para el mejor rendimiento se recomienda utilizar archivos en formato WAV 16 bit, 8/16/32/48 kHz <i>mono</i>."; //copied from es-cl
|
||||
$text['title_description-music_on_hold']['fr-ca'] = "La Musique d'attente peut être en WAV ou en MP3. Pour le MP3, mod_shout doit être activé dans la section modules. Le volume peut être réglé dans la partie configuration. Pour de meilleures performances, utiliser des fichiers WAV 16 bit, 8/16/32/48 kHz <i>mono</i>."; //copied from fr-fr
|
||||
$text['title_description-music_on_hold']['fr-fr'] = "La Musique d'attente peut être en WAV ou en MP3. Pour le MP3, mod_shout doit être activé dans la section modules. Le volume peut être réglé dans la partie configuration. Pour de meilleures performances, utiliser des fichiers WAV 16 bit, 8/16/32/48 kHz <i>mono</i>.";
|
||||
$text['title_description-music_on_hold']['de-at'] = "Haltemusik können Dateien im WAV oder MP3 Format sein. Für beste Funktionalität laden Sie 16bit, 8/16/32/48 kHz mono WAV Dateien hoch."; //copied from de-de
|
||||
$text['title_description-music_on_hold']['de-ch'] = "Haltemusik können Dateien im WAV oder MP3 Format sein. Für beste Funktionalität laden Sie 16bit, 8/16/32/48 kHz mono WAV Dateien hoch."; //copied from de-de
|
||||
$text['title_description-music_on_hold']['de-de'] = "Haltemusik können Dateien im WAV oder MP3 Format sein. Für beste Funktionalität laden Sie 16bit, 8/16/32/48 kHz mono WAV Dateien hoch.";
|
||||
$text['title_description-music_on_hold']['es-cl'] = "La música en espera puede estar en formato WAV o MP3. Para el mejor rendimiento se recomienda utilizar archivos en formato WAV 16 bit, 8/16/32/48 kHz <i>mono</i>.";
|
||||
$text['title_description-music_on_hold']['es-mx'] = "La música en espera puede estar en formato WAV o MP3. Para el mejor rendimiento se recomienda utilizar archivos en formato WAV 16 bit, 8/16/32/48 kHz <i>mono</i>."; //copied from es-cl
|
||||
$text['title_description-music_on_hold']['fr-ca'] = "La Musique d'attente peut être en WAV ou en MP3. Le volume peut être réglé dans la partie configuration. Pour de meilleures performances, utiliser des fichiers WAV 16 bit, 8/16/32/48 kHz <i>mono</i>."; //copied from fr-fr
|
||||
$text['title_description-music_on_hold']['fr-fr'] = "La Musique d'attente peut être en WAV ou en MP3. Pour de meilleures performances, utiliser des fichiers WAV 16 bit, 8/16/32/48 kHz <i>mono</i>.";
|
||||
$text['title_description-music_on_hold']['he-il'] = "";
|
||||
$text['title_description-music_on_hold']['it-it'] = "La musica di attesa può essere in formato WAV o MP3. Per suonare i file MP3 è necessario avere mod_shout abilitato nella sezione 'Moduli'. Si può regolare il volume dei file MP3 dalla sezione Parametri. Per una migliore qualità caricare file 16 bit, 8/16/32/48 kHz <i>mono</i> WAV files.";
|
||||
$text['title_description-music_on_hold']['nl-nl'] = "Wachtmuziek mag in WAV of MP3 formaat zijn. Om een MP3 bestand te spelen moet mod_shout aan staan bij de Modulen tab. Het volume van de MP3 audio kan op de instellingen tab ingevoerd worden. Voor de beste prestaties gebruik 16 bit, 8/16/32/48 kHz <i>mono</i> WAV files.";
|
||||
$text['title_description-music_on_hold']['pl-pl'] = "Muzyka na czekanie może być w formacie wav lub mp3. Aby odtwarzać mp3 konieczne jest zainstalowanie modułu mod_shout (można to zrobić w zakładce Moduły). Można także zmienić głośność formatu mp3 w zakładce Ustawienia. W celu osiągniecia najlepszej jakości prześlij pliki w formacie wav o następującej specyfikacji: 16 bit, 8/16/32/48 kHz mono.";
|
||||
$text['title_description-music_on_hold']['pt-br'] = "Música em espera pode ser com base em arquivos com o formato WAV ou MP3. Para ouvir um ficheiro MP3 deverá ter o mod_shout activado na tab 'Módulos'. Pode ajustar o volume do áudio MP3 a partir da tab 'Definições'. Para um melhor desempenho carregue ficheiros WAV de 16 bit, 8/16/32/48 kHz mono.";
|
||||
$text['title_description-music_on_hold']['pt-pt'] = "Música em espera pode ser com base em ficheiros com o formato WAV ou MP3. Para ouvir um ficheiro MP3 deverá ter o mod_shout activado na tab 'Módulos'. Pode ajustar o volume do áudio MP3 a partir da tab 'Definições'. Para um melhor desempenho carregue ficheiros WAV de 16 bit, 8/16/32/48 kHz <i>mono</i>.";
|
||||
$text['title_description-music_on_hold']['it-it'] = "La musica di attesa può essere in formato WAV o MP3. Per una migliore qualità caricare file 16 bit, 8/16/32/48 kHz <i>mono</i> WAV files.";
|
||||
$text['title_description-music_on_hold']['nl-nl'] = "Wachtmuziek mag in WAV of MP3 formaat zijn. Voor de beste prestaties gebruik 16 bit, 8/16/32/48 kHz <i>mono</i> WAV files.";
|
||||
$text['title_description-music_on_hold']['pl-pl'] = "Muzyka na czekanie może być w formacie wav lub mp3. W celu osiągniecia najlepszej jakości prześlij pliki w formacie wav o następującej specyfikacji: 16 bit, 8/16/32/48 kHz mono.";
|
||||
$text['title_description-music_on_hold']['pt-br'] = "Música em espera pode ser com base em arquivos com o formato WAV ou MP3. Pode ajustar o volume do áudio MP3 a partir da tab 'Definições'. Para um melhor desempenho carregue ficheiros WAV de 16 bit, 8/16/32/48 kHz mono.";
|
||||
$text['title_description-music_on_hold']['pt-pt'] = "Música em espera pode ser com base em ficheiros com o formato WAV ou MP3. Para um melhor desempenho carregue ficheiros WAV de 16 bit, 8/16/32/48 kHz <i>mono</i>.";
|
||||
$text['title_description-music_on_hold']['ro-ro'] = "";
|
||||
$text['title_description-music_on_hold']['ru-ru'] = "Музыка на удержании может быть в формате WAV или MP3. Чтобы воспроизвести файл MP3, на вкладке «Модули» необходимо включить mod_shout. Вы можете отрегулировать громкость звука MP3 на вкладке «Настройки». Для лучшей производительности загружайте 16-битные, 8/16/32/48 кГц <i> моно </ i> файлы WAV.";
|
||||
$text['title_description-music_on_hold']['sv-se'] = "Väntmusik kan vara i formaten WAV eller MP3. För att spela upp en MP3 fil så måste 'mod_shout' vara aktiverat i 'moduler' fliken. Du kan justera volymen på MP3 filerna genom inställnings fliken. För bästa prestanda, ladda upp 16 bit, 8/16/32/48 kHz mono WAV filer.";
|
||||
$text['title_description-music_on_hold']['uk-ua'] = "Музика на утриманні може бути в WAV або MP3 формат. Для відтворення файлів MP3 ви повинні включити mod_shout на вкладці 'модулі'. Ви можете налаштувати гучність MP3-аудіо на вкладці «Налаштування». Для кращої продуктивності завантаження 16 біт, моно 8/16/32/48 кГц WAV файлів.";
|
||||
$text['title_description-music_on_hold']['ru-ru'] = "Музыка на удержании может быть в формате WAV или MP3. Для лучшей производительности загружайте 16-битные, 8/16/32/48 кГц <i> моно </ i> файлы WAV.";
|
||||
$text['title_description-music_on_hold']['sv-se'] = "Väntmusik kan vara i formaten WAV eller MP3. För bästa prestanda, ladda upp 16 bit, 8/16/32/48 kHz mono WAV filer.";
|
||||
$text['title_description-music_on_hold']['uk-ua'] = "Музика на утриманні може бути в WAV або MP3 формат. Для кращої продуктивності завантаження 16 біт, моно 8/16/32/48 кГц WAV файлів.";
|
||||
|
||||
$text['button-upload']['en-us'] = "Upload";
|
||||
$text['button-upload']['en-gb'] = "Upload";
|
||||
|
||||
@@ -48,12 +48,12 @@ if (!class_exists('switch_music_on_hold')) {
|
||||
public function __construct() {
|
||||
|
||||
//assign private variables
|
||||
$this->app_name = 'music_on_hold';
|
||||
$this->app_uuid = '1dafe0f8-c08a-289b-0312-15baf4f20f81';
|
||||
$this->permission_prefix = 'music_on_hold_';
|
||||
$this->list_page = 'music_on_hold.php';
|
||||
$this->table = 'music_on_hold';
|
||||
$this->uuid_prefix = 'music_on_hold_';
|
||||
$this->app_name = 'music_on_hold';
|
||||
$this->app_uuid = '1dafe0f8-c08a-289b-0312-15baf4f20f81';
|
||||
$this->permission_prefix = 'music_on_hold_';
|
||||
$this->list_page = 'music_on_hold.php';
|
||||
$this->table = 'music_on_hold';
|
||||
$this->uuid_prefix = 'music_on_hold_';
|
||||
|
||||
}
|
||||
|
||||
@@ -238,6 +238,92 @@ if (!class_exists('switch_music_on_hold')) {
|
||||
$this->reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* read the music files to add the music on hold into the database
|
||||
*/
|
||||
public function import() {
|
||||
//get the domains
|
||||
$sql = "select * from v_domains ";
|
||||
$database = new database;
|
||||
$domains = $database->select($sql, null, 'all');
|
||||
unset($sql);
|
||||
|
||||
//get the music_on_hold array
|
||||
$sql = "select * from v_music_on_hold ";
|
||||
$sql .= "order by domain_uuid desc, music_on_hold_name asc, music_on_hold_rate asc";
|
||||
$database = new database;
|
||||
$music_on_hold = $database->select($sql, null, 'all');
|
||||
unset($sql);
|
||||
|
||||
//build an array of the sound files
|
||||
$music_directory = $_SESSION['switch']['sounds']['dir'].'/music';
|
||||
if (file_exists($music_directory)) {
|
||||
$files = array_merge(glob($music_directory.'/*/*/*.wav'), glob($music_directory.'/*/*/*/*.wav'), glob($stream_path.'/*/*/*/*.mp3'), glob($stream_path.'/*/*/*/*.ogg'));
|
||||
}
|
||||
|
||||
//build a new file array
|
||||
foreach($files as $file) {
|
||||
$path = substr($file, strlen($music_directory.'/'));
|
||||
$path = str_replace("\\", "/", $path);
|
||||
$path_array = explode("/", $path);
|
||||
$file_array[$path_array[0]][$path_array[1]][$path_array[2]] = dirname($file);
|
||||
//echo "domain_name ".$path_array[0]."<br />\n";
|
||||
//echo "category_name ".$path_array[1]."<br />\n";
|
||||
}
|
||||
//view_array($file_array);
|
||||
|
||||
//prepare the data
|
||||
$i = 0;
|
||||
foreach($file_array as $domain_name => $a1) {
|
||||
foreach($a1 as $category_name => $a2) {
|
||||
foreach($a2 as $sample_rate => $file_path) {
|
||||
//echo "domain_name ".$domain_name."<br />\n";
|
||||
//echo "category_name ".$category_name."<br />\n";
|
||||
foreach($domains as $domain) {
|
||||
//view_array($field, false);
|
||||
if ($field['domain_name'] === $domain_name) {
|
||||
$domain_uuid = $domain['domain_uuid'];
|
||||
//echo "domain_uuid ".$domain_uuid."<br />\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ($domain_name == 'global' || $domain_name == 'default') {
|
||||
$domain_uuid = null;
|
||||
}
|
||||
//view_array($row, false);
|
||||
|
||||
$array['music_on_hold'][$i]['music_on_hold_uuid'] = uuid();
|
||||
$array['music_on_hold'][$i]['domain_uuid'] = $domain_uuid;
|
||||
$array['music_on_hold'][$i]['music_on_hold_name'] = $category_name;
|
||||
$array['music_on_hold'][$i]['music_on_hold_path'] = $file_path;
|
||||
$array['music_on_hold'][$i]['music_on_hold_rate'] = strlen($sample_rate) != 0 ? $sample_rate : null;
|
||||
$array['music_on_hold'][$i]['music_on_hold_shuffle'] = 'false';
|
||||
$array['music_on_hold'][$i]['music_on_hold_channels'] = 1;
|
||||
$array['music_on_hold'][$i]['music_on_hold_interval'] = 20;
|
||||
$array['music_on_hold'][$i]['music_on_hold_timer_name'] = 'soft';
|
||||
$array['music_on_hold'][$i]['music_on_hold_chime_list'] = null;
|
||||
$array['music_on_hold'][$i]['music_on_hold_chime_freq'] = null;
|
||||
$array['music_on_hold'][$i]['music_on_hold_chime_max'] = null;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
//view_array($array, false);
|
||||
|
||||
//save the data
|
||||
$p = new permissions;
|
||||
$p->add('music_on_hold_add', 'temp');
|
||||
|
||||
$database = new database;
|
||||
$database->app_name = 'music_on_hold';
|
||||
$database->app_uuid = '1dafe0f8-c08a-289b-0312-15baf4f20f81';
|
||||
$database->save($array);
|
||||
//echo $database->message;
|
||||
unset($array);
|
||||
|
||||
$p->delete('music_on_hold_add', 'temp');
|
||||
}
|
||||
|
||||
/**
|
||||
* delete records/files
|
||||
*/
|
||||
@@ -280,7 +366,7 @@ if (!class_exists('switch_music_on_hold')) {
|
||||
|
||||
//get music on hold details
|
||||
$sql = "select * from v_music_on_hold ";
|
||||
$sql .= "where (domain_uuid = :domain_uuid ".(!permission_exists('music_on_hold_domain') ?: "or domain_uuid is null ").") ";
|
||||
$sql .= "where (domain_uuid = :domain_uuid ".(!permission_exists('music_on_hold_domain') ? "": "or domain_uuid is null ").") ";
|
||||
$sql .= "and music_on_hold_uuid in ('".implode("','", array_keys($moh))."') ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
@@ -377,4 +463,4 @@ if (!class_exists('switch_music_on_hold')) {
|
||||
//$moh->xml();
|
||||
//$moh->save();
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'number_translation_enabled';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['toggle'] = ['true','false'];
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the number translation enabled.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'number_translation_description';
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user