From 8aa4277449075b2938ed080761b49555f9040fc3 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 6 May 2020 14:23:17 -0600 Subject: [PATCH] Update v_xml_cdr_import.php --- app/xml_cdr/v_xml_cdr_import.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/xml_cdr/v_xml_cdr_import.php b/app/xml_cdr/v_xml_cdr_import.php index 2485a7e7f3..3151d89ffe 100644 --- a/app/xml_cdr/v_xml_cdr_import.php +++ b/app/xml_cdr/v_xml_cdr_import.php @@ -278,15 +278,23 @@ $domain_name = urldecode($xml->variables->domain_name); $domain_uuid = urldecode($xml->variables->domain_uuid); - //get the domain name from dialed_domain + //get the domain name if (strlen($domain_name) == 0) { $domain_name = urldecode($xml->variables->dialed_domain); } - - //get the domain name from sip_req_host + if (strlen($domain_name) == 0) { + $domain_name = urldecode($xml->variables->sip_invite_domain); + } if (strlen($domain_name) == 0) { $domain_name = urldecode($xml->variables->sip_req_host); } + if (strlen($domain_name) == 0) { + $presence_id = 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 xml_cdr_log("\ndomain_name is `$domain_name`; domain_uuid is '$domain_uuid'\n");