Yealink Forums

Full Version: Reboot T23G from script
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello!

How i can reboot T23G (no registration in asterisk) from http request?

http://192.168.x.xx/servlet?p=settings-u...dmin:admin

not work (asked for autorization)

Firmware Version 44.81.0.70
Hardware Version 44.0.0.16.0.0.0

I`m try:
http://192.168.x.xxx/servlet?p=settings-...e&q=reboot
or
http://192.168.x.xxx/servlet?p=login&q=l...e&q=reboot

but:
403 - User Identity Forbidden
in chrome http://prntscr.com/ezsebl
Reboot seems like a pretty extreme measure to do via script... might want to try a re-provision first depending on your needs/scenario.

If for whatever reason you do need to do a reboot you can emulate the HTTP access your browser uses by executing two requests. The first will be the login request to the phone, providing username and password. If the phone accepts it, in the response there will be an authorization cookie. Take that cookie, and pass it along to your second request (the one that actually wants to do the reboot). The phone should accept the second request then and do the reboot.

Alternatively if you can configure the phone ahead of time for PUSHXML from your server, then there is an XML command you can send to the phone to request it to reboot. It's a simpler process than above, but requires you to configure PUSH XML.
(04-24-2017 12:57 PM)jolouis Wrote: [ -> ]Reboot seems like a pretty extreme measure to do via script... might want to try a re-provision first depending on your needs/scenario.

If for whatever reason you do need to do a reboot you can emulate the HTTP access your browser uses by executing two requests. The first will be the login request to the phone, providing username and password. If the phone accepts it, in the response there will be an authorization cookie. Take that cookie, and pass it along to your second request (the one that actually wants to do the reboot). The phone should accept the second request then and do the reboot.

Alternatively if you can configure the phone ahead of time for PUSHXML from your server, then there is an XML command you can send to the phone to request it to reboot. It's a simpler process than above, but requires you to configure PUSH XML.
Thank U for the answer!
Hello,
This is Andrew from Yealink Technical Support Team, nice to work with you.

For your problem, there are another way that you can use the feature Action URI. Action URI allows IP phones to interact with web server application by receiving and handling an HTTP or HTTPS GET request. It can realize remote control. For more information about how to use the feature, you can refer to the faq below:
http://support.yealink.com/faq/faqInfo?id=173
You can use the http script below to reboot the T23G after configure the Action URI Allow IP List:
http://192.168.x.xxx/cgi-bin/ConfigManAp...key=Reboot

But it also ask for authentication if you use the command for the first time on the browser. After you input the username and password, the browser will take the Cookie.

You also can adopt the method (Push xml) which jolouis provided.

Any question, please let me know.
Best Regards,
Andrew
Reference URL's