mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-23 17:08:27 +00:00
Filter for sip_P-Preferred-Identity in xml cdr import as a work around for invalid XML sent over HTTP POST.
This commit is contained in:
@@ -96,6 +96,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 <sip_P-Preferred-Identity>
|
||||
preg_match("/<sip_P-Preferred-Identity>(.*)<\/sip_P-Preferred-Identity>/", $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);
|
||||
|
||||
Reference in New Issue
Block a user