From f4378f8c2ddb51aa62ee1a4219e94e09b0df548f Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 21 Dec 2016 14:02:56 -0700 Subject: [PATCH] Update xml_cdr.php --- app/xml_cdr/resources/classes/xml_cdr.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/xml_cdr/resources/classes/xml_cdr.php b/app/xml_cdr/resources/classes/xml_cdr.php index 6abc96e56a..b790c2a047 100644 --- a/app/xml_cdr/resources/classes/xml_cdr.php +++ b/app/xml_cdr/resources/classes/xml_cdr.php @@ -142,6 +142,11 @@ if (!class_exists('xml_cdr')) { $this->fields[] = "hangup_cause"; $this->fields[] = "hangup_cause_q850"; $this->fields[] = "sip_hangup_disposition"; + if (is_array($_SESSION['cdr']['field'])) { + foreach ($_SESSION['cdr']['field'] as $field) { + $this->fields[] = $field; + } + } } /** @@ -342,6 +347,14 @@ if (!class_exists('xml_cdr')) { } } + //dynamic cdr fields + if (is_array($_SESSION['cdr']['field'])) { + foreach ($_SESSION['cdr']['field'] as $field) { + $this->fields[] = $field; + $this->array[$key][$field] = check_str(urldecode($xml->variables->$field)); + } + } + //send the domain name to the cdr log //$this->log("\ndomain_name is `$domain_name`; domain_uuid is '$domain_uuid'\n");