Use $event_socket instead of $esl
This commit is contained in:
parent
7b6bdb6fb1
commit
07ff90f97c
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue