diff --git a/app/xml_cdr/xml_cdr.php b/app/xml_cdr/xml_cdr.php index fb139285fd..d4a1512645 100644 --- a/app/xml_cdr/xml_cdr.php +++ b/app/xml_cdr/xml_cdr.php @@ -823,7 +823,10 @@ } $content .= "\n"; - + //show agent originated legs only to those with the permission + if (!permission_exists('xml_cdr_cc_agent_leg') && $row['cc_side'] == "agent") { + $content = ''; + } //show the leg b only to those with the permission if ($row['leg'] == 'a') { echo $content; diff --git a/app/xml_cdr/xml_cdr_inc.php b/app/xml_cdr/xml_cdr_inc.php index 619a7455e4..9e34896f7d 100644 --- a/app/xml_cdr/xml_cdr_inc.php +++ b/app/xml_cdr/xml_cdr_inc.php @@ -413,7 +413,7 @@ $sql .= "and billsec like :billsec "; $parameters['billsec'] = '%'.$billsec.'%'; } - if (strlen($hangup_cause) > 0 && $hangup_cause != 'LOSE_RACE') { + if (strlen($hangup_cause) > 0) { $sql .= "and hangup_cause like :hangup_cause "; $parameters['hangup_cause'] = '%'.$hangup_cause.'%'; } @@ -515,10 +515,6 @@ $sql .= "and (c.record_path is null or c.record_name is null) "; } } - //show agent originated legs only to those with the permission - if (!permission_exists('xml_cdr_cc_agent_leg')) { - $sql .= "and cc_side != 'agent' "; - } //end where if (strlen($order_by) > 0) { $sql .= order_by($order_by, $order);