Yealink Forums
XML Push Server - See other phones in DND mode - Printable Version

+- Yealink Forums (
+-- Forum: IP Phone Series (/forumdisplay.php?fid=4)
+--- Forum: T4x Series (/forumdisplay.php?fid=31)
+--- Thread: XML Push Server - See other phones in DND mode (/showthread.php?tid=40518)

XML Push Server - See other phones in DND mode - Turnkey - 01-13-2017 04:45 AM

I run a remote office in multiple states and needed to see when other phones for my coworkers were in DND mode which indicates if my staff can or cannot answer calls at any given time. As such I wrote a small php script that lives on my server that phones ping when they enter and exit dnd mode or call forwarding mode. When a phone presses the DND button this button press is then sent to the server – which is then forwarded to a variety of other phones on the network via the Yealink XML HTTP push service functionality.

[Image: yealink-dispatch.jpg]

  1. Download ping.php from my Github :
  2. This assumes we're working on the phone who belongs to Jame, as setup in the ping.php file. When Alice presses DND it will notify Bob's phone via our server script.
  3. Upload the script to your server
  4. Forward a public port on your router to your phone, I chose port 12733
  5. Connect to Alice's yealink phone via its IP address. Navigate to features -> action URL and setup the Open DND Url to as follows : http://zzz.zzz.zzz.zzz/ping.php?key=gfsjh39esadsaFDsa&phone=alice&action=dnd&bool=1
    ...1) Replace 'alice' with the name of the phone that you're configuring. It should match that in ping.php
    ...2) Replace zzz.zzz.zzz.zzz with your server's IP address.
    ...3) Set your server's public IP in your phone under the 'Remote Control' menu, see picture below.
  6. Update the Close DND url to the same as above, except set bool=1 in the url to bool=0
  7. Save the changes to your phone.

Forwarding a public port on your router to your phone's internal port 80 : [Image: port-forwarded-phone.png]

Configuringa phone to accept messages from your server where ping.php lives : [Image: jane.png]

Example of Alice's phone showing Jane (another phone on the network) is currently in DND mode : [Image: example%20dnd%20mode.jpg]

I'll update the script with new functionality as I need it. Next function I'll be adding is to cache in a text file locally the existing status that are still open, so that other status don't overwrite them.