Running the service
Phonebooks for desk phones
A publication's people with a number, at an address desk phones and phone systems fetch, for caller ID and dialling from the directory.
A desk phone looks a caller up while it rings, and dials a colleague from its directory. A phonebook is what it looks in: a publication’s people with at least one number, in the format the phone reads, at an address the phone fetches every few hours. Nothing is copied by hand, and nothing goes stale: the phone fetches the publication as it stands.
Exports › Phonebooks lists them. A phonebook needs the Connectors module.
What a phonebook holds
Section titled “What a phonebook holds”The publication’s view of its list, exactly as a mailbox receives it:
- its filters: who is left out of the mailboxes is left out of the phones;
- its field set: a number the field set withholds is not in the phonebook, and a person with no number left is not in it at all;
- its rules, among them the name format (people are named as the publication files them) and the number format.
Caller ID compares the number the line presents with the numbers in the phonebook. Set Phone numbers on
the publication’s Fields tab to International or E.164, so a number typed as 044 555 01 01 matches a
call presented as +41445550101. The phonebook writes every number as the phone dials it — the spaces,
dashes and brackets taken out, +41 (0)44 read as +4144.
As signed off. A phonebook serves the version of the publication last signed off, as the mailboxes do. While an edit waits for its sign-off the phones keep the signed version, over the list as it is now; the sign-off brings the edit. A publication that is not active — a draft, paused or archived — serves an empty phonebook.
Erasure. A person erased is out of every phonebook at its next fetch.
Formats
Section titled “Formats”| Format | What the phone does with it |
|---|---|
| Yealink | Yealink’s XML remote phone book. The phone shows it as a directory and, with lookup switched on, names incoming and outgoing calls from it |
| Snom | Snom’s XML directory, opened from a function key. One entry per number, the kind of number after the name. Snom phones do not name callers from it |
| Grandstream | Grandstream’s XML phonebook, which the phone downloads into its own phonebook on a schedule |
| 3CX | 3CX’s phonebook import, a CSV in the columns of 3CX’s own sample. 3CX fetches no address: download the file and import it |
Fanvil and STARFACE have no format of their own here yet. A STARFACE system provisions Yealink and Snom phones, which take their phonebook directly; STARFACE’s own address book imports a file only by hand.
Making one
Section titled “Making one”New phonebook: choose the publication and the format. A publication has one phonebook per format; give its address to every phone of that kind.
The address is shown once, in the answer that makes it, with a copy button. It holds the phonebook’s
token, a long random secret that opens this phonebook and no other. ContactMesh keeps only a hash of it: a
lost address is replaced with Rotate, not recovered. Making a phonebook, and rotating and revoking its
token, need credentials.manage and a recent proof of who you are.
| Column | Shows |
|---|---|
| Address | The address a phone holds, the token cut after its first characters |
| Entries | How many entries the phonebook serves: people, or for Snom numbers |
| Last fetched | When a phone last fetched it, to the minute |
- Rotate gives a new address. The old one keeps working for a day (
Phonebooks:RotationGraceHours), so the phones can be given the new one first. - Revoke stops every address of the phonebook at once. New token gives it one again.
- Delete removes the phonebook; every phone holding its address is refused from then on.
Basic authentication
Section titled “Basic authentication”Switched on when the phonebook is made, the token is no longer in the address. The address is
…/phonebook/v1/phonebook.xml for every phonebook, the user name is phonebook, and the password is the
token. A proxy’s access log, a screenshot of the phone’s settings or a provisioning file listing URLs then
holds nothing that opens it. Yealink, Snom and Grandstream phones send it. A phonebook with basic
authentication refuses its token in the address.
HTTPS, and plain HTTP on the office network
Section titled “HTTPS, and plain HTTP on the office network”A token is a password, so a phonebook answers over HTTPS: through the reverse proxy, or from the host itself. Many desk phones on an office network speak only plain HTTP, or cannot check the proxy’s certificate. For them, name their networks:
PHONEBOOK_PLAIN_HTTP_NETWORKS=192.168.10.0/24,10.20.0.0/16A fetch over plain HTTP is then taken from a phone whose address — as the proxy reports it — is in one of those networks, and refused from anywhere else. Over plain HTTP the token crosses that network readable; keep the list to the phones’ own networks. A phone that fetches over HTTPS needs to trust the proxy’s certificate: a public one is trusted out of the box, a private one has to be installed on the phone.
A proxy that passes only some paths to ContactMesh, as the phone app’s proxy in a DMZ does, has to pass
/phonebook/ too.
On the phone
Section titled “On the phone”Yealink
Section titled “Yealink”On the phone’s web interface, Directory › Remote Phone Book:
| Setting | Value |
|---|---|
| Remote URL | The address |
| Display Name | What the directory calls it, for example Company |
| Username, Password | With basic authentication: phonebook and the token |
| Incoming/Outgoing Call Lookup | Enabled |
| Update Time Interval | 3600 seconds, the shortest the phone takes |
Provisioned, the same is remote_phonebook.data.1.url, remote_phonebook.data.1.name,
remote_phonebook.data.1.username, remote_phonebook.data.1.password, features.remote_phonebook.enable = 1
and features.remote_phonebook.flash_time = 3600. Yealink recommends fewer than 5,000 entries and holds a
file to 1.5 MB (768 KB on a phone with a black-and-white screen).
On the phone’s web interface, Function Keys: set a key, or the directory key, to the type Action URL with the address as its value. With basic authentication, give the phone the user name and the token as the credentials it sends to web servers. Pressing the key shows the phonebook; choosing an entry dials it.
Grandstream
Section titled “Grandstream”On the phone’s web interface, Phonebook › Phonebook Management:
| Setting | Value |
|---|---|
| Enable Phonebook XML Download | HTTPS (or HTTP on a network named above) |
| Phonebook XML Server Path | The address without https://, up to and including the token: contactmesh.example.com/phonebook/v1/cmpb_… |
| Phonebook Download Interval | In minutes, 60 for example |
| HTTP/HTTPS User Name, Password | With basic authentication: phonebook and the token |
The phone adds phonebook.xml to the path itself. Provisioned, these are P330 (3 for HTTPS), P331,
P332, P6713 and P6714. A GXP16xx holds 1,000 contacts, a GXP17xx or GXP21xx 2,000.
Open the address in a browser: it downloads phonebook.csv. In 3CX’s admin console, System ›
Phonebook, choose the Company phonebook and Import the file. 3CX takes up to 1,000 entries an import,
and an import adds what the file holds: remove the entries of an earlier import before importing again.
3CX names callers from the phonebook by as many digits as its Contacts Options say; 3CX recommends 7.
How often a phone fetches
Section titled “How often a phone fetches”As often as it likes. ContactMesh builds a phonebook when its publication, its list or its field set moves,
not when it is fetched, and answers with an ETag: a phone that already holds the current phonebook is
told so in a few bytes. A change at the source reaches a phone at its first fetch after the source’s next
round. Tokens refused from one address are limited to thirty a minute.