[cdr] Add call stats to cdr details
This commit is contained in:
@@ -278,6 +278,44 @@
|
||||
echo "</table>";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
//call stats
|
||||
$c = 0;
|
||||
$row_style["0"] = "row_style0";
|
||||
$row_style["1"] = "row_style1";
|
||||
if (is_array($array["call-stats"])) {
|
||||
if (is_array($array["call-stats"]['audio'])) {
|
||||
foreach($array["call-stats"]['audio'] as $audio_direction => $stat) {
|
||||
echo " <table width='95%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td><b>".$text['label-call-stats'].": ".$audio_direction."</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 width='30%'>".$text['label-name']."</th>\n";
|
||||
echo " <th width='70%'>".$text['label-value']."</th>\n";
|
||||
echo " </tr>\n";
|
||||
foreach($stat as $key => $value) {
|
||||
if (is_array($value)) { $value = implode($value); }
|
||||
$value = urldecode($value);
|
||||
echo "<tr >\n";
|
||||
echo " <td valign='top' align='left' class='".$row_style[$c]."'>".escape($key)."</td>\n";
|
||||
echo " <td valign='top' align='left' class='".$row_style[$c]."'>".escape(wordwrap($value,75,"\n", true))." </td>\n";
|
||||
echo "</tr>\n";
|
||||
$c = $c ? 0 : 1;
|
||||
}
|
||||
echo " <tr>\n";
|
||||
echo " <td colspan='2'><br /><br /></td>\n";
|
||||
echo " </tr>\n";
|
||||
echo "</table>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "</table>";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
//channel data loop
|
||||
$c = 0;
|
||||
$row_style["0"] = "row_style0";
|
||||
|
||||
Reference in New Issue
Block a user