diff --git a/app/xml_cdr/v_xml_cdr_import.php b/app/xml_cdr/v_xml_cdr_import.php index 29e6f7b12f..34f2f6a0c6 100644 --- a/app/xml_cdr/v_xml_cdr_import.php +++ b/app/xml_cdr/v_xml_cdr_import.php @@ -66,6 +66,24 @@ //set global variable global $debug; + //fix the xml by escaping the contents of + preg_match("/(.*)<\/sip_full_from>/", $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); + + //fix the xml by escaping the contents of + preg_match("/(.*)<\/sip_full_to>/", $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); + + //fix the xml by escaping the contents of + preg_match("/(.*)<\/caller_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);