Audiocodes SBC – Dynamic Routing based on LDAP query

In my previous post we saw how to enable LDAP integration in Audiocodes SBC and in another post how to use LDAP integration to integrate the caller’s name into a SIP message.

In this post we will see how to use LDAP integration to dynamically route calls based on the value of an Active Directory field.

To implement this functionality, as in the previous post, the “Call Setup Rules” are used to define the LDAP query, the conditions and the actions to be performed.

In the case that I will describe the scenario it’s quite simple, but with a little patience it’s possible to construct very complex and concatenated Call Setup Rules.

Practical case:

In this case the PSTN network is attested on a Cisco Cube Voice Gateway, as well as the Call Manager infrastructure on which a part of the telephone system takes over.

The Audiocodes SBC has a SIP trunk to the Skype for Business infrastructure and a trunk to Teams Direct Routing.

The goal is to make sure that the incoming calls coming from the PSTN or from the Cisco Call Manager infrastructure are routed based on a dynamic rule that uses LDAP integration with Active Directory.

To understand where a user is homed, we can use the “msRTCSIP-DeploymentLocator” AD attribute, which if the user resides on a Skype for Business pool, has the value “SRV:”, while if it’s homed on Skype for Business Online or on Teams, has value “”.

In the case where we had some users on Skype for Business Onprem and some users Online we should introduce a second criteria to distinguish SFBO users from Teams users, but in our case, everything is simpler, when a user is brought Online is migrated to Teams at the same time.

Let’s proceed with creating the necessary Call Setup Rules:

And the necessary IP-to-IP Routing Rules:

This is the flowchart of an incoming call:


Related Posts: