Automatic provisioning of a Yealink T29G

The Cisco 7960G is an adequate enough VoIP device, but it is rather long in the tooth. Just like IBM, no-one ever got fired for buying Cisco (probably because if you can afford to buy Cisco, you’re most likely in a large organisation with so much capital expenditure that Cisco’s prices are a drop in the ocean), but is Cisco necessarily the best choice? If you’ve got the cash, then go for it. Cisco’s kit is good, and for the price it ought to be. For mere mortals whose funds don’t equal the GDP of a small nation, perhaps it’s time to look elsewhere.

If you’re on a budget, there are alternatives out there, with a very comprehensive – even bewildering – array of features for the money. I recently picked up a Yealink T29G for peanuts on eBay. In contrast to Cisco which, not content with the already astronomical purchase price, also demands that purchasers should fork over even more cash for a support contract before any downloads are provided, Yealink provides firmware downloads, configuration tools and templates, and a wealth of documentation for free. Anyone might think it was part of a cunning plan to encourage adoption of Yealink’s products…

As with all VoIP “telephones”, the Yealink T29G is not actually a telephone. Rather, it’s a computer cunningly disguised in a familiar form factor designed to resemble a telephone. And, just like any other computer, it has to be configured to do its work.

The most immediate way to configure the T29G is by mashing buttons. It works, but it’s slow and laborious. In its “telephone” guise, the user interface is a bit awkward. Having to press number keys multiple times to get certain letters and symbols gets old pretty quickly. In addition, button mashing doesn’t allow you to configure every option available. Some options are only available through configuration files.

Yealink provides an incredibly detailed Administrator Guide for the T29G (and presumably other models, too), regularly updated with each successive firmware release, which explains every configuration option, which buttons to mash to configure it (if button mashing is available for that option), and how to configure it using automatic provisioning if button mashing isn’t available or if you just want to control the device’s settings centrally.

As part of Project Overkill, the facility to centrally manage a single VoIP phone appeals greatly. If it’s worth doing, it’s worth overdoing.

In the same place as the Administrator Guide, Yealink also provides a guide to automatic provisioning, which explains the various choices for automatic provisioning as well as describing the process: what does the device look for and how does it obtain its configuration when it starts up?

By default, if you haven’t configured it to use another protocol, the T29G will pick up its IP address using DHCP. Part of the information it can receive via DHCP is the address of a TFTP server hosting the configuration files.

By default, the T29G will interrogate the TFTP server for one or two of the following four files, in this order:

  • <mac address>.boot
  • y000000000000.boot
  • y000000000046.cfg
  • <mac address>.cfg

The first two files are used by more recent versions of the Yealink firmware, and the latter two files are used by older versions of the firmware.

First the T29G will try to load a .boot file named after its own MAC address. If this file exists, it will be used only by this device and by no other. It allows you to specify a unique boot environment for a single device, at the expense of additional administrative overhead when things change.

If that file does not exist, it will then try to load a common .boot file used by all Yealink devices.

If neither file exists, the T29G will fall back to the older method, and attempt to load a common .cfg file named for the device model (the Auto Provisioning guide contains a table mapping filenames to device models). Then it will attempt to load a MAC address-specific .cfg file.

The .boot files can contain nested “include” directives, referencing other configuration files. They can also contain variables such as “$mac” (the device’s MAC address), allowing some reasonably complex configurations to be created from small and simple files.

You can split up different aspects of the device configuration, e.g. network settings, display settings, button configurations, language settings, wallpaper/logo images, etc. into different configuration files. If you need to update a particular aspect of your configuration, you just edit the appropriate file. In this way you can propagate configuration changes across multiple device types very easily, without having to edit multiple files.

This is very convenient if using different models across your estate. The older .cfg file method requires you to edit each model-specific configuration file to accommodate changes on your network, but the newer, nested “include” directives let you separate the global settings from the individual settings.

In addition, the configuration files allow for model-specific prefixes on each line, should you wish to propagate specific configuration entries to certain models. For example, all executives might have the top-end model in Yealink’s range, and may want particular items displayed, while salespeople might have another model and may require the buttons to have different functions from the administration staff. Any changes can be implemented swiftly and easily, using a simple text editor with a search-and-replace feature.

So, here on Project Overkill, I need a TFTP server to host my bespoke configurations. OpenWRT/LEDE 17.01.4 is already doing duty as my DHCP server, and it comes with a TFTP server built-in but not enabled.

All I need to do is enable the TFTP server and edit /etc/config/dhcp to achieve two things, and I’m good to go:

  • present option 66 to requesting clients, and;
  • define a particular directory for the storage of the files. I chose /etc/tftpd/.

Then I upload all of my configuration files to /etc/tftpd/ on OpenWRT/LEDE, reboot my T29G, and watch it reconfigure itself by magic.

On the subject of rebooting, pressing buttons is yesterday’s news. In the world of Project Overkill, remote control of the device sitting on the desk right next to me is the way to go. And the T29G provides a method to do just that. Yealink calls it Action URI, it’s disabled by default (it offers opportunities for pranks and other, more malicious activities if it’s not properly secured), and enabling it is a simple matter of updating a few lines in the configuration files. Once Action URI is switched on, I can reboot my phone from a simple curl or wget command line.

The T29G has a single USB port which can be used by WiFi adapters, Bluetooth adapters, and even USB flash drives. I already had a spare compatible Bluetooth adapter gathering dust (look for adapters with the CSR8510 chipset), so didn’t have to buy Yealink’s own-brand (and overpriced) adapter. Now I can use my Bluetooth headset with this phone.

I’ve only scratched the surface of the myriad configuration options available; I’ve got plenty to keep me amused for weeks to come.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s