From 3a01537487f0d210ff73b32f68f08afe846059fa Mon Sep 17 00:00:00 2001 From: Greenbea Date: Tue, 12 Jan 2021 16:51:28 -0500 Subject: [PATCH] CDR add permision to hide call center agent legs Author: agree --- app/xml_cdr/app_config.php | 3 +++ app/xml_cdr/xml_cdr.php | 6 +++++- app/xml_cdr/xml_cdr_inc.php | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/xml_cdr/app_config.php b/app/xml_cdr/app_config.php index 2c16504e93..682505133b 100644 --- a/app/xml_cdr/app_config.php +++ b/app/xml_cdr/app_config.php @@ -197,6 +197,9 @@ $apps[$x]['permissions'][$y]['name'] = "xml_cdr_lose_race"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; + $apps[$x]['permissions'][$y]['name'] = "xml_cdr_cc_agent_side"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $y++; $apps[$x]['permissions'][$y]['name'] = "xml_cdr_archive"; //$apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; diff --git a/app/xml_cdr/xml_cdr.php b/app/xml_cdr/xml_cdr.php index 3de3cee14f..d3880e22be 100644 --- a/app/xml_cdr/xml_cdr.php +++ b/app/xml_cdr/xml_cdr.php @@ -820,10 +820,14 @@ $content .= "\n"; - //show the leg b only to those with the permission if (!permission_exists('xml_cdr_lose_race') && $row['hangup_cause'] == 'LOSE_RACE') { $content = ''; } + //show agent originated legs only to those with the permission + if (!permission_exists('xml_cdr_cc_agent_side') && $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 35d5c352ae..df1653fbb1 100644 --- a/app/xml_cdr/xml_cdr_inc.php +++ b/app/xml_cdr/xml_cdr_inc.php @@ -242,6 +242,7 @@ $sql .= "c.source_number, \n"; $sql .= "c.destination_number, \n"; $sql .= "c.leg, \n"; + $sql .= "c.cc_side, \n"; //$sql .= "(c.xml is not null or c.json is not null) as raw_data_exists, \n"; //$sql .= "c.json, \n"; if (is_array($_SESSION['cdr']['field'])) {