Event socket bug fix and more docs (#6823)
* Add documentation to methods. Use is_resource for added type detection * Allow connect to specify timeout in microseconds with default 30,000 * Update calling mechanism for event sockets * Update project for new singleton event sockets * remove unused variable * catch errors on closing the socket
This commit is contained in:
@@ -338,13 +338,13 @@
|
||||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
|
||||
//setup the event socket connection
|
||||
$fp = event_socket_create();
|
||||
$esl = event_socket::create();
|
||||
|
||||
//delete the queue in the switch
|
||||
if ($fp) {
|
||||
if ($esl->is_connected()) {
|
||||
foreach ($uuids as $uuid) {
|
||||
$cmd = "api callcenter_config queue unload ".$call_center_queues[$uuid]['queue_extension']."@".$_SESSION["domain_name"];
|
||||
$response = event_socket_request($fp, $cmd);
|
||||
$cmd = "callcenter_config queue unload ".$call_center_queues[$uuid]['queue_extension']."@".$_SESSION['domain_name'];
|
||||
$response = event_socket::api($cmd);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -436,13 +436,12 @@
|
||||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
|
||||
//setup the event socket connection
|
||||
$fp = event_socket_create();
|
||||
$esl = event_socket::create();
|
||||
|
||||
//delete the agent in the switch
|
||||
if ($fp) {
|
||||
if ($esl->is_connected()) {
|
||||
foreach ($uuids as $uuid) {
|
||||
$cmd = "api callcenter_config agent del ".$uuid;
|
||||
$response = event_socket_request($fp, $cmd);
|
||||
event_socket::async("callcenter_config agent del $uuid");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -627,4 +626,4 @@ $c->queue_cc_exit_keys = "";
|
||||
$c->dialplan();
|
||||
*/
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user