diff --git a/app/call_centers/call_center_agent_status.php b/app/call_centers/call_center_agent_status.php
index df70e9384b..22af1e54b9 100644
--- a/app/call_centers/call_center_agent_status.php
+++ b/app/call_centers/call_center_agent_status.php
@@ -76,25 +76,25 @@
$sql .= "user_status = '".$row['agent_status']."' ";
$sql .= "where domain_uuid = '".$domain_uuid."' ";
$sql .= "and username = '".$row['agent_name']."' ";
- //echo $sql."\n";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
}
+
//set the call center status
if (!isset($row['queue_name'])) {
if ($row['agent_status'] == "Do Not Disturb") {
//set the default dnd action
$dnd_action = "add";
//set the call center status to Logged Out
- $cmd = "api callcenter_config agent set status ".$row['agent_name']."@".$_SESSION['domains'][$domain_uuid]['domain_name']." 'Logged Out'";
+ $cmd = "api callcenter_config agent set status ".$row['agent_uuid']." 'Logged Out'";
}
else {
- $cmd = "api callcenter_config agent set status ".$row['agent_name']."@".$_SESSION['domains'][$domain_uuid]['domain_name']." '".$row['agent_status']."'";
+ $cmd = "api callcenter_config agent set status ".$row['agent_uuid']." '".$row['agent_status']."'";
}
$response = event_socket_request($fp, $cmd);
}
//echo $cmd."\n";
-
+
//set the agent status to available and assign the agent to the queue with the tier
if (isset($row['queue_name']) && $row['agent_status'] == 'Available') {
//set the call center status
@@ -102,14 +102,14 @@
//$response = event_socket_request($fp, $cmd);
//assign the agent to the queue
- $cmd = "api callcenter_config tier add ".$row['queue_name']."@".$_SESSION['domain_name']." ".$row['agent_name']."@".$_SESSION['domain_name']." 1 1";
+ $cmd = "api callcenter_config tier add ".$row['queue_name']." ".$row['agent_uuid']." 1 1";
//echo $cmd."
\n";
$response = event_socket_request($fp, $cmd);
}
//un-assign the agent from the queue
if (isset($row['queue_name']) && $row['agent_status'] == 'Logged Out') {
- $cmd = "api callcenter_config tier del ".$row['queue_name']."@".$_SESSION['domain_name']." ".$row['agent_name']."@".$_SESSION['domain_name'];
+ $cmd = "api callcenter_config tier del ".$row['queue_name']." ".$row['agent_uuid'];
//echo $cmd."
\n";
$response = event_socket_request($fp, $cmd);
}
@@ -224,69 +224,69 @@
echo "\n";
$x = 0;
foreach($agents as $row) {
- $str = "
\n";
- $str .= " | ".$row['agent_name']." | \n";
+ $html = "
\n";
+ $html .= " | ".$row['agent_name']." | \n";
- //$str .= " ".$row['agent_name']." | \n";
- $str .= " ".$row['agent_status']." | \n";
- $str .= " ";
- $str .= " \n";
- $str .= " \n";
- //$str .= " \n";
- $str .= " \n";
- $str .= " \n";
- $str .= " \n";
- //$str .= " \n";
- $str .= " | \n";
+ //$html .= " ".$row['agent_name']." | \n";
+ $html .= " ".$row['agent_status']." | \n";
+ $html .= " ";
+ $html .= " \n";
+ $html .= " \n";
+ //$html .= " \n";
+ $html .= " \n";
+ $html .= " \n";
+ $html .= " \n";
+ //$html .= " \n";
+ $html .= " | \n";
- $str .= " ";
+ $html .= " | ";
if (is_array($row['queues']) && $per_queue_login) {
- $str .= " \n";
- $str .= " \n";
- $str .= " | ".$text['label-agent']." | \n";
- $str .= " ".$text['label-status']." | \n";
- $str .= " ".$text['label-options']." | \n";
- $str .= " \n";
+ $html .= " \n";
+ $html .= " \n";
}
- $str .= " | \n";
- $str .= "
\n";
+ $html .= " \n";
+ $html .= "\n";
if (count($_SESSION['domains']) > 1) {
if ($row['domain_name'] == $_SESSION['domain_name']) {
- echo $str;
+ echo $html;
if ($c==0) { $c=1; } else { $c=0; }
}
}
else {
- echo $str;
+ echo $html;
if ($c==0) { $c=1; } else { $c=0; }
}
$x++;