diff --git a/app/operator_panel/index_inc.php b/app/operator_panel/index_inc.php index a1579b9ec1..e28c3f4425 100644 --- a/app/operator_panel/index_inc.php +++ b/app/operator_panel/index_inc.php @@ -100,7 +100,7 @@ echo " "; if (permission_exists('operator_panel_eavesdrop')) { echo "
";
echo " \n";
}
else if (sizeof($_SESSION['user']['extensions']) == 1) {
- echo " ";
+ echo " ";
}
echo "
";
+ $block .= "
";
}
//kill
if (permission_exists('operator_panel_kill') || in_array($extension, $_SESSION['user']['extensions'])) {
diff --git a/app/operator_panel/resources/functions/get_call_activity.php b/app/operator_panel/resources/functions/get_call_activity.php
index 3490a159dd..fd3b224ca1 100644
--- a/app/operator_panel/resources/functions/get_call_activity.php
+++ b/app/operator_panel/resources/functions/get_call_activity.php
@@ -85,6 +85,7 @@ function get_call_activity() {
$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;
@@ -134,6 +135,7 @@ function get_call_activity() {
$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"];
diff --git a/resources/switch.php b/resources/switch.php
index 9ee5d78901..753639d677 100644
--- a/resources/switch.php
+++ b/resources/switch.php
@@ -83,8 +83,13 @@ function load_extensions() {
if (count($result) > 0) {
$x = 0;
foreach($result as $row) {
+ $destination = $row['extension'];
+ if (strlen($row['number_alias']) > 0) {
+ $destination = $row['number_alias'];
+ }
$_SESSION['user']['extension'][$x]['user'] = $row['extension'];
$_SESSION['user']['extension'][$x]['number_alias'] = $row['number_alias'];
+ $_SESSION['user']['extension'][$x]['destination'] = $destination;
$_SESSION['user']['extension'][$x]['extension_uuid'] = $row['extension_uuid'];
$_SESSION['user']['extension'][$x]['outbound_caller_id_name'] = $row['outbound_caller_id_name'];
$_SESSION['user']['extension'][$x]['outbound_caller_id_number'] = $row['outbound_caller_id_number'];