From 213de55ccc7670e5b5603b8ceb46fe187af09891 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 25 Oct 2016 18:05:55 -0600 Subject: [PATCH] Update xml_cdr.php --- app/xml_cdr/resources/classes/xml_cdr.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/xml_cdr/resources/classes/xml_cdr.php b/app/xml_cdr/resources/classes/xml_cdr.php index 89b15e26d3..1943551838 100644 --- a/app/xml_cdr/resources/classes/xml_cdr.php +++ b/app/xml_cdr/resources/classes/xml_cdr.php @@ -330,10 +330,17 @@ if (!class_exists('xml_cdr')) { $domain_name = check_str(urldecode($xml->variables->domain_name)); $domain_uuid = check_str(urldecode($xml->variables->domain_uuid)); - //get the domain name from sip_req_host + //get the domain name if (strlen($domain_name) == 0) { $domain_name = check_str(urldecode($xml->variables->sip_req_host)); } + if (strlen($domain_name) == 0) { + $presence_id = check_str(urldecode($xml->variables->presence_id)); + if (strlen($presence_id) > 0) { + $presence_array = explode($presence_id); + $domain_name = $presence_array[1]; + } + } //send the domain name to the cdr log //$this->log("\ndomain_name is `$domain_name`; domain_uuid is '$domain_uuid'\n");