Directories
Whenever you search a user on XiVO using any of its Web Apps or a registered phone, it uses the module Dird to query sources named Directories. If you have a custom source, such as a LDAP, that you would like XiVO to know about and rely on, you must first register it as a Directory. Then you must write the right configuration, so XiVO is able to query it and render the right informations from it.
These are the steps to do so:
There are 5 different Directory Types, each having some specific configurations. You will find some exampes in those pages, but you must follow the procedure here.
Note
Phone IP should be in the authorized subnet to access the directories. See Remote directory.
I. Add a Directory
You define where the data source that will become a Directory is located and what is its type.
Default configuration
In
:Directory name: the directory name
Type: select among:
URI: the data source location
Description: (optional) a description of the directory
Warning
Editing the URI later requires you to save again the Directory Definition because the corresponding URI on Definition will be broken. After that you shall restart Dird
LDAPs (specific)
II. Add a Directory Definition
Under Definition, you define:
the Directory Source Name
the Directory Fields that will be used for the search. Directory Fields are values that shall be available on the source. If you’re configuring your own custom source, you know what they are.
the mapping between the Directory Fields and a the DisplayFilter Fields (see Display Filter)
In
:Name: the Directory Source Name
URI: the data source, one linked to the Directory you defined above will appear
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: the mapping between your Directory Fields and the DisplayFilter Fields
Fieldname: your Directory Fields (the values you want to read from it)
Value: the associated DisplayFilter Fields
Important
The Directory Source Name cannot contain special characters, use a-z, A-Z, 0-9
III. Register the Directory
Your Directory is defined but not activated. It has to be selected, through its Directory Source Name, for direct search and/or for reverse lookup.
Register Directory for direct search
In
.Edit your context (usually default)
Select your display filter (usually Display, see Display Filter)
Add the directories in the Directories section.

Register Directory for reverse lookup
See Reverse lookup to have further details about this functionnality.
In
.Add the directories to include to reverse lookups in the Related directories section.

IV. Restart Dird
Use one ofthese methods:
console
service xivo-dird restart
on XiVO PBX
You may want to follow closely Dird logs there, so you are sure no Directory fails to reload.
Directory Types
Display Filter
Location
Default

Attributes
Each line in the display filter will result in a header in your Web Apps.
Field title: text displayed in the header.
Field type: type of the column, this information is used by the Web Apps. (see type description)
Field name: names of the variables to map in Directory Definitions to Directory Fields reverse_lookup
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.

Merge Contacts


Given you have several different registered Directories containing users having common emails.
Given those Directories have for Directory Source Name: internal, ldap1, phonebook, CsvFileOne
Define the Merge Order in xivocc’s custom.env with
DIRECTORY_SOURCES_PRIORITY
and the sources you want to merge, separated by,
:
DIRECTORY_SOURCES_PRIORITY="ldap1,internal,phonebook"
DIRECTORY_INTERNAL_SOURCE
applies a different order for merging the phone (precisely contact_1_callable according to the default Display).DIRECTORY_INTERNAL_SOURCE="internal,phonebook"
DIRECTORY_INTERNAL_SOURCE
can only contain members ofDIRECTORY_SOURCES_PRIORITY
. Any other member won’t be read.DIRECTORY_INTERNAL_SOURCE
merging happen after theDIRECTORY_SOURCES_PRIORITY
merging, updating the object.
Important
If DIRECTORY_SOURCES_PRIORITY
is not provided nothing is done. Duplicates are then maintained.
Important
If a Source provides several times a contact with the same email (for instance several people use a service email), then these won’t be merged.
Important
You need to restart XUC for this configuration to apply: xivocc-dcomp up -d xuc
Warning
The merge appears only on xivo-dird results. If the search term does not lead xivo-dird to retrieve all contacts you want to merge, the merge will be uncomplete. An example of this will be searching contacts by service name, where most likely, only the ldap entries will be found by xivo-dird and not be mergeable with their internal counterpart.