mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Escape sip_full_from, sip_full_to, caller_id so that the HTTP POST for CDR will work. Will remove once FreeSWITCH corrects the bug and its in a release version.
This commit is contained in:
@@ -66,6 +66,24 @@
|
||||
//set global variable
|
||||
global $debug;
|
||||
|
||||
//fix the xml by escaping the contents of <sip_full_from>
|
||||
preg_match("/<sip_full_from>(.*)<\/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 <sip_full_to>
|
||||
preg_match("/<sip_full_to>(.*)<\/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 <caller_id>
|
||||
preg_match("/<caller_id>(.*)<\/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);
|
||||
|
||||
Reference in New Issue
Block a user