Misc: Remove parameters from event_socket_create() calls.
This commit is contained in:
@@ -118,7 +118,7 @@
|
|||||||
$cache->delete("configuration:acl.conf");
|
$cache->delete("configuration:acl.conf");
|
||||||
|
|
||||||
//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();
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
event_socket_request($fp, "api reloadacl");
|
event_socket_request($fp, "api reloadacl");
|
||||||
}
|
}
|
||||||
@@ -204,7 +204,7 @@
|
|||||||
$cache->delete("configuration:acl.conf");
|
$cache->delete("configuration:acl.conf");
|
||||||
|
|
||||||
//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();
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
event_socket_request($fp, "api reloadacl");
|
event_socket_request($fp, "api reloadacl");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
$search = $_REQUEST['search'] ?? '';
|
$search = $_REQUEST['search'] ?? '';
|
||||||
|
|
||||||
//create event socket connection
|
//create event socket connection
|
||||||
$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) {
|
||||||
//run the command
|
//run the command
|
||||||
$result = rtrim(event_socket_request($fp, 'api reloadacl'));
|
$result = rtrim(event_socket_request($fp, 'api reloadacl'));
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ if (!class_exists('access_controls')) {
|
|||||||
$cache->delete("configuration:acl.conf");
|
$cache->delete("configuration:acl.conf");
|
||||||
|
|
||||||
//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();
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
event_socket_request($fp, "api reloadacl");
|
event_socket_request($fp, "api reloadacl");
|
||||||
}
|
}
|
||||||
@@ -146,7 +146,7 @@ if (!class_exists('access_controls')) {
|
|||||||
$cache->delete("configuration:acl.conf");
|
$cache->delete("configuration:acl.conf");
|
||||||
|
|
||||||
//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();
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
event_socket_request($fp, "api reloadacl");
|
event_socket_request($fp, "api reloadacl");
|
||||||
}
|
}
|
||||||
@@ -261,7 +261,7 @@ if (!class_exists('access_controls')) {
|
|||||||
$cache->delete("configuration:acl.conf");
|
$cache->delete("configuration:acl.conf");
|
||||||
|
|
||||||
//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();
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
event_socket_request($fp, "api reloadacl");
|
event_socket_request($fp, "api reloadacl");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ if (count($_GET) > 0) {
|
|||||||
$direction = trim($_GET["direction"] ?? '');
|
$direction = trim($_GET["direction"] ?? '');
|
||||||
|
|
||||||
//setup the event socket connection
|
//setup 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();
|
||||||
|
|
||||||
//allow specific commands
|
//allow specific commands
|
||||||
if (!empty($switch_cmd)) {
|
if (!empty($switch_cmd)) {
|
||||||
|
|||||||
@@ -97,7 +97,7 @@
|
|||||||
|
|
||||||
//update the user_status
|
//update the user_status
|
||||||
if (is_uuid($call_center_agent_uuid)) {
|
if (is_uuid($call_center_agent_uuid)) {
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create();
|
||||||
$switch_cmd .= "callcenter_config agent set status ".$call_center_agent_uuid." '".$user_status."'";
|
$switch_cmd .= "callcenter_config agent set status ".$call_center_agent_uuid." '".$user_status."'";
|
||||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ if (!class_exists('basic_operator_panel')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//send the command
|
//send the command
|
||||||
$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_result = event_socket_request($fp, 'api show channels as json');
|
$switch_result = event_socket_request($fp, 'api show channels as json');
|
||||||
$json_array = json_decode($switch_result, true);
|
$json_array = json_decode($switch_result, true);
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ if (!empty($groups)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//get the valet info
|
//get the valet info
|
||||||
$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) {
|
||||||
$valet_info = event_socket_request($fp, 'api valet_info park@'.$_SESSION['domain_name']);
|
$valet_info = event_socket_request($fp, 'api valet_info park@'.$_SESSION['domain_name']);
|
||||||
|
|
||||||
|
|||||||
@@ -130,7 +130,7 @@
|
|||||||
$broadcast_name = str_replace("'", "", $broadcast_name);
|
$broadcast_name = str_replace("'", "", $broadcast_name);
|
||||||
|
|
||||||
//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 information over event socket
|
//get information over event socket
|
||||||
if (!$fp) {
|
if (!$fp) {
|
||||||
@@ -196,7 +196,7 @@
|
|||||||
|
|
||||||
//if the event socket connection is lost then re-connect
|
//if the event socket connection is lost then re-connect
|
||||||
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();
|
||||||
}
|
}
|
||||||
|
|
||||||
//method 1
|
//method 1
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ else {
|
|||||||
if (is_uuid($uuid)) {
|
if (is_uuid($uuid)) {
|
||||||
//show the result
|
//show the result
|
||||||
if (count($_GET) > 0) {
|
if (count($_GET) > 0) {
|
||||||
$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) {
|
||||||
$cmd = "sched_del ".$uuid;
|
$cmd = "sched_del ".$uuid;
|
||||||
$result = event_socket_request($fp, 'api '.$cmd);
|
$result = event_socket_request($fp, 'api '.$cmd);
|
||||||
|
|||||||
@@ -90,7 +90,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//create an event socket connection
|
//create an 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 call center queue, agent and tiers list
|
//get the call center queue, agent and tiers list
|
||||||
if (!$fp) {
|
if (!$fp) {
|
||||||
|
|||||||
@@ -90,7 +90,7 @@
|
|||||||
|
|
||||||
//run the command
|
//run the command
|
||||||
if (isset($switch_command)) {
|
if (isset($switch_command)) {
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create();
|
||||||
$response = event_socket_request($fp, 'api '.$switch_command);
|
$response = event_socket_request($fp, 'api '.$switch_command);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,7 +134,7 @@
|
|||||||
//fs cmd
|
//fs cmd
|
||||||
if (!empty($switch_cmd)) {
|
if (!empty($switch_cmd)) {
|
||||||
//setup the event socket connection
|
//setup 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();
|
||||||
//ensure the connection exists
|
//ensure the connection exists
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
//send the command
|
//send the command
|
||||||
|
|||||||
@@ -238,7 +238,7 @@
|
|||||||
|
|
||||||
//add the agent
|
//add the agent
|
||||||
//setup the event socket connection
|
//setup 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();
|
||||||
//add the agent using event socket
|
//add the agent using event socket
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
//add the agent
|
//add the agent
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
unset($sql, $parameters);
|
unset($sql, $parameters);
|
||||||
|
|
||||||
//setup the event socket connection
|
//setup 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 agents from the database
|
//get the agents from the database
|
||||||
$sql = "select * from v_call_center_agents ";
|
$sql = "select * from v_call_center_agents ";
|
||||||
|
|||||||
@@ -152,7 +152,7 @@
|
|||||||
|
|
||||||
//delete the agent from freeswitch
|
//delete the agent from freeswitch
|
||||||
//setup the event socket connection
|
//setup 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();
|
||||||
//delete the agent over event socket
|
//delete the agent over event socket
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
//callcenter_config tier del [queue_name] [agent_name]
|
//callcenter_config tier del [queue_name] [agent_name]
|
||||||
@@ -457,7 +457,7 @@
|
|||||||
|
|
||||||
if (!empty($agent_name)) {
|
if (!empty($agent_name)) {
|
||||||
//setup the event socket connection
|
//setup 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();
|
||||||
//add the agent using event socket
|
//add the agent using event socket
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
/* syntax:
|
/* syntax:
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
|
|
||||||
//connect to event socket
|
//connect to event socket
|
||||||
if (isset($queue_extension) && isset($cmd)) {
|
if (isset($queue_extension) && isset($cmd)) {
|
||||||
$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) {
|
||||||
$response = event_socket_request($fp, 'api reloadxml');
|
$response = event_socket_request($fp, 'api reloadxml');
|
||||||
$response = event_socket_request($fp, 'api callcenter_config queue '.$cmd. ' '.$queue_extension."@".$_SESSION["domain_name"]);
|
$response = event_socket_request($fp, 'api callcenter_config queue '.$cmd. ' '.$queue_extension."@".$_SESSION["domain_name"]);
|
||||||
|
|||||||
@@ -338,7 +338,7 @@
|
|||||||
if (is_array($array) && @sizeof($array) != 0) {
|
if (is_array($array) && @sizeof($array) != 0) {
|
||||||
|
|
||||||
//setup the event socket connection
|
//setup 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();
|
||||||
|
|
||||||
//delete the queue in the switch
|
//delete the queue in the switch
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
@@ -436,7 +436,7 @@
|
|||||||
if (is_array($array) && @sizeof($array) != 0) {
|
if (is_array($array) && @sizeof($array) != 0) {
|
||||||
|
|
||||||
//setup the event socket connection
|
//setup 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();
|
||||||
|
|
||||||
//delete the agent in the switch
|
//delete the agent in the switch
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//setup the event socket connection
|
//setup 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 http post values and set them as php variables
|
//get the http post values and set them as php variables
|
||||||
if (count($_POST) > 0) {
|
if (count($_POST) > 0) {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//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();
|
||||||
|
|
||||||
//get the agent list from event socket
|
//get the agent list from event socket
|
||||||
$switch_cmd = 'callcenter_config agent list';
|
$switch_cmd = 'callcenter_config agent list';
|
||||||
|
|||||||
@@ -254,7 +254,7 @@
|
|||||||
$p->delete("dialplan_edit", "temp");
|
$p->delete("dialplan_edit", "temp");
|
||||||
|
|
||||||
// Update subscribed endpoints
|
// Update subscribed endpoints
|
||||||
$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) {
|
||||||
//send the event
|
//send the event
|
||||||
$event = "sendevent PRESENCE_IN\n";
|
$event = "sendevent PRESENCE_IN\n";
|
||||||
|
|||||||
@@ -281,7 +281,7 @@ if (!class_exists('call_flows')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//send the event
|
//send the event
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create();
|
||||||
$switch_result = event_socket_request($fp, $cmd);
|
$switch_result = event_socket_request($fp, $cmd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -399,7 +399,7 @@
|
|||||||
$cmd .= "answer-state: confirmed\n";
|
$cmd .= "answer-state: confirmed\n";
|
||||||
|
|
||||||
//send the event
|
//send the event
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create();
|
||||||
$switch_result = event_socket_request($fp, $cmd);
|
$switch_result = event_socket_request($fp, $cmd);
|
||||||
unset($fp);
|
unset($fp);
|
||||||
}
|
}
|
||||||
@@ -421,7 +421,7 @@
|
|||||||
$cmd .= "answer-state: terminated\n";
|
$cmd .= "answer-state: terminated\n";
|
||||||
|
|
||||||
//send the event
|
//send the event
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create();
|
||||||
$switch_result = event_socket_request($fp, $cmd);
|
$switch_result = event_socket_request($fp, $cmd);
|
||||||
unset($fp);
|
unset($fp);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
if ($this->enabled == "true") {
|
if ($this->enabled == "true") {
|
||||||
//update the call center status
|
//update the call center status
|
||||||
$user_status = "Logged Out";
|
$user_status = "Logged Out";
|
||||||
$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 .= "callcenter_config agent set status ".$_SESSION['username']."@".$this->domain_name." '".$user_status."'";
|
$switch_cmd .= "callcenter_config agent set status ".$_SESSION['username']."@".$this->domain_name." '".$user_status."'";
|
||||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
//feature_event method
|
//feature_event method
|
||||||
public function send_notify() {
|
public function send_notify() {
|
||||||
$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) {
|
||||||
// Get the SIP profiles for the extension
|
// Get the SIP profiles for the extension
|
||||||
$command = "sofia_contact */{$this->extension}@{$this->domain_name}";
|
$command = "sofia_contact */{$this->extension}@{$this->domain_name}";
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//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();
|
||||||
|
|
||||||
//get the list
|
//get the list
|
||||||
$sql = "select domain_name, extension, user_context, do_not_disturb, description ";
|
$sql = "select domain_name, extension, user_context, do_not_disturb, description ";
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
$switch_cmd = 'show channels as json';
|
$switch_cmd = 'show channels as json';
|
||||||
|
|
||||||
//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();
|
||||||
|
|
||||||
//send the event socket command and get the array
|
//send the event socket command and get the array
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
if (is_array($calls) && @sizeof($calls) != 0) {
|
if (is_array($calls) && @sizeof($calls) != 0) {
|
||||||
|
|
||||||
//setup the event socket connection
|
//setup 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();
|
||||||
|
|
||||||
//execute hangup command
|
//execute hangup command
|
||||||
foreach ($calls as $call_uuid) {
|
foreach ($calls as $call_uuid) {
|
||||||
|
|||||||
@@ -93,7 +93,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//create the even socket connection and send the event socket command
|
//create the even socket connection and send the event socket command
|
||||||
$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) {
|
||||||
//error message
|
//error message
|
||||||
echo "<div align='center'><strong>Connection to Event Socket failed.</strong></div>";
|
echo "<div align='center'><strong>Connection to Event Socket failed.</strong></div>";
|
||||||
@@ -200,7 +200,7 @@
|
|||||||
unset($destination_common);
|
unset($destination_common);
|
||||||
|
|
||||||
//create the even socket connection and send the event socket command
|
//create the even socket connection and send the event socket command
|
||||||
$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) {
|
||||||
//error message
|
//error message
|
||||||
echo "<div align='center'><strong>Connection to Event Socket failed.</strong></div>";
|
echo "<div align='center'><strong>Connection to Event Socket failed.</strong></div>";
|
||||||
|
|||||||
@@ -141,7 +141,7 @@
|
|||||||
$default_voice = 'callie';
|
$default_voice = 'callie';
|
||||||
$switch_cmd = "conference ".$conference_room_uuid."@".$_SESSION['domain_name']." play ".$_SESSION['switch']['sounds']['dir']."/".$default_language."/".$default_dialect."/".$default_voice."/ivr/ivr-recording_started.wav";
|
$switch_cmd = "conference ".$conference_room_uuid."@".$_SESSION['domain_name']." play ".$_SESSION['switch']['sounds']['dir']."/".$default_language."/".$default_dialect."/".$default_voice."/ivr/ivr-recording_started.wav";
|
||||||
//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();
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,7 +98,7 @@
|
|||||||
$default_voice = 'callie';
|
$default_voice = 'callie';
|
||||||
$switch_cmd = "conference ".$meeting_uuid."@".$_SESSION['domain_name']." play ".$_SESSION['switch']['sounds']['dir']."/".$default_language."/".$default_dialect."/".$default_voice."/ivr/ivr-recording_started.wav";
|
$switch_cmd = "conference ".$meeting_uuid."@".$_SESSION['domain_name']." play ".$_SESSION['switch']['sounds']['dir']."/".$default_language."/".$default_dialect."/".$default_voice."/ivr/ivr-recording_started.wav";
|
||||||
//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();
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||||
}
|
}
|
||||||
@@ -137,7 +137,7 @@
|
|||||||
|
|
||||||
//get conference array
|
//get conference array
|
||||||
$switch_cmd = "conference xml_list";
|
$switch_cmd = "conference xml_list";
|
||||||
$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) {
|
||||||
//connection to even socket failed
|
//connection to even socket failed
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
//feature_event method
|
//feature_event method
|
||||||
public function send_call_center_notify() {
|
public function send_call_center_notify() {
|
||||||
|
|
||||||
$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) {
|
||||||
//send the event
|
//send the event
|
||||||
$event = "sendevent PRESENCE_IN\n";
|
$event = "sendevent PRESENCE_IN\n";
|
||||||
|
|||||||
@@ -687,7 +687,7 @@ if (!class_exists('conference_centers')) {
|
|||||||
$switch_cmd_notice = "conference ".$meeting_uuid[$uuid]."@".$_SESSION['domain_name']." play ".$_SESSION['switch']['sounds']['dir']."/".$default_language."/".$default_dialect."/".$default_voice."/ivr/ivr-recording_started.wav";
|
$switch_cmd_notice = "conference ".$meeting_uuid[$uuid]."@".$_SESSION['domain_name']." play ".$_SESSION['switch']['sounds']['dir']."/".$default_language."/".$default_dialect."/".$default_voice."/ivr/ivr-recording_started.wav";
|
||||||
//execute api commands
|
//execute api commands
|
||||||
// if (!file_exists($recording_dir.'/'.$meeting_uuid[$uuid].'.wav')) {
|
// if (!file_exists($recording_dir.'/'.$meeting_uuid[$uuid].'.wav')) {
|
||||||
$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_result = event_socket_request($fp, 'api '.$switch_cmd_record);
|
// $switch_result = event_socket_request($fp, 'api '.$switch_cmd_record);
|
||||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd_notice);
|
$switch_result = event_socket_request($fp, 'api '.$switch_cmd_notice);
|
||||||
|
|||||||
@@ -188,7 +188,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//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();
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
if ($data == "energy") {
|
if ($data == "energy") {
|
||||||
//conference 3001-example-domain.org energy 103
|
//conference 3001-example-domain.org energy 103
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
$switch_cmd = "conference '".$conference_name."' xml_list";
|
$switch_cmd = "conference '".$conference_name."' xml_list";
|
||||||
|
|
||||||
//connect to event socket, send the command and process the results
|
//connect to event socket, send the command and process the results
|
||||||
$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) {
|
||||||
$msg = "<div align='center'>".$text['message-connection']."<br /></div>";
|
$msg = "<div align='center'>".$text['message-connection']."<br /></div>";
|
||||||
echo "<div align='center'>\n";
|
echo "<div align='center'>\n";
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//show content
|
//show content
|
||||||
$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) {
|
||||||
$msg = "<div align='center'>".$text['message-connection']."<br /></div>";
|
$msg = "<div align='center'>".$text['message-connection']."<br /></div>";
|
||||||
echo "<div align='center'>\n";
|
echo "<div align='center'>\n";
|
||||||
|
|||||||
+1
-1
@@ -65,7 +65,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//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();
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
// Get the SIP profiles for the user
|
// Get the SIP profiles for the user
|
||||||
$command = "sofia_contact */{$user}@{$domain_name}";
|
$command = "sofia_contact */{$user}@{$domain_name}";
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ javascript:void(0);
|
|||||||
|
|
||||||
//get the list of applications
|
//get the list of applications
|
||||||
if (empty($_SESSION['switch']['applications']) || !is_array($_SESSION['switch']['applications'])) {
|
if (empty($_SESSION['switch']['applications']) || !is_array($_SESSION['switch']['applications'])) {
|
||||||
$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) {
|
||||||
$result = event_socket_request($fp, 'api show application');
|
$result = event_socket_request($fp, 'api show application');
|
||||||
|
|
||||||
|
|||||||
@@ -383,11 +383,7 @@
|
|||||||
$domain_name = $database->select($sql, $parameters, 'column');
|
$domain_name = $database->select($sql, $parameters, 'column');
|
||||||
|
|
||||||
//send the message waiting status
|
//send the message waiting status
|
||||||
$fp = event_socket_create(
|
$fp = event_socket_create();
|
||||||
$setting->get('switch','event_socket_ip_address'),
|
|
||||||
$setting->get('switch', 'event_socket_port'),
|
|
||||||
$setting->get('switch', 'event_socket_password')
|
|
||||||
);
|
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
//$switch_cmd .= "luarun app.lua voicemail mwi ".$voicemail_id."@".$domain_name;
|
//$switch_cmd .= "luarun app.lua voicemail mwi ".$voicemail_id."@".$domain_name;
|
||||||
$switch_cmd .= "luarun app/voicemail/resources/scripts/mwi_notify.lua ".$voicemail_id." ".$domain_name." 0 0";
|
$switch_cmd .= "luarun app/voicemail/resources/scripts/mwi_notify.lua ".$voicemail_id." ".$domain_name." 0 0";
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ if (!class_exists('event_guard')) {
|
|||||||
$cmd = "sendevent CUSTOM\n";
|
$cmd = "sendevent CUSTOM\n";
|
||||||
$cmd .= "Event-Name: CUSTOM\n";
|
$cmd .= "Event-Name: CUSTOM\n";
|
||||||
$cmd .= "Event-Subclass: event_guard:unblock\n";
|
$cmd .= "Event-Subclass: event_guard:unblock\n";
|
||||||
$fp = event_socket_create($setting->get('switch','event_socket_ip_address'), $setting->get('switch', 'event_socket_port'), $setting->get('switch', 'event_socket_password'));
|
$fp = event_socket_create();
|
||||||
$switch_result = event_socket_request($fp, $cmd);
|
$switch_result = event_socket_request($fp, $cmd);
|
||||||
|
|
||||||
//set message
|
//set message
|
||||||
|
|||||||
@@ -780,7 +780,7 @@
|
|||||||
|
|
||||||
//reload acl if allowed
|
//reload acl if allowed
|
||||||
if (permission_exists("extension_cidr")) {
|
if (permission_exists("extension_cidr")) {
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create();
|
||||||
if ($fp) { event_socket_request($fp, "api reloadacl"); }
|
if ($fp) { event_socket_request($fp, "api reloadacl"); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -98,7 +98,7 @@
|
|||||||
$switch_cmd = 'show channels as json';
|
$switch_cmd = 'show channels as json';
|
||||||
|
|
||||||
//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();
|
||||||
|
|
||||||
//send the event socket command and get the array
|
//send the event socket command and get the array
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
|
|||||||
@@ -225,7 +225,7 @@
|
|||||||
if ($fax_status == 'waiting' || $fax_status == 'trying' || $fax_status == 'busy') {
|
if ($fax_status == 'waiting' || $fax_status == 'trying' || $fax_status == 'busy') {
|
||||||
|
|
||||||
//create event socket handle
|
//create event socket handle
|
||||||
$fp = event_socket_create($setting->get('switch','event_socket_ip_address'), $setting->get('switch','event_socket_port'), $setting->get('switch','event_socket_password'));
|
$fp = event_socket_create();
|
||||||
if (!$fp) {
|
if (!$fp) {
|
||||||
echo "Could not connect to event socket.\n";
|
echo "Could not connect to event socket.\n";
|
||||||
exit;
|
exit;
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
//connect to the event socket
|
//connect to the event socket
|
||||||
//$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
//$fp = event_socket_create();
|
||||||
//send the command over event socket
|
//send the command over event socket
|
||||||
//if ($fp) {
|
//if ($fp) {
|
||||||
// $switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
// $switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
|
|
||||||
$switch_cmd = 'fifo list_verbose '.$fifo_name.'';
|
$switch_cmd = 'fifo list_verbose '.$fifo_name.'';
|
||||||
|
|
||||||
$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) {
|
||||||
$msg = "<div align='center'>Connection to Event Socket failed.<br /></div>";
|
$msg = "<div align='center'>Connection to Event Socket failed.<br /></div>";
|
||||||
echo "<div align='center'>\n";
|
echo "<div align='center'>\n";
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
//show the list
|
//show the list
|
||||||
$switch_cmd = 'fifo list';
|
$switch_cmd = 'fifo list';
|
||||||
$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) {
|
||||||
$xml_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
|
$xml_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -143,7 +143,7 @@
|
|||||||
save_gateway_xml();
|
save_gateway_xml();
|
||||||
|
|
||||||
//clear the cache
|
//clear the cache
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create();
|
||||||
$hostname = trim(event_socket_request($fp, 'api switchname'));
|
$hostname = trim(event_socket_request($fp, 'api switchname'));
|
||||||
$cache = new cache;
|
$cache = new cache;
|
||||||
$cache->delete("configuration:sofia.conf:".$hostname);
|
$cache->delete("configuration:sofia.conf:".$hostname);
|
||||||
|
|||||||
@@ -227,14 +227,14 @@
|
|||||||
save_gateway_xml();
|
save_gateway_xml();
|
||||||
|
|
||||||
//clear the cache
|
//clear the cache
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create();
|
||||||
$hostname = trim(event_socket_request($fp, 'api switchname'));
|
$hostname = trim(event_socket_request($fp, 'api switchname'));
|
||||||
$cache = new cache;
|
$cache = new cache;
|
||||||
$cache->delete("configuration:sofia.conf:".$hostname);
|
$cache->delete("configuration:sofia.conf:".$hostname);
|
||||||
|
|
||||||
//rescan the external profile to look for new or stopped gateways
|
//rescan the external profile to look for new or stopped gateways
|
||||||
//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();
|
||||||
$tmp_cmd = 'api sofia profile external rescan';
|
$tmp_cmd = 'api sofia profile external rescan';
|
||||||
$response = event_socket_request($fp, $tmp_cmd);
|
$response = event_socket_request($fp, $tmp_cmd);
|
||||||
unset($tmp_cmd);
|
unset($tmp_cmd);
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ if (!class_exists('gateways')) {
|
|||||||
|
|
||||||
if (!empty($gateways) && is_array($gateways) && @sizeof($gateways) != 0) {
|
if (!empty($gateways) && is_array($gateways) && @sizeof($gateways) != 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();
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
//start gateways
|
//start gateways
|
||||||
foreach ($gateways as $gateway_uuid => $gateway) {
|
foreach ($gateways as $gateway_uuid => $gateway) {
|
||||||
@@ -198,7 +198,7 @@ if (!class_exists('gateways')) {
|
|||||||
|
|
||||||
if (!empty($gateways) && is_array($gateways) && @sizeof($gateways) != 0) {
|
if (!empty($gateways) && is_array($gateways) && @sizeof($gateways) != 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();
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
//stop gateways
|
//stop gateways
|
||||||
foreach ($gateways as $gateway_uuid => $gateway) {
|
foreach ($gateways as $gateway_uuid => $gateway) {
|
||||||
@@ -275,7 +275,7 @@ if (!class_exists('gateways')) {
|
|||||||
|
|
||||||
//create the event socket connection
|
//create the event socket connection
|
||||||
if (!isset($fp)) {
|
if (!isset($fp)) {
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create();
|
||||||
}
|
}
|
||||||
|
|
||||||
//loop through gateways
|
//loop through gateways
|
||||||
@@ -321,7 +321,7 @@ if (!class_exists('gateways')) {
|
|||||||
|
|
||||||
//clear the cache
|
//clear the cache
|
||||||
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();
|
||||||
}
|
}
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
$hostname = trim(event_socket_request($fp, 'api switchname'));
|
$hostname = trim(event_socket_request($fp, 'api switchname'));
|
||||||
@@ -331,7 +331,7 @@ if (!class_exists('gateways')) {
|
|||||||
|
|
||||||
//rescan the sip profile to look for new or stopped gateways
|
//rescan the sip profile to look for new or stopped gateways
|
||||||
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();
|
||||||
}
|
}
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
//get distinct profiles from gateways
|
//get distinct profiles from gateways
|
||||||
@@ -452,14 +452,14 @@ if (!class_exists('gateways')) {
|
|||||||
save_gateway_xml();
|
save_gateway_xml();
|
||||||
|
|
||||||
//clear the cache
|
//clear the cache
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create();
|
||||||
$hostname = trim(event_socket_request($fp, 'api switchname'));
|
$hostname = trim(event_socket_request($fp, 'api switchname'));
|
||||||
$cache = new cache;
|
$cache = new cache;
|
||||||
$cache->delete("configuration:sofia.conf:".$hostname);
|
$cache->delete("configuration:sofia.conf:".$hostname);
|
||||||
|
|
||||||
//create the event socket connection
|
//create the event socket connection
|
||||||
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();
|
||||||
}
|
}
|
||||||
|
|
||||||
//rescan the sip profile to look for new or stopped gateways
|
//rescan the sip profile to look for new or stopped gateways
|
||||||
@@ -585,7 +585,7 @@ if (!class_exists('gateways')) {
|
|||||||
save_gateway_xml();
|
save_gateway_xml();
|
||||||
|
|
||||||
//clear the cache
|
//clear the cache
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create();
|
||||||
$hostname = trim(event_socket_request($fp, 'api switchname'));
|
$hostname = trim(event_socket_request($fp, 'api switchname'));
|
||||||
$cache = new cache;
|
$cache = new cache;
|
||||||
$cache->delete("configuration:sofia.conf:".$hostname);
|
$cache->delete("configuration:sofia.conf:".$hostname);
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//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();
|
||||||
|
|
||||||
//check connection status
|
//check connection status
|
||||||
$esl_alive = false;
|
$esl_alive = false;
|
||||||
|
|||||||
@@ -682,7 +682,7 @@ if (!class_exists('modules')) {
|
|||||||
//check the status of the module
|
//check the status of the module
|
||||||
public function active($name) {
|
public function active($name) {
|
||||||
if (!$this->fp) {
|
if (!$this->fp) {
|
||||||
$this->fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$this->fp = event_socket_create();
|
||||||
}
|
}
|
||||||
if ($this->fp) {
|
if ($this->fp) {
|
||||||
$cmd = "api module_exists ".$name;
|
$cmd = "api module_exists ".$name;
|
||||||
@@ -883,7 +883,7 @@ if (!class_exists('modules')) {
|
|||||||
|
|
||||||
if (is_array($modules) && @sizeof($modules) != 0) {
|
if (is_array($modules) && @sizeof($modules) != 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();
|
||||||
|
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
//control modules
|
//control modules
|
||||||
@@ -969,7 +969,7 @@ if (!class_exists('modules')) {
|
|||||||
if (is_array($array) && @sizeof($array) != 0) {
|
if (is_array($array) && @sizeof($array) != 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();
|
||||||
|
|
||||||
//stop modules
|
//stop modules
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
@@ -1069,7 +1069,7 @@ if (!class_exists('modules')) {
|
|||||||
unset($array);
|
unset($array);
|
||||||
|
|
||||||
//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();
|
||||||
|
|
||||||
//stop modules if active
|
//stop modules if active
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ if (!class_exists('switch_music_on_hold')) {
|
|||||||
|
|
||||||
public function reload() {
|
public function reload() {
|
||||||
//if the handle does not exist create it
|
//if the handle does not exist create it
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create();
|
||||||
//if the handle still does not exist show an error message
|
//if the handle still does not exist show an error message
|
||||||
if (!$fp) {
|
if (!$fp) {
|
||||||
$msg = "<div align='center'>".$text['message-event-socket']."<br /></div>";
|
$msg = "<div align='center'>".$text['message-event-socket']."<br /></div>";
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
$rdr = $_GET['rdr'];
|
$rdr = $_GET['rdr'];
|
||||||
|
|
||||||
//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();
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
//reloadxml
|
//reloadxml
|
||||||
if ($cmd == "api reloadxml") {
|
if ($cmd == "api reloadxml") {
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ if (!class_exists('sip_profiles')) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($empty_hostname) {
|
if ($empty_hostname) {
|
||||||
$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) {
|
||||||
$hostnames[] = event_socket_request($fp, 'api switchname');
|
$hostnames[] = event_socket_request($fp, 'api switchname');
|
||||||
}
|
}
|
||||||
@@ -237,7 +237,7 @@ if (!class_exists('sip_profiles')) {
|
|||||||
|
|
||||||
//get system hostname if necessary
|
//get system hostname if necessary
|
||||||
if (empty($sip_profile_hostname)) {
|
if (empty($sip_profile_hostname)) {
|
||||||
$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) {
|
||||||
$sip_profile_hostname = event_socket_request($fp, 'api switchname');
|
$sip_profile_hostname = event_socket_request($fp, 'api switchname');
|
||||||
}
|
}
|
||||||
@@ -315,7 +315,7 @@ if (!class_exists('sip_profiles')) {
|
|||||||
|
|
||||||
//get system hostname if necessary
|
//get system hostname if necessary
|
||||||
if (empty($sip_profile_hostname)) {
|
if (empty($sip_profile_hostname)) {
|
||||||
$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) {
|
||||||
$sip_profile_hostname = event_socket_request($fp, 'api switchname');
|
$sip_profile_hostname = event_socket_request($fp, 'api switchname');
|
||||||
}
|
}
|
||||||
@@ -403,7 +403,7 @@ if (!class_exists('sip_profiles')) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($empty_hostname) {
|
if ($empty_hostname) {
|
||||||
$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) {
|
||||||
$hostnames[] = event_socket_request($fp, 'api switchname');
|
$hostnames[] = event_socket_request($fp, 'api switchname');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -247,7 +247,7 @@
|
|||||||
|
|
||||||
//get the hostname
|
//get the hostname
|
||||||
if ($sip_profile_hostname == '') {
|
if ($sip_profile_hostname == '') {
|
||||||
$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) {
|
||||||
$sip_profile_hostname = event_socket_request($fp, 'api switchname');
|
$sip_profile_hostname = event_socket_request($fp, 'api switchname');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,7 +91,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//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();
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
//if reloadxml then run reloadacl, reloadxml and rescan the external profile for new gateways
|
//if reloadxml then run reloadacl, reloadxml and rescan the external profile for new gateways
|
||||||
if (isset($command)) {
|
if (isset($command)) {
|
||||||
|
|||||||
@@ -43,8 +43,7 @@
|
|||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//create event socket
|
//create event socket
|
||||||
$socket_ip = $_SESSION['event_socket_ip_address'] != '0.0.0.0' ? $_SESSION['event_socket_ip_address'] : '127.0.0.1';
|
$fp = event_socket_create();
|
||||||
$fp = event_socket_create($socket_ip, $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
|
||||||
if (!$fp) {
|
if (!$fp) {
|
||||||
message::add($text['error-event-socket'], 'negative', 5000);
|
message::add($text['error-event-socket'], 'negative', 5000);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ if (!class_exists('presence')) {
|
|||||||
* @var string $presence_id
|
* @var string $presence_id
|
||||||
*/
|
*/
|
||||||
public function active($presence_id) {
|
public function active($presence_id) {
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create();
|
||||||
$cmd = 'show calls as json';
|
$cmd = 'show calls as json';
|
||||||
$json = event_socket_request($fp, 'api '.$cmd);
|
$json = event_socket_request($fp, 'api '.$cmd);
|
||||||
unset($fp);
|
unset($fp);
|
||||||
@@ -65,7 +65,7 @@ if (!class_exists('presence')) {
|
|||||||
* show presence
|
* show presence
|
||||||
*/
|
*/
|
||||||
public function show() {
|
public function show() {
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create();
|
||||||
$cmd = 'show calls as json';
|
$cmd = 'show calls as json';
|
||||||
$json = event_socket_request($fp, 'api '.$cmd);
|
$json = event_socket_request($fp, 'api '.$cmd);
|
||||||
unset($fp);
|
unset($fp);
|
||||||
|
|||||||
@@ -595,7 +595,7 @@
|
|||||||
|
|
||||||
//send the message waiting status
|
//send the message waiting status
|
||||||
|
|
||||||
$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 = "luarun app.lua voicemail mwi ".$this->voicemail_id."@".$_SESSION['domain_name'];
|
$switch_cmd = "luarun app.lua voicemail mwi ".$this->voicemail_id."@".$_SESSION['domain_name'];
|
||||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ Mark J Crane <markjcrane@fusionpbx.com>
|
|||||||
$web_server = $_SERVER['SERVER_SOFTWARE'];
|
$web_server = $_SERVER['SERVER_SOFTWARE'];
|
||||||
|
|
||||||
// switch version
|
// switch version
|
||||||
$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_result = event_socket_request($fp, 'api version');
|
$switch_result = event_socket_request($fp, 'api version');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -573,14 +573,14 @@
|
|||||||
|
|
||||||
//update the user_status
|
//update the user_status
|
||||||
if (isset($call_center_agent_uuid) && is_uuid($call_center_agent_uuid) && !empty($user_status)) {
|
if (isset($call_center_agent_uuid) && is_uuid($call_center_agent_uuid) && !empty($user_status)) {
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create();
|
||||||
$switch_cmd = "callcenter_config agent set status ".$call_center_agent_uuid." '".$user_status."'";
|
$switch_cmd = "callcenter_config agent set status ".$call_center_agent_uuid." '".$user_status."'";
|
||||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
//update the user state
|
//update the user state
|
||||||
if (isset($call_center_agent_uuid) && is_uuid($call_center_agent_uuid)) {
|
if (isset($call_center_agent_uuid) && is_uuid($call_center_agent_uuid)) {
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create();
|
||||||
$cmd = "api callcenter_config agent set state ".$call_center_agent_uuid." Waiting";
|
$cmd = "api callcenter_config agent set state ".$call_center_agent_uuid." Waiting";
|
||||||
$response = event_socket_request($fp, $cmd);
|
$response = event_socket_request($fp, $cmd);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class cache {
|
|||||||
//save to memcache
|
//save to memcache
|
||||||
if ($_SESSION['cache']['method']['text'] == "memcache") {
|
if ($_SESSION['cache']['method']['text'] == "memcache") {
|
||||||
//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();
|
||||||
if ($fp === false) {
|
if ($fp === false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -64,7 +64,7 @@ class cache {
|
|||||||
//cache method memcache
|
//cache method memcache
|
||||||
if ($_SESSION['cache']['method']['text'] == "memcache") {
|
if ($_SESSION['cache']['method']['text'] == "memcache") {
|
||||||
// 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();
|
||||||
if ($fp === false) {
|
if ($fp === false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -106,7 +106,7 @@ class cache {
|
|||||||
//cache method memcache
|
//cache method memcache
|
||||||
if (!empty($_SESSION['cache']['method']['text']) && $_SESSION['cache']['method']['text'] == "memcache") {
|
if (!empty($_SESSION['cache']['method']['text']) && $_SESSION['cache']['method']['text'] == "memcache") {
|
||||||
//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();
|
||||||
if ($fp === false) {
|
if ($fp === false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -133,7 +133,7 @@ class cache {
|
|||||||
$key = str_replace(":", ".", $key);
|
$key = str_replace(":", ".", $key);
|
||||||
|
|
||||||
//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();
|
||||||
if ($fp === false) {
|
if ($fp === false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -174,7 +174,7 @@ class cache {
|
|||||||
//cache method memcache
|
//cache method memcache
|
||||||
if ($_SESSION['cache']['method']['text'] == "memcache") {
|
if ($_SESSION['cache']['method']['text'] == "memcache") {
|
||||||
// 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();
|
||||||
if ($fp === false) {
|
if ($fp === false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -198,7 +198,7 @@ class cache {
|
|||||||
//cache method file
|
//cache method file
|
||||||
if ($_SESSION['cache']['method']['text'] == "file") {
|
if ($_SESSION['cache']['method']['text'] == "file") {
|
||||||
// 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();
|
||||||
if ($fp === false) {
|
if ($fp === false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -715,7 +715,7 @@
|
|||||||
function switch_module_is_running($fp, $mod) {
|
function switch_module_is_running($fp, $mod) {
|
||||||
if (!$fp) {
|
if (!$fp) {
|
||||||
//if the handle does not exist create it
|
//if the handle does not exist create it
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create();
|
||||||
//if the handle still does not exist show an error message
|
//if the handle still does not exist show an error message
|
||||||
if (!$fp) {
|
if (!$fp) {
|
||||||
$msg = "<div align='center'>Connection to Event Socket failed.<br /></div>";
|
$msg = "<div align='center'>Connection to Event Socket failed.<br /></div>";
|
||||||
@@ -1859,7 +1859,7 @@ function number_pad($number,$n) {
|
|||||||
//make directory with event socket
|
//make directory with event socket
|
||||||
function event_socket_mkdir($dir) {
|
function event_socket_mkdir($dir) {
|
||||||
//connect to fs
|
//connect to fs
|
||||||
$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) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -2169,7 +2169,7 @@ function number_pad($number,$n) {
|
|||||||
if (!function_exists('user_exists')) {
|
if (!function_exists('user_exists')) {
|
||||||
function user_exists($login, $domain_name = null) {
|
function user_exists($login, $domain_name = null) {
|
||||||
//connect to freeswitch
|
//connect to freeswitch
|
||||||
$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) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//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();
|
||||||
//reload the access control list this also runs reloadxml
|
//reload the access control list this also runs reloadxml
|
||||||
$response = event_socket_request($fp, 'api reloadxml');
|
$response = event_socket_request($fp, 'api reloadxml');
|
||||||
$_SESSION["reload_xml"] = '';
|
$_SESSION["reload_xml"] = '';
|
||||||
|
|||||||
Reference in New Issue
Block a user