In Lync environments that utilize multiple gateways for path failure it is important to understand the differences between a voice gateway hard and soft failure. Lync does a great job with a hard failure and will mark that gateway down and proceed to try the next gateway/trunk that has been selected in the users Voice Policy.
There are two different types of Voice gateway failures in the Lync world. They include:
1. Hard down with the voice gateway being unreachable and marked down by Lync
2. Soft down with the voice gateway is reachable but the Carrier is having an issue.
The concentration will be focused on handling a soft down failure. Our example is based on a pair of Audiocodes Mediant 2600 SBC's that have independent circuits terminating to each gateway to provide high availability and failover. In the event of a soft failure the Audiocodes gateway responds with a 408 Request timeout which is defined as "couldn't find the user or determine the location of the user in time". Because this is a client side response Lync will not failover to another gateway. In order to get Lync to try the next gateway the response code must be a 5XX Server response failure.
So we need a way to tell Lync Server when it receives a 408 client response failure to try another gateway. By using SipResponseCodeTranslationRulesList on the Lync Trunk we can translate both Sip and ISDN response codes to different Sip Response codes. In this case we will create a rule to map the client response code failure of 408 to a server side response code failure of 503 Service unavailable. Lync recognizes this as a gateway down issue and will try next PSTN usage record that is associated with the route and gateway/trunk as defined in the users Voice Policy.
Below is the command we used on the Global Trunk Configuration to convert 408 response code into a 503 response code.
New-CsSipResponseCodeTranslationRule -Parent Global -Name
"Rule-408-to-503" -ReceivedResponseCode 408 -TranslatedResponseCode
Viola! Lync will now try secondary route to alternate SBC gateway