mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-03 18:33:49 +00:00
Reboot and Check Sync
This commit is contained in:
@@ -50,6 +50,16 @@
|
||||
$text['button-reboot']['pt-pt'] = "Reinicialização";
|
||||
$text['button-reboot']['fr-fr'] = "Redémarrage";
|
||||
|
||||
$text['button-reboot']['en-us'] = "Reboot";
|
||||
$text['button-reboot']['es-cl'] = "Reiniciar";
|
||||
$text['button-reboot']['pt-pt'] = "Reinicialização";
|
||||
$text['button-reboot']['fr-fr'] = "Redémarrage";
|
||||
|
||||
$text['button-check_sync']['en-us'] = "Check Sync";
|
||||
$text['button-check_sync']['es-cl'] = "Compruebe Sync";
|
||||
$text['button-check_sync']['pt-pt'] = "Sincronização";
|
||||
$text['button-check_sync']['fr-fr'] = "Contrôle Sync";
|
||||
|
||||
$text['label-message']['en-us'] = "Message";
|
||||
$text['label-message']['es-cl'] = "Mensaje";
|
||||
$text['label-message']['pt-pt'] = "Mensagem";
|
||||
|
||||
@@ -73,15 +73,20 @@ else {
|
||||
//create the event socket connection
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
//app.lua event_notify
|
||||
if ($cmd == "reboot" || $cmd == "resync") {
|
||||
$cmd_complete = "api luarun app.lua event_notify ".$cmd." ".$user." ".$domain." ".$vendor;
|
||||
$response = event_socket_request($fp, $cmd_complete);
|
||||
|
||||
$_SESSION['message'] = $text['label-event']." ".ucwords($cmd)." ".$text['label-response'].$response;
|
||||
unset($cmd);
|
||||
//lua
|
||||
//$command = "api luarun app.lua event_notify ".$cmd." ".$user." ".$domain." ".$vendor;
|
||||
//reboot
|
||||
if ($cmd == "reboot") {
|
||||
$command = "api sofia profile internal flush_inbound_reg ".$user." reboot";
|
||||
}
|
||||
|
||||
//check_sync
|
||||
if ($cmd == "check_sync") {
|
||||
$command = "api sofia profile internal check_sync ".$user;
|
||||
}
|
||||
//send the command
|
||||
$response = event_socket_request($fp, $command);
|
||||
//show the response
|
||||
$_SESSION['message'] = $text['label-event']." ".ucwords($cmd)." ".$text['label-response'].$response;
|
||||
//close the connection
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
@@ -210,8 +210,8 @@ require_once "resources/check_auth.php";
|
||||
//echo " <td class='".$row_style[$c]."'> ".$row['mwi-account']." </td>\n";
|
||||
echo " <td class='".$row_style[$c]."'> ".$row['status']." </td>\n";
|
||||
echo " <td class='".$row_style[$c]."' align='right'>\n";
|
||||
//echo " <input type='button' class='btn' value='resync' onclick=\"document.location.href='cmd.php?cmd=resync&user=".$row['sip-auth-user']."&domain=".$row['sip-auth-realm']."&agent=".urlencode($row['agent'])."';\" />\n";
|
||||
echo " <input type='button' class='btn' value='".$text['button-reboot']."' onclick=\"document.location.href='cmd.php?cmd=reboot&user=".$row['sip-auth-user']."&domain=".$row['sip-auth-realm']."&agent=".urlencode($row['agent'])."';\" />\n";
|
||||
echo " <input type='button' class='btn' value='".$text['button-reboot']."' onclick=\"document.location.href='cmd.php?cmd=reboot&user=".$row['user']."&domain=".$row['sip-auth-realm']."&agent=".urlencode($row['agent'])."';\" />\n";
|
||||
echo " <input type='button' class='btn' value='".$text['button-check_sync']."' onclick=\"document.location.href='cmd.php?cmd=check_sync&user=".$row['user']."&domain=".$row['sip-auth-realm']."&agent=".urlencode($row['agent'])."';\" />\n";
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
if ($c==0) { $c=1; } else { $c=0; }
|
||||
|
||||
Reference in New Issue
Block a user