Work on registration provision and reboot so that it works with the Cisco SPA, Yealink, Grandstream phones.

This commit is contained in:
Mark Crane
2014-07-04 09:47:37 +00:00
parent 13f89f6850
commit 2f0571053f
3 changed files with 23 additions and 16 deletions
+4 -3
View File
@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2013
Portions created by the Initial Developer are Copyright (C) 2008-2014
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -45,6 +45,7 @@ else {
$rdr = check_str($_GET['rdr']);
$profile = check_str($_GET['profile']);
$domain = check_str($_GET['domain']);
$show = check_str($_GET['show']);
$user = check_str($_GET['user']);
$agent = check_str($_GET['agent']);
@@ -79,7 +80,7 @@ else {
$command = "sofia profile ".$profile." flush_inbound_reg ".$user." reboot";
}
else {
$command = "lua app.lua event_notify ".$cmd." ".$profile." ".$user." ".$vendor;
$command = "lua app.lua event_notify ".$profile." ".$cmd." ".$user." ".$vendor;
//if ($cmd == "check_sync") {
// $command = "sofia profile ".$profile." check_sync ".$user;
@@ -100,7 +101,7 @@ else {
echo $response;
}
else {
header("Location: status_registrations.php?profile=internal");
header("Location: status_registrations.php?profile=".$profile."&show=".$show);
}
?>
@@ -173,9 +173,9 @@ require_once "resources/check_auth.php";
echo " <td class='".$row_style[$c]."'>".$row['network-port']."&nbsp;</td>\n";
echo " <td class='".$row_style[$c]."'>".$row['status']."&nbsp;</td>\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=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-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 " <input type='button' class='btn' value='".$text['button-unregister']."' onclick=\"document.location.href='cmd.php?cmd=unregister&profile=".$sip_profile_name."&show=".$show."&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."&show=".$show."&user=".$row['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&profile=".$sip_profile_name."&show=".$show."&user=".$row['user']."&domain=".$row['sip-auth-realm']."&agent=".urlencode($row['agent'])."';\" onclick=\"\" />\n";
echo " </td>\n";
echo "</tr>\n";
if ($c==0) { $c=1; } else { $c=0; }