Remote reboot of devices

332 views
Skip to first unread message

Admin

unread,
Nov 26, 2016, 1:12:51 PM11/26/16
to 2600hz-dev
Hello,
I am trying to send a /sync request to a Yealink SIP device to reboot it. It does not seem to be working.
I understand kazoo is supposed to generate the NOTIFY packet with "event = check-sync". However for the phone to reboot, the NOTIFY packet header must also include "reboot = true".
I have not done a wireshark capture to see if it includes "reboot = true".
Does anyone know this to be the case? Has anyone had any success with remote rebooting of Yealink devices?
Thanks for any suggestion or advice!
Amit

Darren Schreiber

unread,
Nov 26, 2016, 1:13:23 PM11/26/16
to 2600h...@googlegroups.com

Any chance you have the Request ID?

--
You received this message because you are subscribed to the Google Groups "2600hz-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 2600hz-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Amit Nir

unread,
Nov 26, 2016, 1:49:13 PM11/26/16
to 2600h...@googlegroups.com
Hi Darren,
Why would that help?
I tested it on my own test servers. 

Darren Schreiber

unread,
Nov 26, 2016, 1:49:31 PM11/26/16
to 2600h...@googlegroups.com

You can trace the Request ID in /var/log/2600hz/kazoo.log and see what it did with the request.

Admin

unread,
Nov 27, 2016, 9:57:45 PM11/27/16
to 2600hz-dev
Here's the relevant portion of the logs with the request id:

Nov 28 02:44:16 kz1 2600hz[2251]: |eb7fdc56c610dc65e994452e42d3313d|api_util:1111 (<0.12667.988>) push response content: {"data":"sync request sent","revision":"4-c44ee3904033ae7c02e39b7cb963b3d3","request_id":"eb7fdc56c610dc65e994452e42d3313d","status":"success","auth_token":"5615419bbffd21d6703fcac43ef630dd"}
Nov 28 02:44:16 kz1 2600hz[2250]: |eb7fdc56c610dc65e994452e42d3313d|ecallmgr_fs_notify:120 (<0.31668.286>) looking up registration information for device1@xxx.xxxxx.com
Nov 28 02:44:16 kz1 2600hz[2250]: |eb7fdc56c610dc65e994452e42d3313d|ecallmgr_fs_notify:127 (<0.31668.286>) calling check sync on freeswitch@fs2.xxxxx.com for device1@xxx.xxxxx.com and contact sip:device1@xx.xx.xx.xx:5064;transport=udp;fs_path=sip:xx.xx.xx.xx:5060;lr;received='sip:xx.xx.xx.xx:5064;transport=udp'
Nov 28 02:44:16 kz1 2600hz[2251]: |eb7fdc56c610dc65e994452e42d3313d|api_resource:155 (<0.12667.988>) POST request fulfilled in 39 ms
Nov 28 02:44:16 kz1 2600hz[2250]: |eb7fdc56c610dc65e994452e42d3313d|ecallmgr_fs_notify:149 (<0.31668.286>) send check-sync to 'dev...@xxx.xxxxx.com' via freeswitch@fs2.xxxxx.com: ok


Is there somewhere in freeswitch that I can grep the logs to see what the actual header was?

Darren Schreiber

unread,
Nov 27, 2016, 9:58:20 PM11/27/16
to 2600h...@googlegroups.com

Yup looks like it at least tried to send it.

 

On the FreeSWITCH CLI, issue:

 

“sofia global siptrace on”

 

And change your loglevel to 7 / debug as well. Then try the API call and you should see the packet that is being sent.

 

From: 2600h...@googlegroups.com [mailto:2600h...@googlegroups.com] On Behalf Of Admin
Sent: Sunday, November 27, 2016 6:52 PM
To: 2600hz-dev <2600h...@googlegroups.com>
Subject: Re: Remote reboot of devices

 

Here's the relevant portion of the logs with the request id:

 

Nov 28 02:44:16 kz1 2600hz[2251]: |eb7fdc56c610dc65e994452e42d3313d|api_util:1111 (<0.12667.988>) push response content: {"data":"sync request sent","revision":"4-c44ee3904033ae7c02e39b7cb963b3d3","request_id":"eb7fdc56c610dc65e994452e42d3313d","status":"success","auth_token":"5615419bbffd21d6703fcac43ef630dd"}

Nov 28 02:44:16 kz1 2600hz[2250]: |eb7fdc56c610dc65e994452e42d3313d|ecallmgr_fs_notify:120 (<0.31668.286>) looking up registration information for dev...@xxx.xxxxx.com
Nov 28 02:44:16 kz1 2600hz[2250]: |eb7fdc56c610dc65e994452e42d3313d|ecallmgr_fs_notify:127 (<0.31668.286>) calling check sync on frees...@fs2.xxxxx.com for dev...@xxx.xxxxx.com and contact sip:dev...@xx.xx.xx.xx:5064;transport=udp;fs_path=sip:xx.xx.xx.xx:5060;lr;received='sip:xx.xx.xx.xx:5064;transport=udp'


Nov 28 02:44:16 kz1 2600hz[2251]: |eb7fdc56c610dc65e994452e42d3313d|api_resource:155 (<0.12667.988>) POST request fulfilled in 39 ms

Nov 28 02:44:16 kz1 2600hz[2250]: |eb7fdc56c610dc65e994452e42d3313d|ecallmgr_fs_notify:149 (<0.31668.286>) send check-sync to 'dev...@xxx.xxxxx.com' via frees...@fs2.xxxxx.com: ok

 

 

Is there somewhere in freeswitch that I can grep the logs to see what the actual header was?

 

 


On Saturday, November 26, 2016 at 1:12:51 PM UTC-5, Admin wrote:

Hello,

I am trying to send a /sync request to a Yealink SIP device to reboot it. It does not seem to be working.

I understand kazoo is supposed to generate the NOTIFY packet with "event = check-sync". However for the phone to reboot, the NOTIFY packet header must also include "reboot = true".

I have not done a wireshark capture to see if it includes "reboot = true".

Does anyone know this to be the case? Has anyone had any success with remote rebooting of Yealink devices?

Thanks for any suggestion or advice!

Amit

--

Admin

unread,
Nov 27, 2016, 11:14:11 PM11/27/16
to 2600hz-dev, dschr...@2600hz.com
Here's what the FS console shows. Not very informative. Log level was set to 7 DEBUG, and global siptrace was on.


  ------------------------------------------------------------------------
send 903 bytes to udp/[x.x.x.x]:5060 at 04:02:35.735302:
   ------------------------------------------------------------------------
   NOTIFY sip:dev...@x.x.x.x:5064;transport=udp SIP/2.0
   Via: SIP/2.0/UDP x.x.x.x:11000;rport;branch=z9hG4bKHv5grZ7QyQKSj
   Route: <sip:x.x.x.x:5060>
   Max-Forwards: 70
   From: <sip:dev...@sip.xxxxx.com>;tag=266DDQ31v2jNg
   Call-ID: 562b2e25-2fc2-1235-5a9a-00219b9d5a4f
   CSeq: 99816813 NOTIFY
   Contact: <sip:mod_...@x.x.x.x:11000>
   User-Agent: 2600hz
   Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
   Supported: path, replaces
   Event: check-sync
   Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
   Subscription-State: terminated;reason=noresource
   Content-Type: application/simple-message-summary
   Content-Length: 0
   X-KAZOO-AOR: sip:dev...@sip.xxxxx.com

   ------------------------------------------------------------------------
recv 373 bytes from udp/[x.x.x.x]:5060 at 04:02:35.765548:
   ------------------------------------------------------------------------
   SIP/2.0 200 OK
   Via: SIP/2.0/UDP x.x.x.x:11000;received=x.x.x.x;rport=11000;branch=z9hG4bKHv5grZ7QyQKSj
   From: <sip:dev...@sip.xxxxx.com>;tag=266DDQ31v2jNg
   To: <sip:dev...@sip.xxxxx.com>;tag=256188824
   Call-ID: 562b2e25-2fc2-1235-5a9a-00219b9d5a4f
   CSeq: 99816813 NOTIFY
   User-Agent: Yealink SIP-W52P 25.73.0.40 00:15:65:48:e2:e0
   Content-Length: 0



I wonder what this line means?    Subscription-State: terminated;reason=noresource

The subscription still seemed active, at least the SIP phone seemed to still be subscribed.

Darren Schreiber

unread,
Nov 27, 2016, 11:15:14 PM11/27/16
to 2600hz-dev

Looks correct to me? Is the IP address that of your proxy?

 

   NOTIFY sip:dev...@x.x.x.x:5064;transport=udp SIP/2.0

 

Looks to be the phone (hence port 5064)

 

If so, this all looks right and should work.

Admin

unread,
Nov 27, 2016, 11:39:41 PM11/27/16
to 2600hz-dev, dschr...@2600hz.com
It's the public IP where the phone is located. Behind a firewall of course. 

Only question remains is whether the NOTIFY packet includes the "reboot = true" in the header.

Any way to dig deeper and check that?

James Wright

unread,
Dec 6, 2016, 9:14:09 AM12/6/16
to 2600hz-dev
For what help it is, I can say I in fact, HAVE successfully remotely rebooted Yealink Phones from the Monster/Kazoo 4.0 interface. So it likely is not a global issue.

Admin

unread,
Dec 6, 2016, 11:28:11 AM12/6/16
to 2600hz-dev
Hi James,

Thanks for the reply. I was able to reboot the device by setting reboot on re-sync to true on the phone. So whenever the device receives a re-sync packet, it reboots regardless of whether the NOTIFY header includes a reboot=true.
Reply all
Reply to author
Forward
0 new messages