Type something to search...
How to enable LDAP routing in an Audiocodes SBC

How to enable LDAP routing in an Audiocodes SBC


Introduction

LDAP (Lightweight Directory Access Protocol) routing over an SBC (Session Border Controller) allows calls to be managed using information stored in an Active Directory. Here’s a detailed explanation of how it works.


Why implement LDAP routing ?

In a Microsoft Teams telephony project, the Caller ID and Caller Name are sent either via Teams or via the SBC. But in some cases, these two options are not possible (multi-system integration, etc.) and these two attributes must retrieve their values ​​elsewhere. This is where LDAP routing comes in.

In my case, Teams telephony is connected to my Audiocodes SBC, which is also connected to Telnyx (a SIP provider) and Genesys (a contact center). I can’t force the Caller ID from Teams because my information would be overwritten for all my calls to Genesys. I also can’t force it via the SBC because my extensions aren’t designed to have a range per site, and each of my sites has its own number to display.

So I connect my SBC to my Active Directory servers to retrieve the information to display directly from the user profile.


Prerequisites

Service account

  • A service account on the Active Directory server.

Administrator role

  • An administrator account to access the Audiocodes SBC.
  • An account with the Enterprise Administrator role to access the Active Directory server.

Others

  • Schedule the configuration during off-hours.

Step 1 : Log in to the SBC

Connect to the SBC by opening your web browser to https://YOUR_IP_ADDRESS.

image


Step 2 : Enable the LDAP service

warning

A reboot is required!

Click Setup, IP Network, then AAA Servers and LDAP Settings.

Set the LDAP Service option to Enable.

Click Save, then Restart.

image


Step 3 : Create the server group

Click Setup, IP Network, then AAA Servers and LDAP Server Groups.

Keep the default options, simply give the group a name.

image


Step 4 : Create the LDAP server(s)

Click Setup, IP Network, then AAA Servers and LDAP Servers.

Point your server to the group created in step 3 and add the following parameters :

  • LDAP Network Interface : the SBC’s telephony interface
  • Use TLS : if you want to switch to LDAPS (secure)
  • LDAP Password : the service account password
  • LDAP Bind DN : the location of the service account on the server
  • LDAP Server IP : the server’s IP address
  • LDAP Server Port : the connection port (636 if TLS)

image


Step 5 : Create the search base

Click LDAP Servers Search Based DNs 0 items on each of the created servers and enter the OUs where the user accounts are located.

image


Step 6 : Create the LDAP queries

Click Setup, Signaling & Media, then SIP Definitions and Call Setup Rules.

Create the first rule with the following parameters :

  • Rules Set ID : Rule ID
  • Condition : Param.Call.Dst.User regex +(\d4)$
  • Action Type : Exit
  • Action Value : True

image


Create the second rule with the following parameters :

  • Rule Set ID : same ID as the first rule
  • Request Type : LDAP
  • Request Target : LDAP
  • Request Key : ‘otherIpPhone=tel:’ + Param.Call.Src.User
  • Attributes To Get : ipPhone
  • Condition : LDAP.Attr.ipPhone exists
  • Action Subject : Param.Call.Src.User
  • Action Type : Modify
  • Action Value : LDAP.Attr.ipPhone

image

This rule will search for the user account whose extension matches the value of the otherIpPhone attribute, and replace it with the value of the ipPhone attribute (if it is correctly entered).


Optionally, you can create a third rule with the following parameters :

  • Rule Set ID : same ID as the first rule
  • Request Type : LDAP
  • Request Target : LDAP
  • Request Key : ‘cn=’ + Param.Call.Src.Name
  • Attributes To Get : Company
  • Condition : LDAP.Attr.Company exists
  • Action Subject : Param.Call.Src.Name
  • Action Type : Modify
  • Action Value : LDAP.Attr.Company

This rule will allow you to replace the Caller Name with the value found in your user’s Company attribute.


Step 7 : Create the route

Click Setup, Signaling & Media, then SBC and IP-to-IP Routing.

Create a route to your SIP trunk and modify the Call Setup Rules Set ID option with your rule ID.

image


Step 8 : Edit Active Directory attributes

For the purposes of this demo, I used the otherTelephone attribute instead of ipPhone (you can use any other attribute you like).

  • otherIpPhone : tel:+9999 (where 9999 is the user’s extension)
  • otherTelephone : +15141237890 (where 5141237890 is the number to display)
  • Company : Maxime Lab

image


Call analysis

We can see in the Syslog capture of my Audiocodes SBC that my call goes out with the extension +9999 as Caller ID and Maxime Hiez as Caller Name.

image

Both LDAP queries found a match in the Active Directory and the conditions were able to execute.

image

My Caller ID was rewritten to +15141237890 and my Caller Name to Maxime Lab.

image


Conclusion

LDAP routing on an SBC provides an effective solution for managing caller IDs and caller names when it’s not possible to do so from Teams/the PBX.

You now know how to configure LDAP routing on an Audiocodes SBC.


Sources

Audiocodes - LDAP servers


Did you enjoy this post ? If you have any questions, comments or suggestions, please feel free to send me a message from the contact form.

Don’t forget to follow us and share this post.

Related Posts

How I resolved dropped Teams calls

How I resolved dropped Teams calls

Introduction A customer contacted me to tell me that he was having an issue with his Microsoft Teams telephony. Outgoing calls are being cut off even before the audio connection is establis

Read More
Pricing update for Teams telephony licenses

Pricing update for Teams telephony licenses

Introduction Microsoft recently announced a price increase for several Teams telephony licenses, effective April 1, 2025. This pricing update reflects the continued innovation and increased

Read More
Import the DigiCert Root G2 certificate into a Ribbon SBC

Import the DigiCert Root G2 certificate into a Ribbon SBC

Introduction Since the arrival of Teams Direct Routing telephony, TLS certificates used by Microsoft servers are linked to the following root certification authority :Common Certificate

Read More
Import the DigiCert Root G2 certificate into an Audiocodes SBC

Import the DigiCert Root G2 certificate into an Audiocodes SBC

Introduction Since the arrival of Teams Direct Routing telephony, TLS certificates used by Microsoft servers are linked to the following root certification authority :Common Certificate

Read More
How to configure callback in a Teams queue

How to configure callback in a Teams queue

Definition Callback in Teams allows callers in a queue to be called back after a certain time rather than waiting until an agent becomes available.Prerequisites **Licenses r

Read More
How to handle duplicates in Teams directory search

How to handle duplicates in Teams directory search

Introduction Microsoft recently announced a significant optimization for the search by name and extension functionality in its Teams auto attendants. You have probably already had this case

Read More
How to inventory Direct Routing numbers in Teams

How to inventory Direct Routing numbers in Teams

Introduction Microsoft Teams continues to evolve to offer ever more effective communication and collaboration solutions. To make life easier for administrators, Microsoft has announced the

Read More
Debugging Teams calls via the SIP ladder

Debugging Teams calls via the SIP ladder

Introduction Microsoft Teams continues to evolve to offer ever more advanced communication and collaboration solutions. Among the features arriving very soon, we find the possibility of obt

Read More
How to enable password writeback in Entra ID

How to enable password writeback in Entra ID

Introduction In an organization configured as hybrid with Microsoft cloud, user accounts are created in the on-premises Active Directory and are synchronized with Microsoft Entra ID. In

Read More
How to analyze Direct Routing calls via the SIP ladder

How to analyze Direct Routing calls via the SIP ladder

Introduction I wrote an article last February to announce the upcoming release of the SIP ladder to analyze Teams Direct Routing calls from the Microsoft Teams Admin Center. The feature is

Read More
How to analyze incoming calls in Teams with CQD

How to analyze incoming calls in Teams with CQD

Définition Microsoft's Teams Call Quality Dashboard (CQD) is a powerful tool designed to help administrators monitor and improve the quality of phone calls within their organization. Th

Read More