mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Update registrations.php
Removed the encoding type changes changes as it broke XML parsing of the registrations.
This commit is contained in:
@@ -62,13 +62,11 @@ if (!class_exists('registrations')) {
|
||||
//get sofia status profile information including registrations
|
||||
$cmd = "api sofia xmlstatus profile ".$field['sip_profile_name']." reg";
|
||||
$xml_response = trim(event_socket_request($fp, $cmd));
|
||||
|
||||
if ($xml_response == "Invalid Profile!") { $xml_response = "<error_msg>".$text['label-message']."</error_msg>"; }
|
||||
$xml_response = str_replace("<profile-info>", "<profile_info>", $xml_response);
|
||||
$xml_response = str_replace("</profile-info>", "</profile_info>", $xml_response);
|
||||
if (strlen($xml_response) > 101) {
|
||||
try {
|
||||
$xml_response = str_ireplace("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>", "<?xml version=\"1.0\" encoding=\"UTF-8\"?>", $xml_response);
|
||||
$xml = new SimpleXMLElement($xml_response);
|
||||
}
|
||||
catch(Exception $e) {
|
||||
|
||||
Reference in New Issue
Block a user