diff --git a/app/call_center_active/call_center_active_inc.php b/app/call_center_active/call_center_active_inc.php
index ff12884c63..cd153ecfc1 100644
--- a/app/call_center_active/call_center_active_inc.php
+++ b/app/call_center_active/call_center_active_inc.php
@@ -322,7 +322,7 @@
echo "
".$text['label-name']." | \n";
echo "".$text['label-number']." | \n";
echo "".$text['label-status']." | \n";
- if ((if_group("admin") || if_group("superadmin"))) {
+ if (permission_exists('call_center_active_options')) {
echo "".$text['label-options']." | \n";
}
echo "".$text['label-agent']." | \n";
@@ -370,11 +370,12 @@
echo "".escape($caller_name)." | \n";
echo "".escape($caller_number)." | \n";
echo "".escape($state)." | \n";
- if (if_group("admin") || if_group("superadmin")) {
+ if (permission_exists('call_center_active_options')) {
echo "";
if ($state != "Abandoned") {
$orig_command="{origination_caller_id_name=eavesdrop,origination_caller_id_number=".escape($q_caller_number)."}user/".escape($_SESSION['user']['extension'][0]['user'])."@".escape($_SESSION['domain_name'])." %26eavesdrop(".escape($session_uuid).")";
echo button::create(['type'=>'button','class'=>'link','label'=>$text['label-eavesdrop'],'onclick'=>"if (confirm('".$text['message-confirm']."')) { send_command('call_center_exec.php?command=eavesdrop&caller_id_number=".urlencode($caller_number)."&uuid=".urlencode($session_uuid)."'); } else { this.blur(); return false; }"]);
+ echo button::create(['type'=>'button','class'=>'link','label'=>$text['label-transfer'],'style'=>'margin-left: 15px;','onclick'=>"if (confirm('".$text['message-confirm']."')) { send_command('call_center_exec.php?command=uuid_pickup&uuid=".urlencode($session_uuid)."'); } else { this.blur(); return false; }"]);
}
else {
echo " ";
diff --git a/app/call_center_active/call_center_exec.php b/app/call_center_active/call_center_exec.php
index 094f2a243f..034cd5a878 100644
--- a/app/call_center_active/call_center_exec.php
+++ b/app/call_center_active/call_center_exec.php
@@ -36,7 +36,7 @@
require_once "resources/check_auth.php";
//check permissions
- if (permission_exists('call_center_active_view')) {
+ if (permission_exists('call_center_active_options')) {
//access granted
}
else {
@@ -81,6 +81,9 @@
case "uuid_transfer":
$switch_command = "uuid_transfer ".$uuid." -bleg ".$_SESSION['user']['extension'][0]['user']." XML ".$_SESSION['domain_name'];
break;
+ case "uuid_pickup":
+ $switch_command = "uuid_transfer ".$uuid." ".$_SESSION['user']['extension'][0]['user']." XML ".$_SESSION['domain_name'];
+ break;
case "bridge":
$switch_command = "originate {origination_caller_id_name=".$caller_id_name.",origination_caller_id_number=".$caller_id_number."}user/".$_SESSION['user']['extension'][0]['user']."@".$_SESSION['domain_name']." bridge(user/".$extension."@".$_SESSION['domain_name'].")";
break;
|