diff --git a/app/operator_panel/app_config.php b/app/basic_operator_panel/app_config.php similarity index 100% rename from app/operator_panel/app_config.php rename to app/basic_operator_panel/app_config.php diff --git a/app/operator_panel/app_languages.php b/app/basic_operator_panel/app_languages.php similarity index 100% rename from app/operator_panel/app_languages.php rename to app/basic_operator_panel/app_languages.php diff --git a/app/operator_panel/app_menu.php b/app/basic_operator_panel/app_menu.php similarity index 100% rename from app/operator_panel/app_menu.php rename to app/basic_operator_panel/app_menu.php diff --git a/app/operator_panel/autocomplete.php b/app/basic_operator_panel/autocomplete.php similarity index 100% rename from app/operator_panel/autocomplete.php rename to app/basic_operator_panel/autocomplete.php diff --git a/app/operator_panel/exec.php b/app/basic_operator_panel/exec.php similarity index 100% rename from app/operator_panel/exec.php rename to app/basic_operator_panel/exec.php diff --git a/app/operator_panel/index.php b/app/basic_operator_panel/index.php similarity index 100% rename from app/operator_panel/index.php rename to app/basic_operator_panel/index.php diff --git a/app/operator_panel/index_inc.php b/app/basic_operator_panel/index_inc.php similarity index 100% rename from app/operator_panel/index_inc.php rename to app/basic_operator_panel/index_inc.php diff --git a/app/operator_panel/resources/images/eavesdrop.png b/app/basic_operator_panel/resources/images/eavesdrop.png similarity index 100% rename from app/operator_panel/resources/images/eavesdrop.png rename to app/basic_operator_panel/resources/images/eavesdrop.png diff --git a/app/operator_panel/resources/images/inbound.png b/app/basic_operator_panel/resources/images/inbound.png similarity index 100% rename from app/operator_panel/resources/images/inbound.png rename to app/basic_operator_panel/resources/images/inbound.png diff --git a/app/operator_panel/resources/images/keypad_call.png b/app/basic_operator_panel/resources/images/keypad_call.png similarity index 100% rename from app/operator_panel/resources/images/keypad_call.png rename to app/basic_operator_panel/resources/images/keypad_call.png diff --git a/app/operator_panel/resources/images/keypad_transfer.png b/app/basic_operator_panel/resources/images/keypad_transfer.png similarity index 100% rename from app/operator_panel/resources/images/keypad_transfer.png rename to app/basic_operator_panel/resources/images/keypad_transfer.png diff --git a/app/operator_panel/resources/images/kill.png b/app/basic_operator_panel/resources/images/kill.png similarity index 100% rename from app/operator_panel/resources/images/kill.png rename to app/basic_operator_panel/resources/images/kill.png diff --git a/app/operator_panel/resources/images/outbound.png b/app/basic_operator_panel/resources/images/outbound.png similarity index 100% rename from app/operator_panel/resources/images/outbound.png rename to app/basic_operator_panel/resources/images/outbound.png diff --git a/app/operator_panel/resources/images/record.png b/app/basic_operator_panel/resources/images/record.png similarity index 100% rename from app/operator_panel/resources/images/record.png rename to app/basic_operator_panel/resources/images/record.png diff --git a/app/operator_panel/resources/images/recording.png b/app/basic_operator_panel/resources/images/recording.png similarity index 100% rename from app/operator_panel/resources/images/recording.png rename to app/basic_operator_panel/resources/images/recording.png diff --git a/app/operator_panel/resources/images/refresh_active.gif b/app/basic_operator_panel/resources/images/refresh_active.gif similarity index 100% rename from app/operator_panel/resources/images/refresh_active.gif rename to app/basic_operator_panel/resources/images/refresh_active.gif diff --git a/app/operator_panel/resources/images/refresh_paused.png b/app/basic_operator_panel/resources/images/refresh_paused.png similarity index 100% rename from app/operator_panel/resources/images/refresh_paused.png rename to app/basic_operator_panel/resources/images/refresh_paused.png diff --git a/app/operator_panel/resources/images/status_available.png b/app/basic_operator_panel/resources/images/status_available.png similarity index 100% rename from app/operator_panel/resources/images/status_available.png rename to app/basic_operator_panel/resources/images/status_available.png diff --git a/app/operator_panel/resources/images/status_available_on_demand.png b/app/basic_operator_panel/resources/images/status_available_on_demand.png similarity index 100% rename from app/operator_panel/resources/images/status_available_on_demand.png rename to app/basic_operator_panel/resources/images/status_available_on_demand.png diff --git a/app/operator_panel/resources/images/status_do_not_disturb.png b/app/basic_operator_panel/resources/images/status_do_not_disturb.png similarity index 100% rename from app/operator_panel/resources/images/status_do_not_disturb.png rename to app/basic_operator_panel/resources/images/status_do_not_disturb.png diff --git a/app/operator_panel/resources/images/status_logged_out.png b/app/basic_operator_panel/resources/images/status_logged_out.png similarity index 100% rename from app/operator_panel/resources/images/status_logged_out.png rename to app/basic_operator_panel/resources/images/status_logged_out.png diff --git a/app/operator_panel/resources/images/status_on_break.png b/app/basic_operator_panel/resources/images/status_on_break.png similarity index 100% rename from app/operator_panel/resources/images/status_on_break.png rename to app/basic_operator_panel/resources/images/status_on_break.png diff --git a/app/operator_panel/root.php b/app/basic_operator_panel/root.php similarity index 100% rename from app/operator_panel/root.php rename to app/basic_operator_panel/root.php diff --git a/app/operator_panel/resources/functions/get_call_activity.php b/app/operator_panel/resources/functions/get_call_activity.php deleted file mode 100644 index f1ae151fcb..0000000000 --- a/app/operator_panel/resources/functions/get_call_activity.php +++ /dev/null @@ -1,185 +0,0 @@ -prepare($sql); - $prep_statement->execute(); - $extensions = $prep_statement->fetchAll(PDO::FETCH_NAMED); - unset ($prep_statement, $sql); - - //store extension status by user uuid - if (isset($extensions)) foreach($extensions as &$row) { - if ($row['user_uuid'] != '') { - $ext_user_status[$row['user_uuid']] = $row['user_status']; - unset($row['user_status']); - } - } - - //send the command - $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); - if ($fp) { - $switch_cmd = 'show channels as json'; - $switch_result = event_socket_request($fp, 'api '.$switch_cmd); - $json_array = json_decode($switch_result, true); - } - - //build the response - $x = 0; - if (isset($extensions)) foreach($extensions as &$row) { - $user = $row['extension']; - if (strlen($row['number_alias']) >0 ) { - $user = $row['number_alias']; - } - - //add the extension details - $array[$x] = $row; - - //set the call detail defaults - $array[$x]["uuid"] = null; - $array[$x]["direction"] = null; - $array[$x]["created"] = null; - $array[$x]["created_epoch"] = null; - $array[$x]["name"] = null; - $array[$x]["state"] = null; - $array[$x]["cid_name"] = null; - $array[$x]["cid_num"] = null; - $array[$x]["ip_addr"] = null; - $array[$x]["dest"] = null; - $array[$x]["application"] = null; - $array[$x]["application_data"] = null; - $array[$x]["dialplan"] = null; - $array[$x]["context"] = null; - $array[$x]["read_codec"] = null; - $array[$x]["read_rate"] = null; - $array[$x]["read_bit_rate"] = null; - $array[$x]["write_codec"] = null; - $array[$x]["write_rate"] = null; - $array[$x]["write_bit_rate"] = null; - $array[$x]["secure"] = null; - $array[$x]["hostname"] = null; - $array[$x]["presence_id"] = null; - $array[$x]["presence_data"] = null; - $array[$x]["callstate"] = null; - $array[$x]["callee_name"] = null; - $array[$x]["callee_num"] = null; - $array[$x]["callee_direction"] = null; - $array[$x]["call_uuid"] = null; - $array[$x]["sent_callee_name"] = null; - $array[$x]["sent_callee_num"] = null; - $array[$x]["destination"] = null; - - //add the active call details - $found = false; - if (isset($json_array['rows'])) foreach($json_array['rows'] as &$field) { - $presence_id = $field['presence_id']; - $presence = explode("@", $presence_id); - $presence_id = $presence[0]; - $presence_domain = $presence[1]; - if ($user == $presence_id) { - if ($presence_domain == $_SESSION['domain_name']) { - $found = true; - break; - } - } - } - - //normalize the array - if ($found) { - $array[$x]["uuid"] = $field['uuid']; - $array[$x]["direction"] = $field['direction']; - $array[$x]["created"] = $field['created']; - $array[$x]["created_epoch"] = $field['created_epoch']; - $array[$x]["name"] = $field['name']; - $array[$x]["state"] = $field['state']; - $array[$x]["cid_name"] = $field['cid_name']; - $array[$x]["cid_num"] = $field['cid_num']; - $array[$x]["ip_addr"] = $field['ip_addr']; - $array[$x]["dest"] = $field['dest']; - $array[$x]["application"] = $field['application']; - $array[$x]["application_data"] = $field['application_data']; - $array[$x]["dialplan"] = $field['dialplan']; - $array[$x]["context"] = $field['context']; - $array[$x]["read_codec"] = $field['read_codec']; - $array[$x]["read_rate"] = $field['read_rate']; - $array[$x]["read_bit_rate"] = $field['read_bit_rate']; - $array[$x]["write_codec"] = $field['write_codec']; - $array[$x]["write_rate"] = $field['write_rate']; - $array[$x]["write_bit_rate"] = $field['write_bit_rate']; - $array[$x]["secure"] = $field['secure']; - $array[$x]["hostname"] = $field['hostname']; - $array[$x]["presence_id"] = $field['presence_id']; - $array[$x]["presence_data"] = $field['presence_data']; - $array[$x]["callstate"] = $field['callstate']; - $array[$x]["callee_name"] = $field['callee_name']; - $array[$x]["callee_num"] = $field['callee_num']; - $array[$x]["callee_direction"] = $field['callee_direction']; - $array[$x]["call_uuid"] = $field['call_uuid']; - $array[$x]["sent_callee_name"] = $field['sent_callee_name']; - $array[$x]["sent_callee_num"] = $field['sent_callee_num']; - $array[$x]["destination"] = $user; - - //calculate and set the call length - $call_length_seconds = time() - $array[$x]["created_epoch"]; - $call_length_hour = floor($call_length_seconds/3600); - $call_length_min = floor($call_length_seconds/60 - ($call_length_hour * 60)); - $call_length_sec = $call_length_seconds - (($call_length_hour * 3600) + ($call_length_min * 60)); - $call_length_min = sprintf("%02d", $call_length_min); - $call_length_sec = sprintf("%02d", $call_length_sec); - $call_length = $call_length_hour.':'.$call_length_min.':'.$call_length_sec; - $array[$x]['call_length'] = $call_length; - - //send the command - if ($field['state'] != '') { - if ($fp) { - $switch_cmd = 'uuid_dump '.$field['uuid'].' json'; - $dump_result = event_socket_request($fp, 'api '.$switch_cmd); - $dump_array = json_decode($dump_result, true); - if (isset($dump_array)) foreach ($dump_array as $dump_var_name => $dump_var_value) { - $array[$x][$dump_var_name] = $dump_var_value; - } - } - } - - } - - //increment the row - $x++; - } - - //reindex array using extension instead of auto-incremented value - $result = array(); - if (isset($array)) foreach ($array as $index => $subarray) { - $extension = $subarray['extension']; - if (isset($subarray)) foreach ($subarray as $field => $value) { - $result[$extension][$field] = $array[$index][$field]; - unset($array[$index][$field]); - } - unset($array[$subarray['extension']]['extension']); - unset($array[$index]); - } - - //return array - return $result; -} - -?>