I recently was tasked with setting up a Yealink VoIP telephone system which misleadingly states on it’s spec sheet that it can hold 1000 phonebook entries (up to three numbers per entry: mobile, office, other). Specifically I was using several “Yealink W73H DECT Handset” and a “Yealink W70B DECT IP Base Station”, however I expect this will be the same for all other Yealink models.

“Local phonebook for up to 1000 entries (store in the base)”

However upon closer inspection each handset has it’s own unique phonebook, so while the base station can hold 1000 phonebook entries, these 1000 entries gets split equally between the 10 possible handsets and so you can only have a maxiumm of 100 entries per handset.

Unfortunately there is no way to reallocate a larger number of entries to one or two handsets if you are using less than 10 handsets with the base. So, you are stuck with up to 100 phonebook entries per handset.

I did quite a bit of searching for “Why aren’t all my contacts showing on my Yealink phone handset?”, “How many contacts can a yealink phone hold?”, “How to store more than 100 numbers per yealink handset?” and the like but didn’t find any good answers so here are my notes.

I don’t need masses of entries but need somewhere between 150 and 300 entries which far exceeds the limit of these handsets, however is easily achievable with the remote phonebook if you have some kind of webserver to put the XML file onto.

Remote XML Phonebook

Returning to the spec sheet in search of a solution, I noticed the base station also supports a remote phonebook.

“Remote phonebook/LDAP/XML phonebook”

I imagine this is commonplace in business settings where the phonebook is handled by a central Active Directory or LDAP server which allows a company to keep a single database of their staff details (email address/computer password/phone number) and have their phone handsets able to search for their colleague’s numbers. However this won’t work for my use case here, as there isn’t an LDAP server present.

I did some more digging and found the “XML phonebook” is a very simple HTTP/HTTPS based solution where the base station makes requests to fetch XML in specific formats. This could be a dynamic API endpoint on top of a database or a static XML file.

CSV to XML conversion

Not wanting to overcomplicate things, I decided to create a static XML file containing the phonebook in the correct syntax and upload it to a webserver. To make this process easier, I wrote a script to convert a CSV file into a Yealink formatted XML file so I could manage the phonebook though spreadsheet software such as Google Sheets, Microsoft Excel or LibreOffice Calc.

The CSV file is in a simple format containing a group name (to organise the numbers on the handset), a name and up to three numbers per entry.

group_name,person_name,office_phone,mobile_phone,other_phone
"Staff","Example Person",01234567890,07777777777,
"Staff","Second Person",01234098765,07888888888,
"Suppliers","Another Person",,,01234567890

The script converts the above CSV file into an XML file in the Yealink format which looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<YealinkIPPhoneBook>
  <Title>Yealink</Title>
  <Menu Name="Staff">
    <Unit Name="Example Person" Phone1="01234567890" Phone2="07777777777" Phone3="" default_photo="Resource:"/>
    <Unit Name="Second Person" Phone1="01234098765" Phone2="07888888888" Phone3="" default_photo="Resource:"/>
  </Menu>
  <Menu Name="Suppliers">
    <Unit Name="Another Person" Phone1="" Phone2="" Phone3="01234567890" default_photo="Resource:"/>
  </Menu>
</YealinkIPPhoneBook>

If and when the phonebook needs changing, the CSV file can be editied, the CSV to XML conversion script rerun and the resulting XML file re-uploaded to the webserver.

Don’t host any private information, such as people’s contact details, on a publicly accessible webserver. Use an internal-only webserver or ensure there are adequate security measures in place to secure the file.

The conversion script can be found at https://git.sr.ht/~techwilk/phonebook