Operator Panel: Added ability to kill a call.

This commit is contained in:
Nate Jones 2014-12-04 07:09:02 +00:00
parent a61305f36c
commit cf448614f0
3 changed files with 27 additions and 3 deletions

View File

@ -51,7 +51,7 @@ require_once "resources/header.php";
<script type="text/javascript">
//ajax refresh
var refresh = 1200;
var refresh = 1950;
var source_url = 'index_inc.php?' <?php if (isset($_GET['debug'])) { echo " + '&debug'"; } ?>;
var interval_timer_id;
@ -174,10 +174,20 @@ require_once "resources/header.php";
if (destination != '') {
cmd = get_originate_cmd(from_ext+'@<?=$_SESSION["domain_name"]?>', destination); //make a call
}
if (cmd != '') { send_cmd('exec.php?cmd='+escape(cmd)); }
if (cmd != '') {
send_cmd('exec.php?cmd='+escape(cmd));
}
refresh_start();
}
//kill call
function kill_call(call_id) {
if (call_id != '') {
cmd = 'uuid_kill ' + call_id;
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

View File

@ -198,7 +198,21 @@ foreach ($activity as $extension => $ext) {
$block .= " </span><br>";
if ($ext_state != '') {
$block .= " <span class='caller_info'>";
$block .= " <table align='right'><tr><td><span class='call_info'>".$ext['call_length']."</span></td></tr></table>";
$block .= " <table align='right'><tr><td style='text-align: right;'>";
$block .= " <span class='call_info'>".$ext['call_length']."</span>";
if (in_array($extension, $_SESSION['user']['extensions'])) {
if ($ext['variable_bridge_uuid'] == '' && $ext_state == 'ringing') {
$call_identifier_kill = $ext['uuid'];
}
else if ($dir_icon == 'outbound') {
$call_identifier_kill = $ext['uuid'];
}
else {
$call_identifier_kill = $call_identifier;
}
$block .= " <br><img src='resources/images/kill.png' style='width: 12px; height: 12px; border: none; margin-top: 5px; cursor: pointer;' onclick=\"kill_call('".$call_identifier_kill."');\">";
}
$block .= " </td></tr></table>";
$block .= " <strong>".$call_name."</strong><br>".$call_number;
$block .= " </span>";
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 807 B