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");