Code Monkey home page Code Monkey logo

yealink-remote-manager's Introduction

yealink-remote-manager

This is a script that uses the Remote Management interface in Yealink phones to make, answer, hold, mute and hang up calls. Furthermore it supports other neat tricks such as sending arbitrary "keypresses" to your phone and remotely rebooting it.

Please refer to the Usage section below for a full list of features.

Motivation

This script was written because I didn't want to type phone numbers in the phone keyboard like people used to a decade ago.

Moreover this gives one the ability to copy and paste numbers, which saves a ton of time and frustration. Answering calls is probably faster through the actual phone itself, though.

Dependencies

This program was written for python3. You are welcome to rewrite it for python2 and make a PR.

The only dependency is requests. You can install it using pip:

python3 -m pip install requests

In addition to that, your phone must support Remote Management. Refer to this article to find out how to configure it.

Also be aware that this has only been tested on a Yealink T28P, but it ought to work on a wide range of Yealink devices, particularily because the documentation of the keys didn't even list my device as "supported", but everything seems to work alright.

Usage

usage: manager.py [-h] --host HOST --user USER --password PWD [--dial DIAL]
                  [--answer] [--mute] [--hangup] [--hold] [--speaker]
                  [--reboot] [--key KEY]

Make and answer calls using the Remote Management feature on Yealink phones.

optional arguments:
  -h, --help            show this help message and exit
  --host HOST, -H HOST  The IP adress or hostname of your Yealink phone.
  --user USER, -U USER  An administrative user.
  --password PWD, -P PWD
                        Password of the admin user.
  --dial DIAL, -d DIAL  Phone number to dial.
  --answer, -a          Answer an incoming call.
  --mute, -m            Mute/unmute ongoing call.
  --hangup, -hp         Hang up ongoing call.
  --hold, -hd           Hold ongoing call.
  --speaker, -sp        Toggle loudspeaker.
  --reboot, -rb         Reboot phone.
  --key KEY, -K KEY     Send arbitrary key.

Examples

Dial 1234 and put phone on speaker

python3 manager.py -H '10.0.0.4' -U admin -P hunter2 --dial 1234 --speaker

Accept call

python3 manager.py -H '10.0.0.4' -U admin -P hunter2 --answer

Reboot phone

python3 manager.py -H '10.0.0.4' -U admin -P hunter2 --reboot

Contribution

If you manage to extend the feature set of this script, I'd really appreciate a PR.

Licensing

This program is licensed under the GPL 2.0 license. For more information, please refer to LICENSE.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.