Skip to main content

Cloud

Distinguishing Between Voice Routes Configured for Load Balancing vs. Voice Policies Configured for Failover and Least Cost Routing in Lync Server 2010

Overview
Lync Server 2010 is extremely granular when it comes to routing voice calls. Lync administrators can configure a voice call to load balance between multiple PSTN gateways within a single site or failover to a PSTN gateway in a second site in the event the primary PSTN gateway fails. After numerous discussions with colleagues and clients, I thought I’d share my thoughts on the difference between the two configurations.
Table 1 below provides a voice routing overview. There are two sites (HQ and Branch). The HQ site is in Chicago with a 312 area code and the Branch site is in Indiana with a 260 area code.

Table 1 – Voice Routing Overview

Figure 1 below provides an example topology between the HQ and Branch sites.

 

Figure 1 – Topology Overview

Voice Routes Configured for Load Balancing
Table 2 below outlines various configuration scenarios related to load balancing outbound calls between PSTN gateways.

Table 2 – Voice Route Load Balancing

Figure 2 below displays a correctly configured Voice Route with a single gateway. As outlined in scenario 1 and 4 above, Lync will not load balance voice traffic between voice gateways if only a single gateway is defined in the voice route.

Figure 2 – Single PSTN Gateway

Figure 3 below displays an incorrectly configured Voice Route with two gateways spread across the two different sites. As outlined in scenario 3 and scenario 6 above, Lync will load balance voice traffic between the PSTN gateways defined in the voice route. In this scenario however, voice traffic will round robin between the Branch and HQ site which would cause unexpected results (caller-id issues, bandwidth consumption, call quality issues, etc.).

Figure 3 – Incorrectly Configured PSTN Gateway Load Balancing

Figure 4 below displays a correctly configured Voice Route with two gateways in the same site. As outlined in scenario 2 and scenario 5 above, Lync will load balance voice traffic between the PSTN gateways defined in the voice route. In this scenario though, voice traffic will correctly round robin between the PSTN gateways in the HQ site.

Figure 4 – Correctly Configured PSTN Gateway Load Balancing

Figure 5 below provides an example topology distinguishing voice load balancing between the HQ and Branch sites.

Figure 5 – Voice Load Balancing Per Site

Voice Policies Configured for Failover and Least Cost Routing
Now that we’ve reviewed how Lync Server 2010 load balances outbound voice traffic to various PSTN gateways, let’s review how to correctly configure voice policies to handle gateway failure and least cost routing. Table 3 below displays a 1:1 relationship between a voice route and PSTN gateway – meaning Lync will attempt to route a specific call type (e.g. local calls) out a single PSTN gateway (HQ-SBA.kcdemo.local).

Table 3 – Voice Route & PSTN Gateway Assignment

Table 4 below outlines various configuration scenarios related to gateway failover and least cost routing.

Table 4 – Voice Policy Failover & Least Cost Routing

HQ Site Example
Figure 6 below displays a basic voice policy (HQ-Unrestricted) that does not have a failover or least cost usage configured. In this example, UserA has been assigned the HQ-Unrestricted voice policy. All outbound calls made by UserA will route out the local HQ PSTN gateway (HQ-SBA.kcdemo.local).

Figure 6 – HQ Voice Policy with no Failover or Least Cost Route

Figure 7 below displays an advanced voice policy (HQ-Unrestricted) that has multiple failover and least cost usages configured. In this example, UserB has been assigned the HQ-Unrestricted voice policy. In this scenario, UserB will experience the following:

  • All local calls (312 area code) will route out UserB’s local PSTN gateway (HQ-SBA.kcdemo.local)
  • Indiana calls (260 area code) will route out the branch gateway (Branch-SBA.kcdemo.local)
  • All long distance calls will route out UserB’s local PSTN gateway (HQ-SBA.kcdemo.local)
    • If the local PSTN gateway (HQ-SBA.kcdemo.local) were to fail, all outbound long distance calls would failover to the branch gateway (Branch-SBA.kcdemo.local)
  • All international calls will route out UserB’s local PSTN gateway (HQ-SBA.kcdemo.local)
    • If the local PSTN gateway (HQ-SBA.kcdemo.local) were to fail, all outbound international calls would failover to the branch gateway (Branch-SBA.kcdemo.local)

Figure 7 – HQ Voice Policy Configured for Least Cost Routing & Failover

Figure 8 below provides an example topology distinguishing how the HQ-Unrestricted voice policy will handle primary, failover, and least cost PSTN usages between the HQ and Branch sites.

Figure 8 – Topology for HQ Voice Policy Configured for Least Cost Routing & Failover

Branch Site Example
Figure 9 below displays a basic voice policy (Branch-Unrestricted) that does not have a failover or least cost usage configured. In this example, UserC has been assigned the Branch-Unrestricted voice policy. All outbound calls made by UserC will route out the local Branch PSTN gateway (Branch-SBA.kcdemo.local).

Figure 9 – Branch Voice Policy with no Failover

Figure 10 below displays an advanced voice policy (Branch-Unrestricted) that has multiple failover and least cost usages configured. In this example, UserD has been assigned the Branch-Unrestricted voice policy. In this scenario, UserD will experience the following:

  • All local calls (260 area code) will route out UserD’s local PSTN gateway (Branch-SBA.kcdemo.local)
  • Chicago calls (312 area code) will route out the HQ gateway (HQ-SBA.kcdemo.local)
  • All long distance calls will route out UserD’s local PSTN gateway (Branch-SBA.kcdemo.local)
    • If the local PSTN gateway (Branch-SBA.kcdemo.local) were to fail, all outbound long distance calls would failover to the HQ gateway (HQ-SBA.kcdemo.local)
  • All international calls will route out UserD’s local PSTN gateway (Branch-SBA.kcdemo.local)
    • If the local PSTN gateway (Branch-SBA.kcdemo.local) were to fail, all outbound international calls would failover to the HQ gateway (HQ-SBA.kcdemo.local)

Figure 10 – Branch Voice Policy Configured for Least Cost Routing & Failover

Figure 11 below provides an example topology distinguishing how the Branch-Unrestricted voice policy will handle primary, failover, and least cost PSTN usages between the Branch and HQ sites.

 

Figure 11 – Topology for Branch Voice Policy Configured for Least Cost Routing & Failover

Miscellaneous Information
Failed Gateway
The following are Event Viewer errors that will appear when the Lync Mediation service cannot communicate to a primary PSTN gateway.

Log Name: Lync Server 
Source: LS Mediation Server 
Date: 5/31/2011 5:43:27 PM 
Event ID: 25051 
Task Category: (1030) 
Level: Error 
Keywords: Classic 
User: N/A 
Computer: Branch-SBA.kcdemo.local 
Description: 
There was no response from a gateway to an OPTIONS request sent by the Mediation Server. 
The Gateway peer, Branch-SBA.kcdemo.local, is not responding to an OPTIONS request sent by the Mediation Server service 
Cause: The Mediation Server service cannot communicate with the Gateway Peer Service over SIP due to network connectivity issues. 
Resolution: 
Please ensure network connectivity and availability of the Gateway Peer for the Mediation Server service to be able to function correctly. 
Event Xml: 
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> 
 <System> 
 <Provider Name="LS Mediation Server" /> 
 <EventID Qualifiers="50182">25051</EventID> 
 <Level>2</Level> 
 <Task>1030</Task> 
 <Keywords>0x80000000000000</Keywords> 
 <TimeCreated SystemTime="2011-05-31T22:43:27.000000000Z" /> 
 <EventRecordID>3798</EventRecordID> 
 <Channel>Lync Server</Channel> 
 <Computer>Branch-SBA.kcdemo.local</Computer> 
 <Security /> 
 </System> 
 <EventData> 
 <Data>Branch-SBA.kcdemo.local</Data> 
 </EventData> 
</Event>
Log Name: Lync Server 
Source: LS Mediation Server 
Date: 5/31/2011 5:43:28 PM 
Event ID: 25036 
Task Category: (1030) 
Level: Error 
Keywords: Classic 
User: N/A 
Computer: Branch-SBA.kcdemo.local 
Description: 
Mediation Server cannot reach the Gateway. Additional failures will not be logged. 
Cannot reach Gateway: Branch-SBA.kcdemo.local 
Cause: Gateway IP address is invalid or gateway is not functioning correctly. 
Resolution: 
Check the Gateway address and Gateway status. 
Event Xml: 
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> 
 <System> 
 <Provider Name="LS Mediation Server" /> 
 <EventID Qualifiers="50182">25036</EventID> 
 <Level>2</Level> 
 <Task>1030</Task> 
 <Keywords>0x80000000000000</Keywords> 
 <TimeCreated SystemTime="2011-05-31T22:43:28.000000000Z" /> 
 <EventRecordID>3799</EventRecordID> 
 <Channel>Lync Server</Channel> 
 <Computer>Branch-SBA.kcdemo.local</Computer> 
 <Security /> 
 </System> 
 <EventData> 
 <Data>Branch-SBA.kcdemo.local</Data> 
 </EventData> 
</Event>
Log Name: Lync Server 
Source: LS Outbound Routing 
Date: 5/31/2011 5:43:58 PM 
Event ID: 46009 
Task Category: (1038) 
Level: Error 
Keywords: Classic 
User: N/A 
Computer: Branch-SBA.kcdemo.local 
Description: 
An attempt to route to a gateway failed. 
Could not route to Gateway Branch-SBA.kcdemo.local, the attempt failed with response code: 504 Cannot connect to gateway. Socket error: ConnectionRefused (CallID: 961ebe754b964b55bf9aa3085202ce43). 
Failure occurrences: 1, since 5/31/2011 5:43:28 PM. 
Cause: A gateway failed to respond to a request within allotted time or was unable to route the request due to some error. 
Resolution: 
Check whether the specified gateway is up and is properly configured. 
Event Xml: 
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> 
 <System> 
 <Provider Name="LS Outbound Routing" /> 
 <EventID Qualifiers="50190">46009</EventID> 
 <Level>2</Level> 
 <Task>1038</Task> 
 <Keywords>0x80000000000000</Keywords> 
 <TimeCreated SystemTime="2011-05-31T22:43:58.000000000Z" /> 
 <EventRecordID>3800</EventRecordID> 
 <Channel>Lync Server</Channel> 
 <Computer>Branch-SBA.kcdemo.local</Computer> 
 <Security /> 
 </System> 
 <EventData> 
 <Data>Branch-SBA.kcdemo.local</Data> 
 <Data>504 Cannot connect to gateway. Socket error: ConnectionRefused</Data> 
 <Data>961ebe754b964b55bf9aa3085202ce43</Data> 
 <Data>1</Data> 
 <Data>5/31/2011 5:43:28 PM</Data> 
 </EventData> 
</Event>

Recovered Gateway
The following are Event Viewer messages that appear when the Lync Mediation service recovers from a primary PSTN gateway outage.

Figure 12 – Event Viewer Log

Log Name: Lync Server Source: LS Outbound Routing
Date: 5/31/2011 5:44:33 PM
Event ID: 46027
Task Category: (1038)
Level: Information
Keywords: Classic
User: N/A
Computer: Branch-SBA.kcdemo.local
Description:
A PBX gateway is now responding to requests after some failures.
Gateway name: Branch-SBA.kcdemo.local, Number of failures seen 1
Event Xml:
<Event xmlns=”http://schemas.microsoft.com/win/2004/08/events/event”>
<System>
<Provider Name=”LS Outbound Routing” />
<EventID Qualifiers=”17422″>46027</EventID>
<Level>4</Level>
<Task>1038</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime=”2011-05-31T22:44:33.000000000Z” />
<EventRecordID>3801</EventRecordID>
<Channel>Lync Server</Channel>
<Computer>Branch-SBA.kcdemo.local</Computer>
<Security />
</System>
<EventData>
<Data>Branch-SBA.kcdemo.local</Data>
<Data>1</Data>
</EventData>
</Event>
Log Name: Lync Server 
Source: LS Mediation Server 
Date: 5/31/2011 5:44:34 PM 
Event ID: 25038 
Task Category: (1030) 
Level: Information 
Keywords: Classic 
User: N/A 
Computer: Branch-SBA.kcdemo.local 
Description: 
Mediation Server is able to reach the Gateway Branch-SBA.kcdemo.local 
Event Xml: 
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> 
 <System> 
 <Provider Name="LS Mediation Server" /> 
 <EventID Qualifiers="17414">25038</EventID> 
 <Level>4</Level> 
 <Task>1030</Task> 
 <Keywords>0x80000000000000</Keywords> 
 <TimeCreated SystemTime="2011-05-31T22:44:34.000000000Z" /> 
 <EventRecordID>3802</EventRecordID> 
 <Channel>Lync Server</Channel> 
 <Computer>Branch-SBA.kcdemo.local</Computer> 
 <Security /> 
 </System> 
 <EventData> 
 <Data>Branch-SBA.kcdemo.local</Data> 
 </EventData> 
</Event>

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Keenan Crockett

Skype for Business Team Lead & Senior Solution Architect at Perficient | Microsoft Certified Master: Lync Server | Focused on deploying Microsoft UC solutions

More from this Author

Follow Us
TwitterLinkedinFacebookYoutubeInstagram