From af994de55434c4a625a041ba47d7073f6b00777b Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 15 Mar 2022 14:43:55 -0600 Subject: [PATCH] Set caller_id_number using sip_from_user if the variable is not set. --- app/xml_cdr/resources/classes/xml_cdr.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/xml_cdr/resources/classes/xml_cdr.php b/app/xml_cdr/resources/classes/xml_cdr.php index c48e32383a..31ea9620e3 100644 --- a/app/xml_cdr/resources/classes/xml_cdr.php +++ b/app/xml_cdr/resources/classes/xml_cdr.php @@ -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)) {