OBi110 scheduled reboot
earthtoobi:
you can add it to cron tab to schedule it.
if you have webmin installed, it makes it much more easier to schedule cron jobs and in general manage your Ubuntu/Linux.
QBZappy:
infin8loop,
Hi,
My OBi is registered as an extension to a Grandstream GXE PBX. I've been trying to do something similar to what you are doing with the OBi with the PBX. I have figured out that I can telnet to the PBX and at terminal I can type reboot, and it reboots. I need to figure out how to automate this under the task scheduler, or use your approach which accomplishes the same thing.
Using firefox addon firebug, I have been able to figure out the following to get to the reboot page of the GXE. My programming skills are nil. Using your method, I can only take it this far. It doesn't reboot the PBX. There isn't much code, perhaps you can have a look at the VBS script and maybe you can spot why it didn't work. Thanks.
strURL = "http://192.16.240.3:8083/cgi-bin/ccgi?pageID=27"
''change xxx.xxx.xxx.xxx above to the local IP address of your GXE
strPassword = "12345"
''change GXEpassword above to the password of your local GXE page login
Set objHTTP = CreateObject("Microsoft.XMLHTTP")
objHTTP.open "POST", strURL, False, "admin", strPassword
objHTTP.send
Set objHTTP = Nothing
QBZappy:
Bump,
Anybody
QBZappy:
Decided to use a Telnet Scripting Tool a.k.a TST10.exe. Easy to setup and run under task scheduler. (Google it if you need more info).
To download:
http://support.moonpoint.com/downloads/windows/network/Telnet/tst10.php
(Click on "More info" to get a complete set of instructions.)
infin8loop:
Quote from: QBZappy on August 05, 2011, 09:56:33 pm
There isn't much code, perhaps you can have a look at the VBS script and maybe you can spot why it didn't work. Thanks.
Sorry I didn't notice the question sooner. I cut and pasted your script (which was basically my script with the strURL and strPassword changed) into a test.vbs. I changed the strURL and strPassword back to my obi110 and ran the script and it worked.
If physically typing "http://192.16.240.3:8083/cgi-bin/ccgi?pageID=27" into a browser window reboots your device then it's probably the correct URL. Otherwise, perhaps it's a slightly different URL that is POSTed when clicking a button on the page that causes a reboot.
Otherwise, perhaps the login id "admin" needs to be changed to the login id (if not "admin) of your device in the line:
objHTTP.open "POST", strURL, False, "admin", strPassword
Or maybe you don't have Windows Scripting Host (WSH) installed. Do you get a listing of options if you go to a command line prompt and type "cscript" (without quotes of course)? I've never had to install it but perhaps I'm just lucky.
WSH can be downloaded from:
Windows XP (and probably later versions of Windows?): http://www.microsoft.com/download/en/details.aspx?id=8247
Windows 2000: http://www.microsoft.com/download/en/details.aspx?id=20240
I pretty much have stuck with Windows XP because that's what the company I work for is still using for our desktops.
No reason I can think of why WSH wouldn't work for your device if given the correct strURL, strPassword, and login id and you have WSH installed.
If none of this works then you might try invoking your script
at a command line (and task scheduler): cscript c:\complete-path-here\script-name.vbs (c: or actual drive letter:)
and look for any errror messages.
Quote from: QBZappy on August 11, 2011, 11:42:53 am
Decided to use a Telnet Scripting Tool a.k.a TST10.exe. Easy to setup and run under task scheduler. (Google it if you need more info).
I see you have developed a solution using a different scripting language. Feel free to post the script as an attachment. I'm at a loss because you apparently figured out the correct parameters (URL, login id, and password) to pass using the other scripting language.
Navigation
[0] Message Index
[#] Next page
[*] Previous page