This commit is contained in:
john doe 2025-03-23 02:35:54 +03:00 committed by GitHub
commit 7cda1cd5ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 22 additions and 0 deletions

View File

@ -228,6 +228,15 @@
$cmd = "callcenter_config agent set status ".$call_center_agent_uuid." '".$agent_status."'";
$response = event_socket::api($cmd);
usleep(200);
//agent set state
if (in_array($agent_status, array('Available', 'Available (On Demand)'))) {
$agent_state = 'Waiting';
} else {
$agent_state = 'Idle';
}
$cmd = "api callcenter_config agent set state ".$call_center_agent_uuid." '".$agent_state."'";
$response = event_socket_request($fp, $cmd);
usleep(200);
//agent set reject_delay_time
$cmd = 'callcenter_config agent set reject_delay_time '.$call_center_agent_uuid.' '. $agent_reject_delay_time;
$response = event_socket::api($cmd);

View File

@ -232,6 +232,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 (!empty($call_center_queues)) {