mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Use $event_socket instead of $esl
This commit is contained in:
@@ -52,10 +52,10 @@
|
||||
$switch_cmd = 'show channels as json';
|
||||
|
||||
//create the event socket connection
|
||||
$esl = event_socket::create();
|
||||
$event_socket = event_socket::create();
|
||||
|
||||
//send the event socket command and get the array
|
||||
if ($esl->is_connected()) {
|
||||
if ($event_socket->is_connected()) {
|
||||
$json = trim(event_socket::api($switch_cmd));
|
||||
$results = json_decode($json, "true");
|
||||
}
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
|
||||
//if the connnection is available then run it and return the results
|
||||
if (!$esl) {
|
||||
if (!$event_socket) {
|
||||
|
||||
$msg = "<div align='center'>".$text['confirm-socket']."<br /></div>";
|
||||
echo "<div align='center'>\n";
|
||||
|
||||
@@ -75,10 +75,10 @@
|
||||
if (count($calls) > 0) {
|
||||
|
||||
//setup the event socket connection
|
||||
$esl = event_socket::create();
|
||||
$event_socket = event_socket::create();
|
||||
|
||||
//execute hangup command
|
||||
if ($esl->is_connected()) foreach ($calls as $call_uuid) {
|
||||
if ($event_socket->is_connected()) foreach ($calls as $call_uuid) {
|
||||
event_socket::async("uuid_kill ".$call_uuid);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user