Audiocodes SBC – Using LDAP to populate the from field in INVITE messages

In my previous post we saw how to enable LDAP integration in Audiocodes SBC, now let’s see a practical application of using LDAP queries.

Practical case:

Very often it happens that traditional PBX systems and Skype for Business or Teams Direct Routing components must be integrated within the same telephony infrastructure.

Sometimes it happens that incoming calls to Skype for Business and Teams DR come from a system that sends only the number but not the name of the caller in the SIP signaling, the result is that the Skype for Business or Teams user sees an incoming call from a phone number that does not recognize. Through the integration of the SBC with an LDAP source it is possible to search for the caller’s telephone number and manipulate the SIP signaling by adding his name.

This function is feasible for all users registered in Active Directory but non only, for example it can be used also with a CRM as a LDAP source, where numbers of external users, such as customers and suppliers, are stored. First of all you need the “LDAP Server Group Name” to the default routing policy or to a new routing policy.

In “LDAP Servers Group Name” field you must enter the name of the group defined in the LDAP integration configuration, in my case is the default: Now it’s necessary to define a “Call Setup Rule” whose function is to execute the LDAP query and execute the specific action, which will then be engaged by the routing engine:


Name < Name of the Call Setup Rule >
Rules Set ID Number of the set ID to use in the routing rules
Request Type LDAP
Request Target Name of the LDAP Servers Group Name
Request Key ‘telephoneNumber=’ + header.from.URL.User
Attribute To Get cn
Condition exists


Action Subject Header.from.Name
Action Type Modify
Action Value

In the “IP-to-IP Routing” rule we define the routing criteria and the “Call Setup Rule ID” that we have just created: At this point, when an incoming call executes the match with the respective routing rule, the following will happen:

  1. The “header.from.URL.User” field of the SIP INVITE is read
  2. An LDAP query is made to find the AD object that contains the value of the “header.from.URL.User” field in the “telephoneNumber” field
  3. The value of the “cn” field of the AD object found is read, if the field is populated (condition)
  4. The value of the “Header.from.Name” field is changed with the value of the “cn” field

in this way the “Header.from.Name” field is populated with the name of the user AD and presented to Skype for Business or Teams.


At this time Teams ignores the content of the “Header.from.Name” field but the introduction of this feature is in the roadmap.