Update call_center_agents.php

This commit is contained in:
FusionPBX 2023-11-19 22:29:32 -07:00 committed by GitHub
parent b19a67b1b1
commit 6f7be99083
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 14 deletions

View File

@ -82,20 +82,17 @@
} }
} }
//agent status has been changed //save the agent_stat change to the database
if ($agent['agent_status'] != $agent_status) { $array['call_center_agents'][0]['call_center_agent_uuid'] = $agent_uuid;
//save the agent_stat change to the database $array['call_center_agents'][0]['domain_uuid'] = $_SESSION['user']['domain_uuid'];
$array['call_center_agents'][0]['call_center_agent_uuid'] = $agent_uuid; $array['call_center_agents'][0]['agent_status'] = $agent_status;
$array['call_center_agents'][0]['domain_uuid'] = $_SESSION['user']['domain_uuid']; $database->app_name = 'call_centers_dashboard';
$array['call_center_agents'][0]['agent_status'] = $agent_status; $database->app_uuid = '95788e50-9500-079e-2807-fd530b0ea370';
$database->app_name = 'call_centers_dashboard'; $result = $database->save($array);
$database->app_uuid = '95788e50-9500-079e-2807-fd530b0ea370';
$result = $database->save($array); //send the agent status status to mod_call_center
$cmd = "api callcenter_config agent set status ".$agent_uuid." '".$agent_status."'";
//send the agent status status to mod_call_center $response = event_socket_request($fp, $cmd);
$cmd = "api callcenter_config agent set status ".$agent_uuid." '".$agent_status."'";
$response = event_socket_request($fp, $cmd);
}
//add or delete agents from the queue assigned by the tier //add or delete agents from the queue assigned by the tier
foreach ($_POST['agents'] as $row) { foreach ($_POST['agents'] as $row) {