diff --git a/app/xml_cdr/v_xml_cdr_import.php b/app/xml_cdr/v_xml_cdr_import.php index cdf97d0a22..5af4a770d7 100644 --- a/app/xml_cdr/v_xml_cdr_import.php +++ b/app/xml_cdr/v_xml_cdr_import.php @@ -90,6 +90,12 @@ $match_result = str_replace(">", ">", $match_result); $xml_string = str_replace($matches[1], $match_result, $xml_string); + //fix the xml by escaping the contents of + preg_match("/(.*)<\/sip_Remote-Party-ID>/", $xml_string, $matches); + $match_result = str_replace("<", "<", $matches[1]); + $match_result = str_replace(">", ">", $match_result); + $xml_string = str_replace($matches[1], $match_result, $xml_string); + //parse the xml to get the call detail record info try { $xml = simplexml_load_string($xml_string);