cdr add call flow summary (#5454)
This commit is contained in:
@@ -819,6 +819,27 @@ $text['label-summary']['ru-ru'] = "Сводка";
|
|||||||
$text['label-summary']['sv-se'] = "Summa";
|
$text['label-summary']['sv-se'] = "Summa";
|
||||||
$text['label-summary']['uk-ua'] = "";
|
$text['label-summary']['uk-ua'] = "";
|
||||||
|
|
||||||
|
$text['label-call_flow_summary']['en-us'] = "Call Flow Summary";
|
||||||
|
$text['label-call_flow_summary']['en-gb'] = "";
|
||||||
|
$text['label-call_flow_summary']['ar-eg'] = "";
|
||||||
|
$text['label-call_flow_summary']['de-at'] = ""; //copied from de-de
|
||||||
|
$text['label-call_flow_summary']['de-ch'] = ""; //copied from de-de
|
||||||
|
$text['label-call_flow_summary']['de-de'] = "";
|
||||||
|
$text['label-call_flow_summary']['es-cl'] = "";
|
||||||
|
$text['label-call_flow_summary']['es-mx'] = ""; //copied from es-cl
|
||||||
|
$text['label-call_flow_summary']['fr-ca'] = ""; //copied from fr-fr
|
||||||
|
$text['label-call_flow_summary']['fr-fr'] = "";
|
||||||
|
$text['label-call_flow_summary']['he-il'] = "";
|
||||||
|
$text['label-call_flow_summary']['it-it'] = "";
|
||||||
|
$text['label-call_flow_summary']['nl-nl'] = "";
|
||||||
|
$text['label-call_flow_summary']['pl-pl'] = "";
|
||||||
|
$text['label-call_flow_summary']['pt-br'] = ""; //copied from pt-pt
|
||||||
|
$text['label-call_flow_summary']['pt-pt'] = "";
|
||||||
|
$text['label-call_flow_summary']['ro-ro'] = "";
|
||||||
|
$text['label-call_flow_summary']['ru-ru'] = "";
|
||||||
|
$text['label-call_flow_summary']['sv-se'] = "";
|
||||||
|
$text['label-call_flow_summary']['uk-ua'] = "";
|
||||||
|
|
||||||
$text['label-status']['en-us'] = "Status";
|
$text['label-status']['en-us'] = "Status";
|
||||||
$text['label-status']['en-gb'] = "Status";
|
$text['label-status']['en-gb'] = "Status";
|
||||||
$text['label-status']['ar-eg'] = "";
|
$text['label-status']['ar-eg'] = "";
|
||||||
|
|||||||
@@ -169,6 +169,18 @@
|
|||||||
}
|
}
|
||||||
$caller_id_name = urldecode($row["caller_profile"]["caller_id_name"]);
|
$caller_id_name = urldecode($row["caller_profile"]["caller_id_name"]);
|
||||||
$caller_id_number = urldecode($row["caller_profile"]["caller_id_number"]);
|
$caller_id_number = urldecode($row["caller_profile"]["caller_id_number"]);
|
||||||
|
|
||||||
|
$call_flow_summary[$x]["destination_number"] = urldecode($row["caller_profile"]["destination_number"]);
|
||||||
|
$tmp_start_stamp = urldecode($row["times"]["profile_created_time"]) / 1000000;
|
||||||
|
if ($x == 0) {
|
||||||
|
$tmp_end_stamp = urldecode($row["times"]["hangup_time"]) / 1000000;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$tmp_end_stamp = urldecode($row["times"]["transfer_time"]) / 1000000;
|
||||||
|
}
|
||||||
|
$call_flow_summary[$x]["start_stamp"] = date("Y-m-d H:i:s", $tmp_start_stamp);
|
||||||
|
$call_flow_summary[$x]["end_stamp"] = date("Y-m-d H:i:s", $tmp_end_stamp);
|
||||||
|
$call_flow_summary[$x]["duration"] = gmdate("G:i:s", $tmp_end_stamp - $tmp_start_stamp);
|
||||||
$x++;
|
$x++;
|
||||||
}
|
}
|
||||||
unset($x);
|
unset($x);
|
||||||
@@ -238,6 +250,34 @@
|
|||||||
echo "</table>";
|
echo "</table>";
|
||||||
echo "<br /><br />\n";
|
echo "<br /><br />\n";
|
||||||
|
|
||||||
|
echo "</table>\n";
|
||||||
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
|
echo "<tr>\n";
|
||||||
|
echo "<td align='left'><b>".$text['label-call_flow_summary']."</b> </td>\n";
|
||||||
|
echo "<td></td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
echo "</table>\n";
|
||||||
|
|
||||||
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
|
echo "<tr>\n";
|
||||||
|
echo "<th>".$text['label-destination']."</th>\n";
|
||||||
|
echo "<th>".$text['label-start']."</th>\n";
|
||||||
|
echo "<th>".$text['table-end']."</th>\n";
|
||||||
|
echo "<th>".$text['label-duration']."</th>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
|
||||||
|
foreach (array_reverse($call_flow_summary) as $row) {
|
||||||
|
echo "<tr >\n";
|
||||||
|
echo " <td valign='top' class='".$row_style[$c]."'>".escape($row["destination_number"])."</td>\n";
|
||||||
|
echo " <td valign='top' class='".$row_style[$c]."'>".escape($row["start_stamp"])."</td>\n";
|
||||||
|
echo " <td valign='top' class='".$row_style[$c]."'>".escape($row["end_stamp"])."</td>\n";
|
||||||
|
echo " <td valign='top' class='".$row_style[$c]."'>".escape($row["duration"])."</td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
$c = $c ? 0 : 1;
|
||||||
|
}
|
||||||
|
echo "</table>";
|
||||||
|
echo "<br /><br />\n";
|
||||||
|
|
||||||
//channel data loop
|
//channel data loop
|
||||||
$c = 0;
|
$c = 0;
|
||||||
$row_style["0"] = "row_style0";
|
$row_style["0"] = "row_style0";
|
||||||
|
|||||||
Reference in New Issue
Block a user