diff --git a/app/modules/app_defaults.php b/app/modules/app_defaults.php index 3ba3108f89..a42648775d 100644 --- a/app/modules/app_defaults.php +++ b/app/modules/app_defaults.php @@ -28,9 +28,9 @@ if ($domains_processed == 1) { //add missing switch directories in default settings - $switch = new switch; - $switch->settings(); - unset($switch); + $obj = new freeswitch; + $obj->settings(); + unset($obj); //use the module class to get the list of modules from the db and add any missing modules if (isset($_SESSION['switch']['mod']['dir'])) { diff --git a/resources/classes/event_socket.php b/resources/classes/event_socket.php index ade3ae1bc6..54a5e4d208 100644 --- a/resources/classes/event_socket.php +++ b/resources/classes/event_socket.php @@ -1,6 +1,6 @@ append("hello\nworld\n"); //print($b->read_line()); //print($b->read_line()); @@ -47,7 +47,7 @@ class event_socket { private $fp; public function __construct($fp = false) { - $this->buffer = new Buffer; + $this->buffer = new buffer; $this->fp = $fp; } diff --git a/resources/classes/switch.php b/resources/classes/freeswitch.php similarity index 93% rename from resources/classes/switch.php rename to resources/classes/freeswitch.php index 408ad3e99d..01bbb63b94 100644 --- a/resources/classes/switch.php +++ b/resources/classes/freeswitch.php @@ -1,11 +1,11 @@ event_socket_ip_address, $this->event_socket_port, $this->event_socket_password); - if ($fp === false) { - return false; - } + $esl = new event_socket; + $esl->connect($this->event_socket_ip_address, $this->event_socket_port, $this->event_socket_password); //run the api command - $result = event_socket_request($fp, 'api global_getvar'); + $result = $esl->request('api global_getvar'); //close event socket fclose($fp);