XML CDR, Add a fix for unescaped data in <sip_Remote-Party-ID>.
This commit is contained in:
@@ -90,6 +90,12 @@
|
|||||||
$match_result = str_replace(">", ">", $match_result);
|
$match_result = str_replace(">", ">", $match_result);
|
||||||
$xml_string = str_replace($matches[1], $match_result, $xml_string);
|
$xml_string = str_replace($matches[1], $match_result, $xml_string);
|
||||||
|
|
||||||
|
//fix the xml by escaping the contents of <sip_Remote-Party-ID>
|
||||||
|
preg_match("/<sip_Remote-Party-ID>(.*)<\/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
|
//parse the xml to get the call detail record info
|
||||||
try {
|
try {
|
||||||
$xml = simplexml_load_string($xml_string);
|
$xml = simplexml_load_string($xml_string);
|
||||||
|
|||||||
Reference in New Issue
Block a user