Page 1 of 1

Remote reboot IP Phones by URL (Cisco & Snom)

Posted: Mon Jul 14, 2014 1:11 pm
by Pirlet
Hello,

I have a Dual Gateway failover in place, and I'd like to do the following:

Whenever the route switches from WAN1 to WAN2 (and the other way around). I'd like to reset my SIP phones remotely.

this can be done by browsing to the following URL: http://192.168.xxx.xxx/admin/reboot for Cisco and http://phoneIP/advanced_update.htm?reboot=Reboot (Snom)

How can this be achieved?

Re: Remote reboot IP Phones by URL (Cisco & Snom)

Posted: Mon Jul 14, 2014 2:09 pm
by rextended
You can not achieve that, because you must authenticate on the phone/ATA before launching that URL.

Re: Remote reboot IP Phones by URL (Cisco & Snom)

Posted: Mon Jul 14, 2014 2:27 pm
by Pirlet
Well, apparently it works without authenticating. Just browsing to that URL would do the trick, since they're not protected with a password.

Re: Remote reboot IP Phones by URL (Cisco & Snom)

Posted: Mon Jul 14, 2014 2:29 pm
by rextended
Cisco & Snom are really so IDIOTS? :shock:


Have you tried wit one device never used for access internal setings?

Re: Remote reboot IP Phones by URL (Cisco & Snom)

Posted: Mon Jul 14, 2014 2:38 pm
by Pirlet
When I browse on my PC to that link of the phone, it just reboots.
So I'd like to know if there's a way I can implement this in somesort of a script.

Re: Remote reboot IP Phones by URL (Cisco & Snom)

Posted: Mon Jul 14, 2014 2:49 pm
by Kickoleg
Disbale -active URL- in configuration of phones. This is popular way to hack IP phone and do fraud trafic.

Re: Remote reboot IP Phones by URL (Cisco & Snom)

Posted: Mon Jul 14, 2014 2:53 pm
by rextended
Very buggy programmers....

Re: Remote reboot IP Phones by URL (Cisco & Snom)

Posted: Mon Jul 14, 2014 2:56 pm
by Kickoleg
It's not BUG :) It's feature :)
Its using in closed network with local IP PBX.

Re: Remote reboot IP Phones by URL (Cisco & Snom)

Posted: Mon Jul 14, 2014 3:02 pm
by rextended
It's not BUG :) It's feature :)
Its using in closed network with local IP PBX.
For me is one excuse (the feature) for buggy programmers.

The right way to do that?

deviceip/reset?superuser=supername&superpassword=nowisbetter

or

http://username:password@ipphone/reset

Re: Remote reboot IP Phones by URL (Cisco & Snom)

Posted: Mon Jul 14, 2014 3:10 pm
by Kickoleg
No ! RESET-no ! Reboot-yes for provising services, and feature "direct call" using active URL, using by some PBX.

Re: Remote reboot IP Phones by URL (Cisco & Snom)

Posted: Mon Jul 14, 2014 3:13 pm
by rextended
Ok, on example I put reset, but I really want write reboot...

Re: Remote reboot IP Phones by URL (Cisco & Snom)

Posted: Mon Jul 14, 2014 3:26 pm
by Kickoleg
nothing happen ... only 2-3 command allowed by active url ...
it's using usually for first remote configuration.
As routers ,after set configuration necessary to close all the holes :)

Re: Remote reboot IP Phones by URL (Cisco & Snom)

Posted: Mon Jul 14, 2014 3:32 pm
by rextended
(remove extra "[" on your signature... :roll: )

Re: Remote reboot IP Phones by URL (Cisco & Snom)

Posted: Mon Jul 14, 2014 3:36 pm
by Kickoleg
Senx :)

Re: Remote reboot IP Phones by URL (Cisco & Snom)

Posted: Mon Jul 14, 2014 6:47 pm
by Pirlet
So, is there a way to script this into an RB2011?

I'd like to send these commands to internal IP phones

Re: Remote reboot IP Phones by URL (Cisco & Snom)

Posted: Mon Jul 14, 2014 6:54 pm
by rextended
Use "fetch" command, search on th wiki for syntax

Re: Remote reboot IP Phones by URL (Cisco & Snom)

Posted: Tue Jul 15, 2014 2:19 pm
by Pirlet
So, I got this to work for the Cisco phones with:
/tool fetch mode=http port=80 url=http://192.168.88.xxx/admin/reboot

But I cannot seem to get the Snomphones working, because I cannot type a "?" into the command line as URL...
I should use this:
/tool fetch mode=http port=80 url=http://192.168.88.xxx/advanced_update.htm?reboot=Reboot
But the "?" isn't working. I cannot type it...

How can I fix this?

Re: Remote reboot IP Phones by URL (Cisco & Snom)

Posted: Tue Jul 15, 2014 2:23 pm
by rextended
FAST REPLY:

put \ before ? on command line, but on saved script do not put the \

Re: Remote reboot IP Phones by URL (Cisco & Snom)

Posted: Thu Jul 17, 2014 10:16 am
by cdiedrich
And in case you have plenty of phones, you might want to add them to an address list (which might come in handy for other stuff as well) and embrace the fetch command in this statement:

ros code

:foreach i in=[/ip firewall address-list find list=ipPhones] do={
#your fetch statement here - replace the address with $[/ip firewall address-list get $i address]
}
-Chris

Re: Remote reboot IP Phones by URL (Cisco & Snom)

Posted: Thu Jul 17, 2014 6:29 pm
by rextended
:foreach i in=[/ip firewall address-list find where list="ipPhones"] do={
 :local ip value=[/ip firewall address-list get $i value-name=address];
 /tool fetch keep-result=no mode=http port=80 url=("http://".$ip."/admin/reboot");
 /tool fetch keep-result=no mode=http port=80 url=("http://".$ip."/advanced_update.htm?reboot=Reboot");
};

Re: Remote reboot IP Phones by URL (Cisco & Snom)

Posted: Thu Jul 17, 2014 6:51 pm
by cdiedrich
Eager beaver :D

Re: Remote reboot IP Phones by URL (Cisco & Snom)

Posted: Thu Jul 17, 2014 6:56 pm
by rextended
Eager beaver :D
Thanks! :lol:

Image

Re: Remote reboot IP Phones by URL (Cisco & Snom)

Posted: Sun Jul 20, 2014 8:45 am
by jspool
Hello,

I have a Dual Gateway failover in place, and I'd like to do the following:

Whenever the route switches from WAN1 to WAN2 (and the other way around). I'd like to reset my SIP phones remotely.

this can be done by browsing to the following URL: http://192.168.xxx.xxx/admin/reboot for Cisco and http://phoneIP/advanced_update.htm?reboot=Reboot (Snom)

How can this be achieved?
Do you host your own PBX server at another location or do you get your PBX through an outside company? Being an ITSP I ran into that issue many times and successfully implemented seamless transition between WAN connections without call interruption ;) I like it much better then having to do a reboot every time a route changes.