mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 09:03:49 +00:00
Update call_center_active_inc.php
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
\<?php
|
||||
/*
|
||||
FusionPBX
|
||||
Version: MPL 1.1
|
||||
@@ -43,8 +43,25 @@
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//get the queue_name and set it as a variable
|
||||
$queue_name = $_GET['queue_name'];
|
||||
//get the queue uuid and set it as a variable
|
||||
$queue_uuid = $_GET['queue_name'];
|
||||
|
||||
//get the queues from the database
|
||||
if (!is_array($_SESSION['queues'])) {
|
||||
$sql = "select * from v_call_center_queues ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "order by queue_name ASC ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$_SESSION['queues'] = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
}
|
||||
|
||||
//get the queue name
|
||||
foreach ($_SESSION['queues'] as $row) {
|
||||
if ($row['call_center_queue_uuid'] == $queue_uuid) {
|
||||
$queue_name = $row['queue_name'];
|
||||
}
|
||||
}
|
||||
|
||||
//convert the string to a named array
|
||||
function str_to_named_array($tmp_str, $tmp_delimiter) {
|
||||
@@ -104,7 +121,7 @@
|
||||
|
||||
//send the event socket command and get the response
|
||||
//callcenter_config queue list tiers [queue_name] |
|
||||
$switch_cmd = 'callcenter_config queue list tiers '.$queue_name;
|
||||
$switch_cmd = 'callcenter_config queue list tiers '.$queue_uuid;
|
||||
$event_socket_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
|
||||
$result = str_to_named_array($event_socket_str, '|');
|
||||
|
||||
@@ -126,7 +143,7 @@
|
||||
|
||||
//send the event socket command and get the response
|
||||
//callcenter_config queue list agents [queue_name] [status] |
|
||||
$switch_cmd = 'callcenter_config queue list agents '.$queue_name;
|
||||
$switch_cmd = 'callcenter_config queue list agents '.$queue_uuid;
|
||||
$event_socket_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
|
||||
$agent_result = str_to_named_array($event_socket_str, '|');
|
||||
|
||||
@@ -269,7 +286,7 @@
|
||||
//get the queue list
|
||||
//send the event socket command and get the response
|
||||
//callcenter_config queue list members [queue_name]
|
||||
$switch_cmd = 'callcenter_config queue list members '.$queue_name;
|
||||
$switch_cmd = 'callcenter_config queue list members '.$queue_uuid;
|
||||
$event_socket_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
|
||||
$result = str_to_named_array($event_socket_str, '|');
|
||||
if (!is_array($result)) { unset($result); }
|
||||
@@ -281,7 +298,7 @@
|
||||
|
||||
echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td align='left'><b>".$text['label-queue'].": ".ucfirst($_GET['name'])."</b><br />\n";
|
||||
echo " <td align='left'><b>".$text['label-queue'].": ".ucfirst($queue_name)."</b><br />\n";
|
||||
echo " ".$text['description-queue']."<br />\n";
|
||||
echo " </td>\n";
|
||||
echo " <td align='right' valign='top'>";
|
||||
|
||||
Reference in New Issue
Block a user