Misc: Remove parameters from event_socket_create() call.
This commit is contained in:
parent
e4bb0dda6a
commit
2a54aa025c
|
|
@ -70,14 +70,14 @@
|
||||||
$obj->delete($gateways);
|
$obj->delete($gateways);
|
||||||
}
|
}
|
||||||
case 'start':
|
case 'start':
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create();
|
||||||
if ($fp && permission_exists('gateway_edit')) {
|
if ($fp && permission_exists('gateway_edit')) {
|
||||||
$obj = new gateways;
|
$obj = new gateways;
|
||||||
$obj->start($gateways);
|
$obj->start($gateways);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'stop':
|
case 'stop':
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create();
|
||||||
if ($fp && permission_exists('gateway_edit')) {
|
if ($fp && permission_exists('gateway_edit')) {
|
||||||
$obj = new gateways;
|
$obj = new gateways;
|
||||||
$obj->stop($gateways);
|
$obj->stop($gateways);
|
||||||
|
|
@ -90,14 +90,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
//connect to event socket
|
//connect to event socket
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create();
|
||||||
|
|
||||||
//gateway status function
|
//gateway status function
|
||||||
if (!function_exists('switch_gateway_status')) {
|
if (!function_exists('switch_gateway_status')) {
|
||||||
function switch_gateway_status($gateway_uuid, $result_type = 'xml') {
|
function switch_gateway_status($gateway_uuid, $result_type = 'xml') {
|
||||||
global $fp;
|
global $fp;
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create();
|
||||||
$cmd = 'api sofia xmlstatus gateway '.$gateway_uuid;
|
$cmd = 'api sofia xmlstatus gateway '.$gateway_uuid;
|
||||||
$response = trim(event_socket_request($fp, $cmd));
|
$response = trim(event_socket_request($fp, $cmd));
|
||||||
if ($response == "Invalid Gateway!") {
|
if ($response == "Invalid Gateway!") {
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ if (!class_exists('registrations')) {
|
||||||
$id = 0;
|
$id = 0;
|
||||||
|
|
||||||
//create the event socket connection
|
//create the event socket connection
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create();
|
||||||
|
|
||||||
//get the default settings
|
//get the default settings
|
||||||
$sql = "select sip_profile_name from v_sip_profiles ";
|
$sql = "select sip_profile_name from v_sip_profiles ";
|
||||||
|
|
@ -269,7 +269,7 @@ if (!class_exists('registrations')) {
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
//create the event socket connection
|
//create the event socket connection
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create();
|
||||||
|
|
||||||
//loop through registrations
|
//loop through registrations
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
$row_style["1"] = "row_style1";
|
$row_style["1"] = "row_style1";
|
||||||
|
|
||||||
//connect to event socket
|
//connect to event socket
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create();
|
||||||
|
|
||||||
//switch version
|
//switch version
|
||||||
if (permission_exists('switch_version') && $fp) {
|
if (permission_exists('switch_version') && $fp) {
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create();
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
$switch_version = event_socket_request($fp, 'api version');
|
$switch_version = event_socket_request($fp, 'api version');
|
||||||
preg_match("/FreeSWITCH Version (\d+\.\d+\.\d+(?:\.\d+)?).*\(.*?(\d+\w+)\s*\)/", $switch_version, $matches);
|
preg_match("/FreeSWITCH Version (\d+\.\d+\.\d+(?:\.\d+)?).*\(.*?(\d+\w+)\s*\)/", $switch_version, $matches);
|
||||||
|
|
@ -544,7 +544,7 @@
|
||||||
$memcache_fail = false;
|
$memcache_fail = false;
|
||||||
$mod = new modules;
|
$mod = new modules;
|
||||||
if ($mod -> active("mod_memcache")) {
|
if ($mod -> active("mod_memcache")) {
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create();
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
$switch_cmd = "memcache status verbose";
|
$switch_cmd = "memcache status verbose";
|
||||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue