Update v_xml_cdr_import.php

This commit is contained in:
FusionPBX 2020-05-06 14:23:17 -06:00 committed by GitHub
parent 71e861a68c
commit 8aa4277449
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 3 deletions

View File

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