Set caller_id_number using sip_from_user if the variable is not set.

This commit is contained in:
FusionPBX
2022-03-15 14:43:55 -06:00
committed by GitHub
parent 76a4e9dd50
commit af994de554

View File

@@ -299,8 +299,15 @@ if (!class_exists('xml_cdr')) {
if ($duplicate_uuid == false && is_uuid($uuid)) {
//get the caller ID
$caller_id_name = urldecode($xml->variables->caller_id_name);
$caller_id_number = urldecode($xml->variables->caller_id_number);
if (isset($xml->variables->caller_id_name)) {
$caller_id_name = urldecode($xml->variables->caller_id_name);
}
if (isset($xml->variables->caller_id_number)) {
$caller_id_number = urldecode($xml->variables->caller_id_number);
}
if (!isset($caller_id_number) && isset($xml->variables->sip_from_user)) {
$caller_id_number = urldecode($xml->variables->sip_from_user);
}
//if the origination caller id name and number are set then use them
if (isset($xml->variables->origination_caller_id_name)) {