Ring Group search in CDR (#7177)
* Adding Ring Group dropdown in cdr search * 2nd commit * remove unused permission
This commit is contained in:
parent
b55e542cbd
commit
fab9a6bbc9
|
|
@ -129,6 +129,9 @@
|
||||||
$apps[$x]['permissions'][$y]['name'] = "xml_cdr_search_call_center_queues";
|
$apps[$x]['permissions'][$y]['name'] = "xml_cdr_search_call_center_queues";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
|
$apps[$x]['permissions'][$y]['name'] = "xml_cdr_search_ring_groups";
|
||||||
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "xml_cdr_cc_side";
|
$apps[$x]['permissions'][$y]['name'] = "xml_cdr_cc_side";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
|
|
@ -848,6 +851,12 @@
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
$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]['type']['mysql'] = "char(36)";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
|
$z++;
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "ring_group_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'] = "";
|
||||||
|
|
||||||
//schema details
|
//schema details
|
||||||
$y++;
|
$y++;
|
||||||
|
|
|
||||||
|
|
@ -3992,4 +3992,31 @@ $text['label-text']['zh-cn'] = "文本";
|
||||||
$text['label-text']['ja-jp'] = "文章";
|
$text['label-text']['ja-jp'] = "文章";
|
||||||
$text['label-text']['ko-kr'] = "텍스트";
|
$text['label-text']['ko-kr'] = "텍스트";
|
||||||
|
|
||||||
|
$text['label-ring_group']['en-us'] = "Ring Group";
|
||||||
|
$text['label-ring_group']['en-gb'] = "Ring Group";
|
||||||
|
$text['label-ring_group']['ar-eg'] = "فريق الاعتماد";
|
||||||
|
$text['label-ring_group']['de-at'] = "Rufgruppen";
|
||||||
|
$text['label-ring_group']['de-ch'] = "Rufgruppen";
|
||||||
|
$text['label-ring_group']['de-de'] = "Rufgruppen";
|
||||||
|
$text['label-ring_group']['el-gr'] = "Ομάδα δαχτυλιδιών";
|
||||||
|
$text['label-ring_group']['es-cl'] = "Grupo de llamado";
|
||||||
|
$text['label-ring_group']['es-mx'] = "Grupo de llamado";
|
||||||
|
$text['label-ring_group']['fr-ca'] = "Groupes de Sonnerie";
|
||||||
|
$text['label-ring_group']['fr-fr'] = "Groupes de Sonnerie";
|
||||||
|
$text['label-ring_group']['he-il'] = "קבוצות חיוג";
|
||||||
|
$text['label-ring_group']['it-it'] = "Gruppi di Squillo";
|
||||||
|
$text['label-ring_group']['ka-ge'] = "ზარის ჯგუფი";
|
||||||
|
$text['label-ring_group']['nl-nl'] = "Bel groepen";
|
||||||
|
$text['label-ring_group']['pl-pl'] = "Grupy odbiorców rozmów";
|
||||||
|
$text['label-ring_group']['pt-br'] = "Configurações da Conta";
|
||||||
|
$text['label-ring_group']['pt-pt'] = "Grupos";
|
||||||
|
$text['label-ring_group']['ro-ro'] = "Grup de apeluri";
|
||||||
|
$text['label-ring_group']['ru-ru'] = "Группа вызовов";
|
||||||
|
$text['label-ring_group']['sv-se'] = "Ringgrupper";
|
||||||
|
$text['label-ring_group']['uk-ua'] = "Групи";
|
||||||
|
$text['label-ring_group']['tr-tr'] = "Yüzük Grubu";
|
||||||
|
$text['label-ring_group']['zh-cn'] = "环组";
|
||||||
|
$text['label-ring_group']['ja-jp'] = "リンググループ";
|
||||||
|
$text['label-ring_group']['ko-kr'] = "링 그룹";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -614,6 +614,7 @@ if (!class_exists('xml_cdr')) {
|
||||||
$domain_uuid = urldecode($xml->variables->domain_uuid);
|
$domain_uuid = urldecode($xml->variables->domain_uuid);
|
||||||
|
|
||||||
//misc
|
//misc
|
||||||
|
$this->array[$key][0]['ring_group_uuid'] = urldecode($xml->variables->ring_group_uuid);
|
||||||
$this->array[$key][0]['xml_cdr_uuid'] = $uuid;
|
$this->array[$key][0]['xml_cdr_uuid'] = $uuid;
|
||||||
$this->array[$key][0]['destination_number'] = $destination_number;
|
$this->array[$key][0]['destination_number'] = $destination_number;
|
||||||
$this->array[$key][0]['sip_call_id'] = urldecode($xml->variables->sip_call_id);
|
$this->array[$key][0]['sip_call_id'] = urldecode($xml->variables->sip_call_id);
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@
|
||||||
$permission['xml_cdr_delete'] = permission_exists('xml_cdr_delete');
|
$permission['xml_cdr_delete'] = permission_exists('xml_cdr_delete');
|
||||||
$permission['xml_cdr_domain'] = permission_exists('xml_cdr_domain');
|
$permission['xml_cdr_domain'] = permission_exists('xml_cdr_domain');
|
||||||
$permission['xml_cdr_search_call_center_queues'] = permission_exists('xml_cdr_search_call_center_queues');
|
$permission['xml_cdr_search_call_center_queues'] = permission_exists('xml_cdr_search_call_center_queues');
|
||||||
|
$permission['xml_cdr_search_ring_groups'] = permission_exists('xml_cdr_search_ring_groups');
|
||||||
$permission['xml_cdr_statistics'] = permission_exists('xml_cdr_statistics');
|
$permission['xml_cdr_statistics'] = permission_exists('xml_cdr_statistics');
|
||||||
$permission['xml_cdr_archive'] = permission_exists('xml_cdr_archive');
|
$permission['xml_cdr_archive'] = permission_exists('xml_cdr_archive');
|
||||||
$permission['xml_cdr_all'] = permission_exists('xml_cdr_all');
|
$permission['xml_cdr_all'] = permission_exists('xml_cdr_all');
|
||||||
|
|
@ -148,6 +149,16 @@
|
||||||
$extensions = $database->select($sql, $parameters, 'all');
|
$extensions = $database->select($sql, $parameters, 'all');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//get the ring groups
|
||||||
|
if ($permission['xml_cdr_search_ring_groups']) {
|
||||||
|
$sql = "select ring_group_uuid, ring_group_name, ring_group_extension from v_ring_groups ";
|
||||||
|
$sql .= "where domain_uuid = :domain_uuid ";
|
||||||
|
$sql .= "order by ring_group_extension asc ";
|
||||||
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
|
$database = new database;
|
||||||
|
$ring_groups = $database->select($sql, $parameters, 'all');
|
||||||
|
}
|
||||||
|
|
||||||
//get the call center queues
|
//get the call center queues
|
||||||
if ($permission['xml_cdr_search_call_center_queues']) {
|
if ($permission['xml_cdr_search_call_center_queues']) {
|
||||||
$sql = "select call_center_queue_uuid, queue_name, queue_extension from v_call_center_queues ";
|
$sql = "select call_center_queue_uuid, queue_name, queue_extension from v_call_center_queues ";
|
||||||
|
|
@ -603,6 +614,26 @@
|
||||||
echo " </div>\n";
|
echo " </div>\n";
|
||||||
unset($sql, $parameters, $call_center_queues, $row, $selected);
|
unset($sql, $parameters, $call_center_queues, $row, $selected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($permission['xml_cdr_search_ring_groups']) {
|
||||||
|
echo " <div class='form_set'>\n";
|
||||||
|
echo " <div class='label'>\n";
|
||||||
|
echo " ".$text['label-ring_group']."\n";
|
||||||
|
echo " </div>\n";
|
||||||
|
echo " <div class='field'>\n";
|
||||||
|
echo " <select class='formfld' name='ring_group_uuid' id='ring_group_uuid'>\n";
|
||||||
|
echo " <option value=''></option>";
|
||||||
|
if (is_array($ring_groups) && @sizeof($ring_groups) != 0) {
|
||||||
|
foreach ($ring_groups as $row) {
|
||||||
|
$selected = ($row['ring_group_uuid'] == $ring_group_uuid) ? "selected" : null;
|
||||||
|
echo " <option value='".escape($row['ring_group_uuid'])."' ".escape($selected).">".((is_numeric($row['ring_group_extension'])) ? escape($row['ring_group_extension']." (".$row['ring_group_name'].")") : escape($row['ring_group_extension'])." (".escape($row['ring_group_extension']).")")."</option>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo " </select>\n";
|
||||||
|
echo " </div>\n";
|
||||||
|
echo " </div>\n";
|
||||||
|
unset($sql, $parameters, $ring_groups, $row, $selected);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@
|
||||||
$permission['xml_cdr_delete'] = permission_exists('xml_cdr_delete');
|
$permission['xml_cdr_delete'] = permission_exists('xml_cdr_delete');
|
||||||
$permission['xml_cdr_domain'] = permission_exists('xml_cdr_domain');
|
$permission['xml_cdr_domain'] = permission_exists('xml_cdr_domain');
|
||||||
$permission['xml_cdr_search_call_center_queues'] = permission_exists('xml_cdr_search_call_center_queues');
|
$permission['xml_cdr_search_call_center_queues'] = permission_exists('xml_cdr_search_call_center_queues');
|
||||||
|
$permission['xml_cdr_search_ring_groups'] = permission_exists('xml_cdr_search_ring_groups');
|
||||||
$permission['xml_cdr_statistics'] = permission_exists('xml_cdr_statistics');
|
$permission['xml_cdr_statistics'] = permission_exists('xml_cdr_statistics');
|
||||||
$permission['xml_cdr_archive'] = permission_exists('xml_cdr_archive');
|
$permission['xml_cdr_archive'] = permission_exists('xml_cdr_archive');
|
||||||
$permission['xml_cdr_all'] = permission_exists('xml_cdr_all');
|
$permission['xml_cdr_all'] = permission_exists('xml_cdr_all');
|
||||||
|
|
@ -140,6 +141,7 @@
|
||||||
$order = $_REQUEST["order"] ?? '';
|
$order = $_REQUEST["order"] ?? '';
|
||||||
$cc_side = $_REQUEST["cc_side"] ?? '';
|
$cc_side = $_REQUEST["cc_side"] ?? '';
|
||||||
$call_center_queue_uuid = $_REQUEST["call_center_queue_uuid"] ?? '';
|
$call_center_queue_uuid = $_REQUEST["call_center_queue_uuid"] ?? '';
|
||||||
|
$ring_group_uuid = $_REQUEST["ring_group_uuid"] ?? '';
|
||||||
if (isset($_SESSION['cdr']['field']) && is_array($_SESSION['cdr']['field'])) {
|
if (isset($_SESSION['cdr']['field']) && is_array($_SESSION['cdr']['field'])) {
|
||||||
foreach ($_SESSION['cdr']['field'] as $field) {
|
foreach ($_SESSION['cdr']['field'] as $field) {
|
||||||
$array = explode(",", $field);
|
$array = explode(",", $field);
|
||||||
|
|
@ -610,6 +612,11 @@
|
||||||
$sql .= "and call_center_queue_uuid = :call_center_queue_uuid \n";
|
$sql .= "and call_center_queue_uuid = :call_center_queue_uuid \n";
|
||||||
$parameters['call_center_queue_uuid'] = $call_center_queue_uuid;
|
$parameters['call_center_queue_uuid'] = $call_center_queue_uuid;
|
||||||
}
|
}
|
||||||
|
//show specific ring groups
|
||||||
|
if (!empty($ring_group_uuid)) {
|
||||||
|
$sql .= "and ring_group_uuid = :ring_group_uuid \n";
|
||||||
|
$parameters['ring_group_uuid'] = $ring_group_uuid;
|
||||||
|
}
|
||||||
//end where
|
//end where
|
||||||
if (!empty($order_by)) {
|
if (!empty($order_by)) {
|
||||||
$sql .= order_by($order_by, $order);
|
$sql .= order_by($order_by, $order);
|
||||||
|
|
|
||||||
|
|
@ -337,6 +337,24 @@
|
||||||
unset($sql, $parameters, $call_center_queues, $row, $selected);
|
unset($sql, $parameters, $call_center_queues, $row, $selected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (permission_exists('xml_cdr_search_ring_groups')) {
|
||||||
|
echo " <tr>";
|
||||||
|
echo " <td class='vncell'>".$text['label-ring_group']."</td>";
|
||||||
|
echo " <td class='vtable'>";
|
||||||
|
echo " <select class='formfld' name='ring_group_uuid' id='ring_group_uuid'>\n";
|
||||||
|
echo " <option value=''></option>";
|
||||||
|
if (is_array($ring_groups) && @sizeof($ring_groups) != 0) {
|
||||||
|
foreach ($ring_groups as $row) {
|
||||||
|
$selected = ($row['ring_group_uuid'] == $ring_group_uuid) ? "selected" : null;
|
||||||
|
echo " <option value='".escape($row['ring_group_uuid'])."' ".escape($selected).">".((is_numeric($row['ring_group_extension'])) ? escape($row['ring_group_extension']." (".$row['ring_group_name'].")") : escape($row['ring_group_extension'])." (".escape($row['ring_group_extension']).")")."</option>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo " </select>\n";
|
||||||
|
echo " </td>";
|
||||||
|
echo " </tr>\n";
|
||||||
|
unset($sql, $parameters, $ring_groups, $row, $selected);
|
||||||
|
}
|
||||||
|
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
|
|
||||||
echo " </td>";
|
echo " </td>";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue