Update agent state to waiting
This commit is contained in:
parent
0e073230ce
commit
ab0f5d3295
|
|
@ -207,18 +207,28 @@
|
||||||
if (!isset($row['queue_name'])) {
|
if (!isset($row['queue_name'])) {
|
||||||
if ($agent_status == "Do Not Disturb") {
|
if ($agent_status == "Do Not Disturb") {
|
||||||
//set the default dnd action
|
//set the default dnd action
|
||||||
$dnd_action = "add";
|
$dnd_action = "add";
|
||||||
|
|
||||||
//set the call center status to Logged Out
|
//set the call center status to Logged Out
|
||||||
if (is_uuid($row['agent_uuid'])) {
|
if (is_uuid($row['agent_uuid'])) {
|
||||||
$command = "api callcenter_config agent set status ".$row['agent_uuid']." 'Logged Out' ";
|
$command = "api callcenter_config agent set status ".$row['agent_uuid']." 'Logged Out' ";
|
||||||
}
|
$response = event_socket_request($fp, $command);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (is_uuid($row['agent_uuid'])) {
|
if (is_uuid($row['agent_uuid'])) {
|
||||||
|
//set the agent status
|
||||||
$command = "api callcenter_config agent set status ".$row['agent_uuid']." '".$agent_status."'";
|
$command = "api callcenter_config agent set status ".$row['agent_uuid']." '".$agent_status."'";
|
||||||
|
$response = event_socket_request($fp, $command);
|
||||||
|
|
||||||
|
//set the agent state
|
||||||
|
if ($agent_status == 'Available' || $agent_status == 'Logged Out') {
|
||||||
|
$command = "api callcenter_config agent set state ".$row['agent_uuid']." 'Waiting'";
|
||||||
|
$response = event_socket_request($fp, $command);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$response = event_socket_request($fp, $command);
|
|
||||||
}
|
}
|
||||||
//echo $command."\n";
|
//echo $command."\n";
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue