Apply latest call center change to the dev branch.
This commit is contained in:
parent
ec9f6e025c
commit
ba7434aace
|
|
@ -113,8 +113,13 @@ else {
|
||||||
if (if_group("admin") || if_group("superadmin")) {
|
if (if_group("admin") || if_group("superadmin")) {
|
||||||
echo "<th>Options</th>\n";
|
echo "<th>Options</th>\n";
|
||||||
}
|
}
|
||||||
|
echo "<th>Agent</th>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
|
$q_waiting=0;
|
||||||
|
$q_trying=0;
|
||||||
|
$q_answered=0;
|
||||||
|
|
||||||
foreach ($result as $row) {
|
foreach ($result as $row) {
|
||||||
$switch_cmd = 'uuid_exists '.$row['session_uuid'];
|
$switch_cmd = 'uuid_exists '.$row['session_uuid'];
|
||||||
if (trim(event_socket_request($fp, 'api '.$switch_cmd)) == "true") {
|
if (trim(event_socket_request($fp, 'api '.$switch_cmd)) == "true") {
|
||||||
|
|
@ -122,8 +127,8 @@ else {
|
||||||
$system = $row['system'];
|
$system = $row['system'];
|
||||||
$uuid = $row['uuid'];
|
$uuid = $row['uuid'];
|
||||||
$session_uuid = $row['session_uuid'];
|
$session_uuid = $row['session_uuid'];
|
||||||
$caller_number = $row['caller_number'];
|
$caller_number = $row['cid_number'];
|
||||||
$caller_name = $row['caller_name'];
|
$caller_name = $row['cid_name'];
|
||||||
$system_epoch = $row['system_epoch'];
|
$system_epoch = $row['system_epoch'];
|
||||||
$joined_epoch = $row['joined_epoch'];
|
$joined_epoch = $row['joined_epoch'];
|
||||||
$rejoined_epoch = $row['rejoined_epoch'];
|
$rejoined_epoch = $row['rejoined_epoch'];
|
||||||
|
|
@ -134,6 +139,9 @@ else {
|
||||||
$serving_agent = $row['serving_agent'];
|
$serving_agent = $row['serving_agent'];
|
||||||
$serving_system = $row['serving_system'];
|
$serving_system = $row['serving_system'];
|
||||||
$state = $row['state'];
|
$state = $row['state'];
|
||||||
|
if ($state=="Trying") {$q_trying = $q_trying + 1;}
|
||||||
|
if ($state=="Waiting") {$q_waiting = $q_waiting + 1;}
|
||||||
|
if ($state=="Answered") {$q_answered = $q_answered + 1;}
|
||||||
|
|
||||||
$joined_seconds = time() - $joined_epoch;
|
$joined_seconds = time() - $joined_epoch;
|
||||||
$joined_length_hour = floor($joined_seconds/3600);
|
$joined_length_hour = floor($joined_seconds/3600);
|
||||||
|
|
@ -159,9 +167,22 @@ else {
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".$state."</td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".$state."</td>\n";
|
||||||
if (if_group("admin") || if_group("superadmin")) {
|
if (if_group("admin") || if_group("superadmin")) {
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>";
|
echo "<td valign='top' class='".$row_style[$c]."'>";
|
||||||
echo " <a href='javascript:void(0);' style='color: #444444;' onclick=\"confirm_response = confirm('Do you really want to do this?');if (confirm_response){send_cmd('v_call_center_exec.php?cmd=originate+user/".$_SESSION['user']['extension']['user'][0]."+%26eavesdrop(".$uuid.")');}\">eavesdrop</a> \n";
|
|
||||||
|
$orig_command="{origination_caller_id_name=eavesdrop,origination_caller_id_number=".$caller_number."}user/".$_SESSION['user']['extension'][0]['user']."@".$_SESSION['domain_name']." %26eavesdrop(".$session_uuid.")";
|
||||||
|
|
||||||
|
//url encode any plus signs in caller id
|
||||||
|
$orig_command = str_replace("+", "%2B", $orig_command);
|
||||||
|
|
||||||
|
//debug
|
||||||
|
//echo $orig_command;
|
||||||
|
//echo " <a href='javascript:void(0);' style='color: #444444;' onclick=\"confirm_response = confirm('Do you really want to do this?');if (confirm_response){send_cmd('v_call_center_exec.php?cmd=log+".$orig_command.")');}\">log_cmd</a> \n";
|
||||||
|
|
||||||
|
echo " <a href='javascript:void(0);' style='color: #444444;' onclick=\"confirm_response = confirm('Do you really want to do this?');if (confirm_response){send_cmd('v_call_center_exec.php?cmd=originate+".$orig_command.")');}\">eavesdrop</a> \n";
|
||||||
|
|
||||||
|
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
}
|
}
|
||||||
|
echo "<td valign='top' class='".$row_style[$c]."'>".$serving_agent." </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
if ($c==0) { $c=1; } else { $c=0; }
|
if ($c==0) { $c=1; } else { $c=0; }
|
||||||
} //end if uuid_exists
|
} //end if uuid_exists
|
||||||
|
|
@ -292,7 +313,9 @@ else {
|
||||||
|
|
||||||
if ($c==0) { $c=1; } else { $c=0; }
|
if ($c==0) { $c=1; } else { $c=0; }
|
||||||
}
|
}
|
||||||
echo "</table>\n";
|
echo "</table>\n\n";
|
||||||
|
echo "</br>";
|
||||||
|
echo "<b>Total Waiting is {$q_waiting}. Total Trying is {$q_trying}. Total Answered is {$q_answered}.\n</b>";
|
||||||
|
|
||||||
//add vertical spacing
|
//add vertical spacing
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue