diff --git a/app/registrations/resources/classes/registrations.php b/app/registrations/resources/classes/registrations.php
index c97be762b2..aa3fde0656 100644
--- a/app/registrations/resources/classes/registrations.php
+++ b/app/registrations/resources/classes/registrations.php
@@ -89,6 +89,7 @@ if (!class_exists('registrations')) {
$cmd = "api sofia xmlstatus profile ".$field['sip_profile_name']." reg";
$xml_response = trim(event_socket_request($fp, $cmd));
$xml_response = iconv("utf-8", "utf-8//ignore", $xml_response);
+ $xml_response = preg_replace('/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/u', '', $xml_response);
if ($xml_response == "Invalid Profile!") { $xml_response = "".$text['label-message'].""; }
$xml_response = str_replace("", "", $xml_response);
$xml_response = str_replace("", "", $xml_response);
@@ -99,9 +100,10 @@ if (!class_exists('registrations')) {
$xml = new SimpleXMLElement($xml_response);
}
catch(Exception $e) {
- echo basename(__FILE__).'
';
- echo 'line: '.__line__.'
';
- echo 'error: '.$e->getMessage();
+ echo basename(__FILE__)."
\n";
+ echo "line: ".__line__."
\n";
+ echo "error: ".$e->getMessage()."
\n";
+ //echo $xml_response;
exit;
}
$array = json_decode(json_encode($xml), true);