Querying the AD and Routing Priority
The device queries the AD using the initial destination number (i.e., called number). The query can return up to four user phone numbers, each pertaining to one of the IP domains (i.e., private number, Skype for Business number, PBX / IP PBX number, and mobile number). The configuration parameters listed in the table below are used to configure the query attribute keys that defines the AD attribute that you wish to query in the AD:
Parameters for Configuring Query Attribute Key
Parameter |
Queried User Domain (Attribute) in AD |
Query or Query Result Example |
---|---|---|
MSLDAPPBXNumAttributeName |
PBX or IP PBX number (e.g., "telephoneNumber" - default) |
telephoneNumber= +3233554447 |
MSLDAPOCSNumAttributeName |
Mediation Server / Skype for Business client number (e.g., "msRTCSIP-Line") |
msRTCSIP-Line=john.smith@company.com |
MSLDAPMobileNumAttributeName |
Mobile number (e.g., "mobile") |
mobile=+3247647156 |
MSLDAPPrivateNumAttributeName |
Any attribute (e.g., "msRTCSIP-PrivateLine") Note: Used only if set to same value as Primary or Secondary key. |
msRTCSIP-PrivateLine= +3233554480 |
MSLDAPPrimaryKey |
Primary Key query search instead of PBX key - can be any AD attribute |
msRTCSIP-PrivateLine= +3233554480 |
MSLDAPSecondaryKey |
Secondary Key query key search if Primary Key fails - can be any attribute |
- |
The process for querying the AD and subsequent routing based on the query results is as follows:
1. | If the Primary Key is configured, it uses the defined string as a primary key instead of the one defined in MSLDAPPBXNumAttributeName. It requests the attributes which are described below. |
2. | If the primary query is not found in the AD and the Secondary Key is configured, it does a second query for the destination number using a second AD attribute key name, configured by the MSLDAPSecondaryKey parameter. |
3. | If none of the queries are successful, it routes the call to the original dialed destination number according to the routing rule matching the "LDAP_ERR" destination prefix number value, or rejects the call with a SIP 404 "Not Found" response. |
4. | For each query (primary or secondary), it queries the following attributes (if configured): |
● | MSLDAPPBXNumAttributeName |
● | MSLDAPOCSNumAttributeName |
● | MSLDAPMobileNumAttributeName |
In addition, it queries the special attribute defined in MSLDAPPrivateNumAttributeName, only if the query key (primary or secondary) is equal to its value.
5. | If the query is found: The AD returns up to four attributes - Skype for Business, PBX / IP PBX, private (only if it equals Primary or Secondary key), and mobile. |
6. | The device adds unique prefix keywords to the query results in order to identify the query type (i.e., IP domain). These prefixes are used as the prefix destination number value in the Tel-to-IP Routing table to denote the IP domains: |
● | "PRIVATE" (PRIVATE:<private_number>): used to match a routing rule based on query results of the private number (MSLDAPPrivateNumAttributeName) |
● | "OCS" (OCS:<Skype for Business_number>): used to match a routing rule based on query results of the Skype for Business client number (MSLDAPOCSNumAttributeName) |
● | "PBX" (PBX:<PBX_number>): used to match a routing rule based on query results of the PBX / IP PBX number (MSLDAPPBXNumAttributeName) |
● | "MOBILE" (MOBILE:<mobile_number>): used to match a routing rule based on query results of the mobile number (MSLDAPMobileNumAttributeName) |
● | "LDAP_ERR": used to match a routing rule based on a failed query result when no attribute is found in the AD |
These prefixes are involved only in the routing and manipulation processes; they are not used as the final destination number.
7. | The device uses the Tel-to-IP Routing table to route the call based on the LDAP query result. The device routes the call according to the following priority: |
a. | Private line: If the query is done for the private attribute and it's found, the device routes the call according to this attribute. |
b. | Mediation Server SIP address (Skype for Business): If the private attribute doesn't exist or is not queried, the device routes the call to the Mediation Server (which then routes the call to the Skype for Business client). |
c. | PBX / IP PBX: If the Skype for Business client is not found in the AD, it routes the call to the PBX / IP PBX. |
d. | Mobile number: If the Skype for Business client (or Mediation Server) is unavailable (e.g., SIP response 404 "Not Found" upon INVITE sent to Skype for Business client), and the PBX / IP PBX is also unavailable, the device routes the call to the user's mobile number (if exists in the AD). |
e. | Alternative route: If the call routing to all the above fails (e.g., due to unavailable destination - call busy), the device can route the call to an alternative destination if an alternative routing rule is configured. |
f. | "Redundant" route: If the query failed (i.e., no attribute found in the AD), the device uses the routing rule matching the "LDAP_ERR" prefix destination number value. |
For digital interfaces (Gateway application): For Enterprises implementing a PBX / IP PBX system, but yet to migrate to Skype for Business, if the PBX / IP PBX system is unavailable or has failed, the device uses the AD query result for the user’s mobile phone number, routing the call through the PSTN to the mobile destination.
The flowchart below summarizes the device's process for querying the AD and routing the call based on the query results:
If you are using the device's local LDAP cache, see Configuring the Device's LDAP Cache for the LDAP query process.