Update BLF for agents when making changes in the GUI. Also use BLF as a speed dial for login/logout. (#3949)

* Create call_center_notify.php

Function for sending BLF notify to ELS.

* Update call_center_agent_status.php

* Update 200_agent_status.xml

* Update 200_agent_status.xml
This commit is contained in:
konradSC
2018-12-26 00:25:24 -05:00
committed by FusionPBX
parent 838a05808c
commit 65ebdf38ac
3 changed files with 92 additions and 3 deletions

View File

@@ -120,8 +120,31 @@
$response = event_socket_request($fp, $cmd);
}
usleep(200);
}
//set the blf status
//get the agents from the database
$sql = "select agent_name from v_call_center_agents ";
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
$sql .= "and call_center_agent_uuid = '".$row['agent_uuid']."' ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
$agent_name = $prep_statement->fetchAll(PDO::FETCH_NAMED);
if ($row['agent_status'] == 'Available') {
$answer_state = 'confirmed';
}
else {
$answer_state = 'terminated';
}
$call_center_notify = new call_center_notify;
$call_center_notify->domain_name = $_SESSION['domain_name'];
$call_center_notify->agent_name = $agent_name[0]['agent_name'];
$call_center_notify->answer_state = $answer_state;
$call_center_notify->agent_uuid = $row['agent_uuid'];
$call_center_notify->send_call_center_notify();
unset($call_center_notify);
}
}
}
}