Active Calls: Removed broken Transfer, Park and Record options in favor the Operator Panel (Park functionality to eventually be added to the OP).
Operator Panel: Only superadmin group can view debug info.
This commit is contained in:
@@ -38,6 +38,9 @@ else {
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//include theme config for button images
|
||||
include_once("themes/".$_SESSION['domain']['template']['name']."/config.php");
|
||||
|
||||
//set the command
|
||||
$switch_cmd = 'show channels as json';
|
||||
|
||||
@@ -70,33 +73,20 @@ else {
|
||||
$row_style["1"] = "row_style1";
|
||||
|
||||
//show the results
|
||||
echo "<div id='cmd_reponse'>\n";
|
||||
echo "</div>\n";
|
||||
echo "<div id='cmd_reponse'></div>\n";
|
||||
|
||||
echo "<table width='100%' border='0' cellpadding='3' cellspacing='0'>\n";
|
||||
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
//echo "<th>ID</th>\n";
|
||||
//echo "<th>UUID</th>\n";
|
||||
//echo "<th>Dir</th>\n";
|
||||
echo "<th>".$text['label-profile']."</th>\n";
|
||||
echo "<th>".$text['label-created']."</th>\n";
|
||||
//echo "<th>Created Epoch</th>\n";
|
||||
//echo "<th>Name</th>\n";
|
||||
echo "<th>".$text['label-number']."</th>\n";
|
||||
//echo "<th>State</th>\n";
|
||||
echo "<th>".$text['label-cid-name']."</th>\n";
|
||||
echo "<th>".$text['label-cid-number']."</th>\n";
|
||||
//echo "<th>IP Addr</th>\n";
|
||||
echo "<th>".$text['label-destination']."</th>\n";
|
||||
echo "<th>".$text['label-app']."</th>\n";
|
||||
//echo "<th>Dialplan</th>\n";
|
||||
//echo "<th>Context</th>\n";
|
||||
echo "<th>".$text['label-codec']."</th>\n";
|
||||
//echo "<th>Read Rate</th>\n";
|
||||
//echo "<th>Write Codec</th>\n";
|
||||
//echo "<th>Write Rate</th>\n";
|
||||
echo "<th>".$text['label-secure']."</th>\n";
|
||||
echo "<th>".$text['label-opt']."</th>\n";
|
||||
echo "<td class='list_control_icon'></td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
foreach ($results["rows"] as $row) {
|
||||
@@ -104,6 +94,9 @@ else {
|
||||
foreach ($row as $key => $value) {
|
||||
$$key = $value;
|
||||
}
|
||||
if (if_group("superadmin") && isset($_REQUEST['debug'])) {
|
||||
echo "<tr><td colspan='20'><pre>".print_r($row, true)."</pre></td></tr>";
|
||||
}
|
||||
|
||||
//get the sip profile
|
||||
$name_array = explode("/", $name);
|
||||
@@ -119,58 +112,40 @@ else {
|
||||
$cid_num = str_replace("+", "", $cid_num);
|
||||
|
||||
echo "<tr>\n";
|
||||
//echo "<td valign='top' class='".$row_style[$c]."'>$id </td>\n";
|
||||
//echo "<td valign='top' class='".$row_style[$c]."'>$uuid </td>\n";
|
||||
//echo "<td valign='top' class='".$row_style[$c]."'>$direction </td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>$sip_profile </td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>$created </td>\n";
|
||||
//echo "<td valign='top' class='".$row_style[$c]."'>$created_epoch </td>\n";
|
||||
//echo "<td valign='top' class='".$row_style[$c]."'>$name </td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>".$sip_profile." </td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>".$created." </td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>".$tmp_number." </td>\n";
|
||||
//echo "<td valign='top' class='".$row_style[$c]."'>$state </td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>$cid_name </td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>$cid_num </td>\n";
|
||||
//echo "<td valign='top' class='".$row_style[$c]."'>$ip_addr </td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>$dest </td>\n";
|
||||
if (strlen($application) > 0) {
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>".$application.":".$application_data." </td>\n";
|
||||
}
|
||||
else {
|
||||
echo "<td valign='top' class='".$row_style[$c]."'> </td>\n";
|
||||
}
|
||||
//echo "<td valign='top' class='".$row_style[$c]."'>$dialplan </td>\n";
|
||||
//echo "<td valign='top' class='".$row_style[$c]."'>$context </td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>$read_codec:$read_rate / $write_codec:$write_rate </td>\n";
|
||||
//echo "<td valign='top' class='".$row_style[$c]."'>$read_rate </td>\n";
|
||||
//echo "<td valign='top' class='".$row_style[$c]."'>$write_codec </td>\n";
|
||||
//echo "<td valign='top' class='".$row_style[$c]."'>$write_rate </td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>$secure </td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."' style='text-align:center;'>\n";
|
||||
//transfer
|
||||
echo " <a href='javascript:void(0);' onMouseover=\"document.getElementById('form_label').innerHTML='<strong>".$text['label-transfer']."</strong>';\" onclick=\"send_cmd('calls_exec.php?cmd='+get_transfer_cmd(escape('$uuid')));\">".$text['label-transfer']."</a> \n";
|
||||
//park
|
||||
echo " <a href='javascript:void(0);' onclick=\"send_cmd('calls_exec.php?cmd='+get_park_cmd(escape('$uuid')));\">".$text['label-park']."</a> \n";
|
||||
//hangup
|
||||
echo " <a href='javascript:void(0);' onclick=\"confirm_response = confirm('".$text['confirm-hangup']."');if (confirm_response){send_cmd('calls_exec.php?cmd=uuid_kill%20'+(escape('$uuid')));}\">".$text['label-hangup']."</a> \n";
|
||||
//record start/stop
|
||||
$tmp_dir = $_SESSION['switch']['recordings']['dir']."/archive/".date("Y")."/".date("M")."/".date("d");
|
||||
mkdir($tmp_dir, 0777, true);
|
||||
$tmp_file = $tmp_dir."/".$uuid.".wav";
|
||||
if (file_exists($tmp_file)) {
|
||||
//stop
|
||||
echo " <a href='javascript:void(0);' style='color: #444444;' onclick=\"send_cmd('calls_exec.php?cmd='+get_record_cmd(escape('$uuid'), 'active_calls_', escape('$cid_num'))+'&uuid='+escape('$uuid')+'&action=record&action2=stop&prefix=active_calls_&name='+escape('$cid_num'));\">".$text['label-stop']."</a> \n";
|
||||
}
|
||||
else {
|
||||
//start
|
||||
echo " <a href='javascript:void(0);' style='color: #444444;' onclick=\"send_cmd('calls_exec.php?cmd='+get_record_cmd(escape('$uuid'), 'active_calls_', escape('$cid_num'))+'&uuid='+escape('$uuid')+'&action=record&action2=start&prefix=active_calls_');\">".$text['label-start']."</a> \n";
|
||||
}
|
||||
echo " ";
|
||||
echo "</td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>".$cid_name." </td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>".$cid_num." </td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>".$dest." </td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>".((strlen($application) > 0) ? $application.":".$application_data : null)." </td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>".$read_codec.":".$read_rate." / ".$write_codec.":".$write_rate." </td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>".$secure." </td>\n";
|
||||
echo "<td class='list_control_icons' style='width: 25px; text-align: left;'><a href='javascript:void(0);' alt='".$text['label-hangup']."' onclick=\"hangup(escape('".$uuid."'));\">".$v_link_label_delete."</a></td>\n";
|
||||
echo "</tr>\n";
|
||||
if ($c==0) { $c=1; } else { $c=0; }
|
||||
$c = ($c) ? 0 : 1;
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "</table>\n";
|
||||
}
|
||||
|
||||
/*
|
||||
// deprecated features for this page
|
||||
|
||||
//park
|
||||
echo " <a href='javascript:void(0);' onclick=\"send_cmd('calls_exec.php?cmd='+get_park_cmd(escape('$uuid'), '".$tmp_domain."'));\">".$text['label-park']."</a> \n";
|
||||
//record start/stop
|
||||
$tmp_dir = $_SESSION['switch']['recordings']['dir']."/archive/".date("Y")."/".date("M")."/".date("d");
|
||||
mkdir($tmp_dir, 0777, true);
|
||||
$tmp_file = $tmp_dir."/".$uuid.".wav";
|
||||
if (file_exists($tmp_file)) {
|
||||
//stop
|
||||
echo " <a href='javascript:void(0);' style='color: #444444;' onclick=\"send_cmd('calls_exec.php?cmd='+get_record_cmd(escape('$uuid'), 'active_calls_', escape('$cid_num'))+'&uuid='+escape('$uuid')+'&action=record&action2=stop&prefix=active_calls_&name='+escape('$cid_num'));\">".$text['label-stop']."</a> \n";
|
||||
}
|
||||
else {
|
||||
//start
|
||||
echo " <a href='javascript:void(0);' style='color: #444444;' onclick=\"send_cmd('calls_exec.php?cmd='+get_record_cmd(escape('$uuid'), 'active_calls_', escape('$cid_num'))+'&uuid='+escape('$uuid')+'&action=record&action2=start&prefix=active_calls_');\">".$text['label-start']."</a> \n";
|
||||
}
|
||||
*/
|
||||
?>
|
||||
Reference in New Issue
Block a user