diff --git a/app/xml_cdr/v_xml_cdr_import.php b/app/xml_cdr/v_xml_cdr_import.php index 5e3cc821ab..d22e31fc09 100644 --- a/app/xml_cdr/v_xml_cdr_import.php +++ b/app/xml_cdr/v_xml_cdr_import.php @@ -208,10 +208,12 @@ } //get the caller details - $database->fields['caller_id_name'] = urldecode($xml->variables->effective_caller_id_name); - if ($xml->variables->call_direction == 'inbound' ){ - $database->fields['caller_id_number'] = urldecode($xml->variables->caller_id_number); - } else { + $database->fields['caller_id_name'] = urldecode($xml->variables->caller_id_name); + $database->fields['caller_id_number'] = urldecode($xml->variables->caller_id_number); + if (isset($xml->variables->effective_caller_id_name)) { + $database->fields['caller_id_name'] = urldecode($xml->variables->effective_caller_id_name); + } + if (isset($xml->variables->effective_caller_id_number)) { $database->fields['caller_id_number'] = urldecode($xml->variables->effective_caller_id_number); }