Operator Panel: Implemented additional permissions, Added ability to eavesdrop.
This commit is contained in:
@@ -93,7 +93,7 @@ require_once "resources/header.php";
|
||||
var url = source_url;
|
||||
url += '&vd_ext_from=' + document.getElementById('vd_ext_from').value;
|
||||
url += '&vd_ext_to=' + document.getElementById('vd_ext_to').value;
|
||||
url += '&group=' + ((document.getElementById('group')) ? document.getElementById('group').options[document.getElementById('group').selectedIndex].value : '');
|
||||
url += '&group=' + ((document.getElementById('group')) ? document.getElementById('group').value : '');
|
||||
<?php
|
||||
if (isset($_GET['debug'])) {
|
||||
echo "url += '&debug';";
|
||||
@@ -174,7 +174,7 @@ require_once "resources/header.php";
|
||||
url = source_url;
|
||||
url += '&vd_ext_from=' + document.getElementById('vd_ext_from').value;
|
||||
url += '&vd_ext_to=' + document.getElementById('vd_ext_to').value;
|
||||
url += '&group=' + ((document.getElementById('group')) ? document.getElementById('group').options[document.getElementById('group').selectedIndex].value : '');
|
||||
url += '&group=' + ((document.getElementById('group')) ? document.getElementById('group').value : '');
|
||||
<?php
|
||||
if (isset($_GET['debug'])) {
|
||||
echo "url += '&debug';";
|
||||
@@ -203,6 +203,16 @@ require_once "resources/header.php";
|
||||
}
|
||||
}
|
||||
|
||||
//eavesdrop call
|
||||
function eavesdrop_call(ext, chan_uuid) {
|
||||
if (ext != '' && chan_uuid != '') {
|
||||
cmd = get_eavesdrop_cmd(ext, chan_uuid);
|
||||
if (cmd != '') {
|
||||
send_cmd('exec.php?cmd='+escape(cmd));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//used by call control and ajax refresh functions
|
||||
function send_cmd(url) {
|
||||
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
|
||||
@@ -241,6 +251,11 @@ require_once "resources/header.php";
|
||||
echo " return cmd;\n";
|
||||
echo "}\n";
|
||||
|
||||
echo "function get_eavesdrop_cmd(ext, chan_uuid) {\n";
|
||||
echo " cmd = \"bgapi originate {origination_caller_id_name=".$text['label-eavesdrop'].",origination_caller_id_number=\"+ext+\"}user/".$_SESSION['user']['extensions'][0]."@".$_SESSION['domain_name']." &eavesdrop(\"+chan_uuid+\")\";";
|
||||
echo " return cmd;\n";
|
||||
echo "}\n";
|
||||
|
||||
echo "function get_record_cmd(uuid) {\n";
|
||||
echo " cmd = \"uuid_record \"+uuid+\" start ".$_SESSION['switch']['recordings']['dir']."/archive/".date("Y")."/".date("M")."/".date("d")."/\"+uuid+\".wav\";\n";
|
||||
echo " return cmd;\n";
|
||||
@@ -426,6 +441,7 @@ require_once "resources/header.php";
|
||||
<?php
|
||||
|
||||
//create simple array of users own extensions
|
||||
unset($_SESSION['user']['extensions']);
|
||||
foreach ($_SESSION['user']['extension'] as $assigned_extensions) {
|
||||
$_SESSION['user']['extensions'][] = $assigned_extensions['user'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user