Work on the reboot and provision buttons on the registrations
This commit is contained in:
@@ -75,16 +75,15 @@ else {
|
|||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
//prepare the command
|
//prepare the command
|
||||||
if ($vendor == "grandstream") {
|
if ($cmd == "unregister") {
|
||||||
$command = "lua app.lua event_notify ".$cmd." ".$profile." ".$user." ".$vendor;
|
$command = "sofia profile ".$profile." flush_inbound_reg ".$user." reboot";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ($cmd == "reboot") {
|
$command = "lua app.lua event_notify ".$cmd." ".$profile." ".$user." ".$vendor;
|
||||||
$command = "sofia profile ".$profile." flush_inbound_reg ".$user." reboot";
|
|
||||||
}
|
//if ($cmd == "check_sync") {
|
||||||
if ($cmd == "check_sync") {
|
// $command = "sofia profile ".$profile." check_sync ".$user;
|
||||||
$command = "sofia profile ".$profile." check_sync ".$user;
|
//}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//send the command
|
//send the command
|
||||||
$response = event_socket_request($fp, "api ".$command);
|
$response = event_socket_request($fp, "api ".$command);
|
||||||
|
|||||||
@@ -161,9 +161,9 @@ require_once "resources/check_auth.php";
|
|||||||
echo " <td class='".$row_style[$c]."'>".$row['network-port']." </td>\n";
|
echo " <td class='".$row_style[$c]."'>".$row['network-port']." </td>\n";
|
||||||
echo " <td class='".$row_style[$c]."'>".$row['status']." </td>\n";
|
echo " <td class='".$row_style[$c]."'>".$row['status']." </td>\n";
|
||||||
echo " <td class='".$row_style[$c]."' style='text-align: right;' nowrap='nowrap'>\n";
|
echo " <td class='".$row_style[$c]."' style='text-align: right;' nowrap='nowrap'>\n";
|
||||||
echo " <input type='button' class='btn' value='".$text['button-unregister']."' onclick=\"document.location.href='cmd.php?cmd=reboot&profile=".$sip_profile_name."&user=".$row['user']."&domain=".$row['sip-auth-realm']."&agent=".urlencode($row['agent'])."';\" />\n";
|
echo " <input type='button' class='btn' value='".$text['button-unregister']."' onclick=\"document.location.href='cmd.php?cmd=unregister&profile=".$sip_profile_name."&user=".$row['user']."&domain=".$row['sip-auth-realm']."&agent=".urlencode($row['agent'])."';\" />\n";
|
||||||
echo " <input type='button' class='btn' value='".$text['button-provision']."' onclick=\"document.location.href='cmd.php?cmd=check_sync&profile=".$sip_profile_name."&user=".$row['user']."&domain=".$row['sip-auth-realm']."&agent=".urlencode($row['agent'])."';\" />\n";
|
echo " <input type='button' class='btn' value='".$text['button-provision']."' onclick=\"document.location.href='cmd.php?cmd=check_sync&profile=".$sip_profile_name."&user=".$row['user']."&domain=".$row['sip-auth-realm']."&agent=".urlencode($row['agent'])."';\" />\n";
|
||||||
echo " <input type='button' class='btn' value='".$text['button-reboot']."' disabled='disabled' onclick=\"\" />\n";
|
echo " <input type='button' class='btn' value='".$text['button-reboot']."' onclick=\"document.location.href='cmd.php?cmd=reboot&profile=".$sip_profile_name."&user=".$row['user']."&domain=".$row['sip-auth-realm']."&agent=".urlencode($row['agent'])."';\" onclick=\"\" />\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
if ($c==0) { $c=1; } else { $c=0; }
|
if ($c==0) { $c=1; } else { $c=0; }
|
||||||
|
|||||||
Reference in New Issue
Block a user