Merge pull request #5769 from demonspork/cdr-statistics-missed-call-link

Fixed "Missed" link and exclude LOSE_RACE from CDR stats.
This commit is contained in:
FusionPBX
2021-02-16 22:04:26 -07:00
committed by GitHub
2 changed files with 5 additions and 1 deletions

View File

@@ -314,7 +314,7 @@
echo " <td>".escape($row['volume'])."&nbsp;</td>\n";
echo " <td>".(round(escape($row['minutes']),2))."&nbsp;</td>\n";
echo " <td>".(round(escape($row['avg_min']),2))."&nbsp;/&nbsp;".(round(escape($row['cpm_ans']),2))."&nbsp;</td>\n";
echo " <td class='center'><a href=\"xml_cdr.php?missed=true&direction=$direction&start_epoch=".escape($row['start_epoch'])."&stop_epoch=".escape($row['stop_epoch'])."\">".escape($row['missed'])."</a>&nbsp;</td>\n";
echo " <td class='center'><a href=\"xml_cdr.php?call_result=missed&direction=$direction&start_epoch=".escape($row['start_epoch'])."&stop_epoch=".escape($row['stop_epoch'])."\">".escape($row['missed'])."</a>&nbsp;</td>\n";
echo " <td>".(round(escape($row['asr']),2))."&nbsp;</td>\n";
echo " <td>".(round(escape($row['aloc']),2))."&nbsp;</td>\n";
echo "</tr >\n";

View File

@@ -280,6 +280,10 @@
$sql_where_ands[] = "leg = :leg";
$parameters['leg'] = $leg;
}
//If you can't see lose_race, don't run stats on it
if (!permission_exists('xml_cdr_lose_race')) {
$sql_where_ands[] = "hangup_cause != 'LOSE_RACE'";
}
//if not admin or superadmin, only show own calls
if (!permission_exists('xml_cdr_domain')) {