Lync Voice Routing: Getting to the Gateway from ANY Mediation Server

If you have ever had to configure multiple Pools with associated gateways you may have noticed that creating a resilient routing environment can be a challenge.

For instance, its rather common to setup route failover by simply adding the alternative route\s in the Associated PSTN Usages. Ken Lasko has documented this and the associated misconception here. Nice post Ken 🙂

What if you need to route to the same SBC from any (or a selection of your choice) Mediation Server? Simple you may say..

A common mistake\assumption is that if you add all the Mediation server and Gateway combinations in the Topology builder so that a view of the PSTN Gateways reveals all the required Mediation Servers (as in the image below) then the routing logic would select whatever Mediation Server was available.

Once you have added the Trunks and the associated Mediation Servers you will notice the view of the PSTN Gateway tab similar to below.

So here I have 4 Mediation Servers to route to, the first marked as Root. What does this Root mean?

The Initial Mediation Server that was selected when you add the PSTN Gateway in the Topology is considered the Root. When you are selecting the Associated Trunk in Voice Routing, the PSTN Gateway Name is presented (in My case I used the IP Address as the name – also referred to as AKL_SBC_02 in my Trunks)

. . This also means that outbound calls will use ONLY the associated Mediation Server referred to as per the Root Trunk. You can test this by disabling the Lync Mediation Service, you will notice that you cant make any outbound calls.

WARNING – If you have multiple PSTN Usages associated then the Voice Policy the call may failover to the next PSTN Usage in the list, this may fool you into believing that the next Mediation Server was selected.

How do you add additional Mediation Servers to allow routing of Lync calls to the same gateway?

This is done from the Voice Policy when selecting the Associated Trunks. When you click Add you will notice that the trunks added in the Topology builder are shown.

In my example I have 4 trunks for each gateway. That’s because I have 4 Mediation Servers and wanted a Trunk to represent each Gateway and Mediation Server combination. Looking at the next image you will see all 4 my options, the first highlighted in yellow is the Root Trunk for this PSTN Gateway, the other 3 are one each for each mediation server that will connect to the same Gateway.

So the Associated Trunks represent each Mediation Server that will connect to the SBC and after selecting each Trunk as required looks as follows:-

The next question is how to order the Mediation Server selection order. The short answer is that the Root is always selected as the first choice as long as its available. The other remaining Mediation Servers are selected in a random order and can not be managed.

To test, simply stop the Lync Mediation Service on each Front End to force the selection of the next available Mediation Service.


About Paul B

My name is Paul Bloem and I am employed at Lexel Systems in New Zealand as a Principal Consultant for Unified Communications. I have been working on enterprise voice solutions for over 20 years. My first 10 years were spent working for a Telco in South Africa (Telcom SA). This is where all the groundwork happened as I was exposed to just about every aspect of telecommunication you could imagine. I develop an interest in PBX technologies and eventually became the go-to guy. Next, I had a 10 year run at Siemens South Africa, most of my time there was as a Technical Trainer. During this time VoIP hit the world stage, I had the privilege of introducing VoIP both as H.323 and later SIP across the Siemens HiPath 4000 solution stack. In 2008 I immigrated to New Zealand with my newly attained MCSE, I was ready to go where no PBX Techie had gone before. I was employed to explore OCS 2007 and that was pretty much the beginning of the end for me. I have been working on OCS and Lync ever since. My current role focuses exclusively on Lync and associated technologies.. That includes pre-sales, consulting, architecture and design, training and support. I even get to play in the development space from time to time - focus on play ;-) I was nominated as a Microsoft VTSP for Lync early in 2013 and also awarded Microsoft's MVP award for Lync in 2014.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s