Reference9:PBX/Objects/LDAP Search

From innovaphone wiki
Jump to navigation Jump to search

The LDAP Search object allows DECT users to search a LDAP directory. The user just have to dial the object number and the first three digits (which represents characters) of the searched user name.

Requirements

V7

Usage

Each digit represents a set of characters or a function.

Characters

'2': "abcàáâãäåæç"
'3': "defèéêëð"
'4': "ghiìíîï"
'5': "jkl"
'6': "mnoñòóôõöø"
'7': "pqrsß"
'8': "tuvùúûüþ"
'9': "wxyzýÿ"

Functions

'1': get the previous search result
'*': get the next search result
'0': jump to the next space (multiple name attributes are divided by space)
'#': call the current search result

Redial

You can redial the last dialed directory number by dialing the directory search object and *#. The * updates your screen with the last dialed entry and the # dials the entry.
Note, that there is only one last dialed entry for each pbx user, so if you are using multiple directory search objects, you just have one last dialed entry for all these objects!

Example

The pbx object gets the number *99*. The dect user dials *99*837. Now the ldap directory is searched for all combinations of characters in 8, 3 and 7 and the calling user gets the first result, e.g. "Test User". He can now scroll with '1' and '*' through all results, refine the search results by dialing more digits or/and call the current search result with '#'.

If a user dials *99*2083, a possible result would be "Anton Test", because the 0 stands for '* ', an unlimited number of characters followed by a space.

Redial: *99**#

Configuration

You can configure the object according to the following image:

LDAP Search Object

Please, consult the Related Articles section for configuration examples.

Inno PBX

If you are searching an innovaphone LDAP directory, you just have to configure the ip, username and password!

Protocol

You can select LDAP to search a common LDAP server or HTTP to send search request via HTTP POST towards a HTTP server which processes this request and responses with its found results.

Directory

Parameterize the remote LDAP server.

  • Server(mandatory): <IP address>[:port] of remote LDAP server or http://<IP address>[:port]/url of remote HTTP server
  • User: For authentication purposes. Leave empty, if server allows for anonymous access.
  • Password: For authentication purposes. Leave empty, if server allows for anonymous access.
  • Search Base(mandatory): The root DN where the search should should start at. E.g. ou=quickdial,dc=meta.
  • Name Attributes(mandatory): Enter a single attribute that is being searched for. If e.g. entryID is configured here, an LDAP search for the example from above would be searching for the LDAP filter (|(entryID=tdp)(entryID=tdq)...). You might configure up to three name attributes as a comma-separated list. Just the first attribute is searched in your ldap directory, whilst further attributes are only requested in the query. The caller will receive a name combined of all attribute values searched for (divided by a space).
  • Number Attributes(mandatory): Enter a single attribute that is known to hold the desired telephone number. Most directories maintain the attribute telephoneNumber for this purpose. Multiple attributes may be entered as comma-separated list, such that a search for telephoneNumber,mobile becomes possible. If a user has several numbers defined, there will be several search results for this user. You can optionally add a prefix (length 1) for number attributes, e.g. telephoneNumber:T,mobile:M. So the user can distinguish several results of the same person with multiple numbers.

Dialing Location

The Dialing Location is an optional setting. If an LDAP directory maintains telephone numbers in international form with a leading '+' sign, a mechanism must be available to convert or normalize such a number into a diallable number with all the required prefixes.

  • Country Code: The country code (e.g. 49 for Germany).
  • Area Code: The area code (e.g. 30 for Berlin).
  • National Prefix: The national trunk prefix (0 in Germany).
  • International Prefix: The international trunk prefix (00 in Germany).
  • External Line: The prefix, necessary to access a trunk line. This prefix equals 0 in most PBX configurations.
  • Subscriber Numbers: For the conversion of international numbers to internal extensions, the relevant subscriber numbers (comma-separated) may be configured here (E.g +49703173009).
  • Trace: Enable some tracing for support purposes.

HTTP

Encoding

The request and response must be UTF-8 encoded!

Authentication

Authentication information for the request uri has to be configured at the HTTP-Client

Request Format

The request is done via HTTP POST and stored in HTTP RAW POST DATA. It is pure XML. Here is an example:

<document>
    <digits>
        <digit>2</digit>
        <digit>3</digit>
        <digit>4</digit>
    </digits>
    <search-attribute>cn</search-attribute>
    <return-attributes>
        <attribute>cn</attribute>
        <attribute>givenName</attribute>
        <attribute>telephoneNumber</attribute>
    </return-attributes>
    <filters>
        <f>adg</f>
        <f>adh</f>
        <f>adi</f>
        ...
        
    </filters>
</document>

The request contains all dialed digits. Note, that there can be more than three, if a user dials zeros, like 2034. The zero stands for '* ' (an unlimited number of characters followed by a space (or if you have several search attributes taken out of the result attributes, the '* ' jumps to the next attribute, if you want)). The search attribute is the attribute searched for in the database. The search-attribute is the first name attribute configured for the name attributes. If neccessary, a second search attribute can be taken out of the return attributes. The return attributes contain all attributes configured for name and number attributes. The f-tags represent all possible combinations of characters.

Response Format

The response format is quite simple:

<document>
    <result cn="Begar" givenName="Http" telephoneNumber="101"/>
    <result cn="Adibert" givenName="Test" telephoneNumber="102"/>
    <result cn="Cigquest" givenName="Directory" telephoneNumber="103"/>
    ...
</document>

The document tag contains a list of result tags with attributes. These attributes are the return attributes defined in the request.

Known constraints

Additional characters

Additional characters like ',' '-' etc. are not supported due to the lack of further digits.
But you might want to implement your own HTTP service to support other characters, as the dialed digits are transferred in the HTTP POST request.

Searching for names with numbers

This is not possible, as the '0' is assigned as space or attribute jump and the '1' is used for scrolling. So for '0' and '1' can't be searched and therefor number searching is not possible at all.

Maximum number of search results

To avoid memory issues, there is a defined maximum of search results over all running calls on the search object. If this maximum is reached, further calls will be rejected.

Name attributes

There is no way to search for combined multiple attributes in the ldap directory without causing a performance hit and building huge query filters. So the search is limited for one attribute, but further given attributes are printed in the search result.

Related Articles

Here is an example configuration for an external LDAP directory. This might help you, although it is written for the quick dial object: Howto:Maintain Quickdial Numbers In Estos MetaDirectory
Example node and loc configurations can be found here: Common node and loc configuration for DTMF Ctrl