Directories

This page documents how to add and configure directories from custom sources. Directories added from custom sources can be used for lookup via the directory feature of phones or for reverse lookup on incoming calls.

An example of adding a source and configuring source access is made for each type of source:

Note

Phone IP should be in the authorized subnet to access the directories. See Remote directory.

Directories are rendered thanks to a display filter:

Adding a source

Note

See LDAP for adding this source.

You can add new data sources via the Configuration ‣ Management ‣ Directories page.

  • Directory name: the name of the directory

  • Type: there are 4 types of directory:

  • URI: the data source

  • Description: (optional) a description of the directory

Configuring source access

Go in Services ‣ CTI Server ‣ Directories ‣ Definitions and add a new directory definition.

  • Name: the name of the directory definition

  • URI: the data source

  • Delimiter: (optional) the field delimiter in the data source

  • Direct match: the list used to match entries for direct lookup (comma separated)

  • Match reverse directories: (optional) the list used to match entries for reverse lookup (comma separated)

  • Mapped fields: used to add or modify columns in this directory source

    • Fieldname: the identifier for this new field

    • Value: a python format string that can be used to modify the data returned from a data source

Reverse lookup

It’s possible to do reverse lookups on incoming calls to show a better caller ID name when the caller is in one of our directories.

Reverse lookup will only be tried if at least one of the following conditions is true:

  • The caller ID name is the same as the caller ID number

  • The caller ID name is “unknown”

Important

Reverse lookup is performed after Caller Number Normalization (since XiVO 13.11).

To enable reverse lookup, you need to add an entry in Mapped fields:

  • Fieldname: reverse

  • Value: the header of your data source that you want to see as the caller ID on your phone on incoming calls

Example

  • Match reverse directories: phonebooknumber.office.number,phonebooknumber.mobile.number,phonebooknumber.home.number

  • Fieldname: reverse

  • Value: phonebook.society

This configuration will show the contact’s company name on the caller ID name, when the incoming call will match office, mobile or home number.

../../_images/xivo_phonebook_reverse.png

Services ‣ CTI Server ‣ Directories ‣ Definitions

Phone directory

Phone directory takes 2 Fieldname by default:

  • display_name: the displayed name on the phone

  • phone: the number to call

Examples:

You will find below some useful configurations of Mapped fields.

Adding a name field from firstname and lastname

Given a configuration where the directory source returns results with fields firstname and lastname . To add a name column to a directory, the administrator would add the following Mapped fields:

  • Fieldname: name

  • Value: {firstname} {lastname}

Prefixing a field

Given a directory source that need a prefix to be called, a new field can be created from an exising one. To add a prefix 9 to the numbers returned from a source, the administrator would add the following Mapped fields:

  • Fieldname: number

  • Value: 9{number}

Adding a static field

Sometimes, it can be useful to add a field to the search results. A string can be added without any formatting. To add a directory field to the xivodir directory, the administrator would add the following Mapped fields:

  • Fieldname: directory

  • Value: XiVO internal directory

Configuring source display

XiVO Client

The display filter defines how the sources values can be used on XiVO Client. See Display Filter

Phone

The only way to configure display phone directory is through XiVO dird configuration.

Adding a directory

To include a directory in direct directory definition:

  1. Go to Services ‣ CTI Server ‣ Directories ‣ Direct directories.

  2. Edit your context.

  3. Select your display filter.

  4. Add the directories in the Directories section.

To include a directory in reverse directory definition:

  1. Go to Services ‣ CTI Server ‣ Directories ‣ Reverse directories.

  2. Add the directories to include to reverse lookups in the Related directories section.

Applying changes

To reload the directory configuration for XiVO Client, phone lookups and reverse lookups, use one of these methods:

  • Services ‣ IPBX ‣ Control ‣ Restart Dird server

  • console service xivo-dird restart