mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
SIP Status: Toggle Start/Stop button visibility, and Refresh button.
This commit is contained in:
@@ -128,6 +128,7 @@ if ($_GET['a'] == "download") {
|
||||
echo " <input type='button' class='btn' value='".$text['button-flush_memcache']."' onclick=\"document.location.href='cmd.php?cmd=api+memcache+flush';\" />\n";
|
||||
echo " <input type='button' class='btn' value='".$text['button-reload_acl']."' onclick=\"document.location.href='cmd.php?cmd=api+reloadacl';\" />\n";
|
||||
echo " <input type='button' class='btn' value='".$text['button-reload_xml']."' onclick=\"document.location.href='cmd.php?cmd=api+reloadxml';\" />\n";
|
||||
echo " <input type='button' class='btn' value='".$text['button-refresh']."' onclick=\"document.location.href='sip_status.php';\" />\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "</table>\n";
|
||||
@@ -203,7 +204,13 @@ if ($_GET['a'] == "download") {
|
||||
if ($fp) {
|
||||
$cmd = "api sofia xmlstatus profile ".$sip_profile_name."";
|
||||
$xml_response = trim(event_socket_request($fp, $cmd));
|
||||
if ($xml_response == "Invalid Profile!") { $xml_response = "<error_msg>Invalid Profile!</error_msg>"; }
|
||||
if ($xml_response == "Invalid Profile!") {
|
||||
$xml_response = "<error_msg>Invalid Profile!</error_msg>";
|
||||
$profile_state = 'stopped';
|
||||
}
|
||||
else {
|
||||
$profile_state = 'running';
|
||||
}
|
||||
$xml_response = str_replace("<profile-info>", "<profile_info>", $xml_response);
|
||||
$xml_response = str_replace("</profile-info>", "</profile_info>", $xml_response);
|
||||
try {
|
||||
@@ -223,8 +230,12 @@ if ($_GET['a'] == "download") {
|
||||
echo " <input type='button' class='btn' value='".$text['button-flush_registrations']."' onclick=\"document.location.href='cmd.php?cmd=api+sofia+profile+".$sip_profile_name."+flush_inbound_reg';\" />\n";
|
||||
}
|
||||
echo " <input type='button' class='btn' value='".$text['button-registrations']."' onclick=\"document.location.href='".PROJECT_PATH."/app/registrations/status_registrations.php?show_reg=1&profile=".$sip_profile_name."';\" />\n";
|
||||
echo " <input type='button' class='btn' value='".$text['button-start']."' onclick=\"document.location.href='cmd.php?cmd=api+sofia+profile+".$sip_profile_name."+start';\" />\n";
|
||||
echo " <input type='button' class='btn' value='".$text['button-stop']."' onclick=\"document.location.href='cmd.php?cmd=api+sofia+profile+".$sip_profile_name."+stop';\" />\n";
|
||||
if ($profile_state == 'stopped') {
|
||||
echo " <input type='button' class='btn' value='".$text['button-start']."' onclick=\"document.location.href='cmd.php?cmd=api+sofia+profile+".$sip_profile_name."+start';\" />\n";
|
||||
}
|
||||
if ($profile_state == 'running') {
|
||||
echo " <input type='button' class='btn' value='".$text['button-stop']."' onclick=\"document.location.href='cmd.php?cmd=api+sofia+profile+".$sip_profile_name."+stop';\" />\n";
|
||||
}
|
||||
echo " <input type='button' class='btn' value='".$text['button-restart']."' onclick=\"document.location.href='cmd.php?cmd=api+sofia+profile+".$sip_profile_name."+restart';\" />\n";
|
||||
echo " <input type='button' class='btn' value='".$text['button-rescan']."' onclick=\"document.location.href='cmd.php?cmd=api+sofia+profile+".$sip_profile_name."+rescan';\" />\n";
|
||||
echo "</td>\n";
|
||||
|
||||
Reference in New Issue
Block a user