diff --git a/app/basic_operator_panel/resources/content.php b/app/basic_operator_panel/resources/content.php index 52970acb53..fa35a1d8b0 100644 --- a/app/basic_operator_panel/resources/content.php +++ b/app/basic_operator_panel/resources/content.php @@ -69,6 +69,9 @@ $_SESSION['user']['extensions'] = array(); } +//get registrations -- All SIP profiles +$obj = new registrations; + $registrations = $obj->get("all"); $onhover_pause_refresh = " onmouseover='refresh_stop();' onmouseout='refresh_start();'"; @@ -150,7 +153,13 @@ if (is_array($groups) && @sizeof($groups) > 0) { } echo " "; } - +echo " "; +echo " "; +echo " "; +echo " \n"; +echo " \n"; +echo " "; +echo " "; echo " "; echo " "; @@ -165,6 +174,10 @@ if (is_array($activity)) foreach ($activity as $extension => $ext) { //filter by group, if defined if ($_REQUEST['group'] != '' && substr_count($ext['call_group'], $_REQUEST['group']) == 0 && !in_array($extension, $_SESSION['user']['extensions'])) { continue; } + //filter by extension or name, if defined + if ($_REQUEST['extension_filter'] != '' && substr_count($ext['extension'], $_REQUEST['extension_filter']) == 0 && !in_array($extension, $_SESSION['user']['extensions'])) { continue; } + if ($_REQUEST['name_filter'] != '' && substr_count($ext['filter_name'], $_REQUEST['name_filter']) == 0 && !in_array($extension, $_SESSION['user']['extensions'])) { continue; } + //check if feature code being called $format_number = (substr($ext['dest'], 0, 1) == '*') ? false : true; @@ -222,8 +235,23 @@ if (is_array($activity)) foreach ($activity as $extension => $ext) { unset($ext_state, $dir_icon, $call_name, $call_number); } - //determine block style by state (if any) - $style = ($ext_state != '') ? "op_state_".$ext_state : null; + //determin extension register status + $extension_number = $extension.'@'.$_SESSION['domain_name']; + $found_count = 0; + if (is_array($registrations)) { + foreach ($registrations as $array) { + if ($extension_number == $array['user']) { + $found_count++; + } + } + } + if ($found_count > 0) { + //determine block style by state (if any) and register status + $style = ($ext_state != '') ? "op_ext op_state_".$ext_state : "op_ext"; + } else { + $style = "off_ext"; + } + unset($extension_number, $found_count, $array); //determine the call identifier passed on drop if ($ext['uuid'] == $ext['call_uuid'] && $ext['variable_bridge_uuid'] == '') { // transfer an outbound internal call @@ -307,10 +335,10 @@ if (is_array($activity)) foreach ($activity as $extension => $ext) { default : $status_icon = "logged_out"; $status_hover = $text['label-status_logged_out_or_unknown']; - } + } - $block .= "
"; // DRAG TO - $block .= ""; + $block .= "
"; // DRAG TO + $block .= "
"; $block .= " "; $block .= "
"; $block .= " "; // DRAG FROM