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