GXW4248 Restart Script


Hello All,

I am looking to restart GXW4248 via a script.
Which port does GXW4248 use for restart.
@grandstream any help would be appreciated.


maybe by using ssh - reboot command
or using the python selenium library with the WebGUI


could you share the code snippet or the library link?


If GDMS supports the GXW, do the reset through there.


i am using this function below, but the socket connection fails for GXW4248 and returns false, but the same script works fine for 4224

function reboot_gxw($ip_addr)
echo “\n\nREBOOT_GXW: “.$ip_addr.”:23\n\n”;
$socket = @fsockopen("$ip_addr",“23”, $errno, $errstr, 1000);
if (!$socket) {
echo “$errstr ($errno)<br />\n”;
echo “Unable to Connect to Gateway to reboot\n”;
return FALSE;;
read_up_to(“Grandstream GXW”,$socket);
fputs($socket, “admin\r\n”);
fputs($socket, “reboot\r\n”);


What about port 22 ?


Yes, already tried and the script worked on port 22, but still, the gateway is not getting rebooted.


so can you reboot this GXW via ssh?
meaning w/o using the script


Yes, it REBOOTS via SSH