Use $event_socket instead of $esl

This commit is contained in:
FusionPBX 2024-04-18 16:14:00 -06:00 committed by GitHub
parent 7b6bdb6fb1
commit 07ff90f97c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -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";

View File

@ -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);
}