diff --git a/app/sip_status/app_languages.php b/app/sip_status/app_languages.php index bf3f3496e3..3a841f210d 100644 --- a/app/sip_status/app_languages.php +++ b/app/sip_status/app_languages.php @@ -65,6 +65,22 @@ $text['title-sip-status']['ru-ru'] = "SIP Статус"; $text['title-sip-status']['sv-se'] = "SIP Status"; $text['title-sip-status']['uk-ua'] = "Стан SIP"; +$text['label-action']['en-us'] = "Action"; +$text['label-action']['ar-eg'] = ""; +$text['label-action']['de-at'] = "Aktion"; +$text['label-action']['de-de'] = "Aktion"; +$text['label-action']['es-cl'] = "Acción"; +$text['label-action']['fr-fr'] = "Action"; +$text['label-action']['he-il'] = ""; +$text['label-action']['it-it'] = ""; +$text['label-action']['nl-nl'] = ""; +$text['label-action']['pl-pl'] = "Operacja"; +$text['label-action']['pt-br'] = "Ação"; +$text['label-action']['pt-pt'] = "Acção"; +$text['label-action']['ru-ru'] = "Действие"; +$text['label-action']['sv-se'] = "Åtgärd"; +$text['label-action']['uk-ua'] = "Дія"; + $text['label-state']['en-us'] = "State"; $text['label-state']['ar-eg'] = ""; $text['label-state']['de-at'] = "Status"; diff --git a/app/sip_status/cmd.php b/app/sip_status/cmd.php index 57c5c8e93a..9ac981ef9b 100644 --- a/app/sip_status/cmd.php +++ b/app/sip_status/cmd.php @@ -45,7 +45,7 @@ else { if ($cmd == "api reloadxml") { //reloadxml if ($cmd == "api reloadxml") { - $response = event_socket_request($fp, $cmd); + messages::add(rtrim(event_socket_request($fp, $cmd)), 'alert'); unset($cmd); } @@ -54,7 +54,7 @@ else { //rescan the external profile to look for new or stopped gateways $tmp_cmd = 'api sofia profile external rescan'; - $response = event_socket_request($fp, $tmp_cmd); + messages::add(rtrim(event_socket_request($fp, $tmp_cmd)), 'alert'); unset($tmp_cmd); } @@ -66,13 +66,13 @@ else { //reloadacl if ($cmd == "api reloadacl") { - $response = event_socket_request($fp, $cmd); + messages::add(rtrim(event_socket_request($fp, $cmd)), 'alert'); unset($cmd); } //sofia profile if (substr($cmd, 0, 17) == "api sofia profile") { - $response = event_socket_request($fp, $cmd); + messages::add(rtrim(event_socket_request($fp, $cmd)), 'alert'); } //close the connection @@ -85,7 +85,6 @@ else { echo $response; } else { - $_SESSION["message"] = $response; header("Location: sip_status.php"); } diff --git a/app/sip_status/sip_status.php b/app/sip_status/sip_status.php index a960d57137..3bfd81d89d 100644 --- a/app/sip_status/sip_status.php +++ b/app/sip_status/sip_status.php @@ -128,6 +128,14 @@ if ($_GET['a'] == "download") { catch(Exception $e) { echo $e->getMessage(); } + $cmd = "api sofia xmlstatus gateway"; + $xml_response = trim(event_socket_request($fp, $cmd)); + try { + $xml_gateways = new SimpleXMLElement($xml_response); + } + catch(Exception $e) { + echo $e->getMessage(); + } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; + echo "\n"; echo "\n"; foreach ($xml->profile as $row) { echo "\n"; @@ -163,10 +172,11 @@ if ($_GET['a'] == "download") { echo " \n"; echo " \n"; echo " \n"; + echo " \n"; echo "\n"; if ($c==0) { $c=1; } else { $c=0; } } - foreach ($xml->gateway as $row) { + foreach ($xml_gateways->gateway as $row) { $gateway_name = ''; $gateway_domain_name = ''; foreach($gateways as $field) { @@ -182,14 +192,15 @@ if ($_GET['a'] == "download") { echo "".$gateway_name."@".$gateway_domain_name.""; } elseif ($gateway_domain_name == '') { - echo $gateway_name; + echo $gateway_name ? $gateway_name : $row->name; } else { echo $gateway_name."@".$gateway_domain_name; } echo " \n"; - echo " \n"; - echo " \n"; + echo " \n"; + echo " \n"; echo " \n"; + echo " \n"; echo "\n"; if ($c==0) { $c=1; } else { $c=0; } } @@ -200,6 +211,7 @@ if ($_GET['a'] == "download") { echo " \n"; echo " \n"; echo " \n"; + echo " \n"; echo "\n"; if ($c==0) { $c=1; } else { $c=0; } }
\n"; @@ -156,6 +164,7 @@ if ($_GET['a'] == "download") { echo "".$text['label-type']."".$text['label-data']."".$text['label-state']."".$text['label-action']."
".$row->type."".$row->data."".$row->state." 
".$row->type."".$row->data."Gateway".$row->to."".$row->state."profile."+killgw+".$row->name."';\" />".$text['button-stop']."
".$row->type."".$row->data."".$row->state."