feat(mod_callcenter): change agent state

This commit is contained in:
john doe 2022-06-06 15:24:58 +03:00 committed by GitHub
parent d0f19a3c98
commit 886aaa0429
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -223,6 +223,19 @@
}
//echo $command."\n";
//set the call center agent state
$command = '';
if (!isset($row['queue_name'])) {
if (in_array($agent_status, array('Available', 'Available (On Demand)'))) {
$agent_state = 'Waiting';
} else {
$agent_state = 'Idle';
}
$command = "api callcenter_config agent set state ".$row['agent_uuid']." '".$agent_state."'";
$response = event_socket_request($fp, $command);
}
//echo $command."\n";
//get the queue_id
if (isset($row['queue_uuid']) && is_uuid($row['queue_uuid'])) {
if (is_array($call_center_queues)) {