5 Tips for Configuring a Voice Gateway in Lync

This post provides 5 useful tips I found while recently configuring Lync inbound and outbound PSTN calling through an AudioCodes voice gateway – including some new features in Lync that made the job easier.

Tip #1: Use the new ‘Test Voice Routing’ Feature in the Lync Control Panel

The Test Voice Routing feature (in the “Voice Routing” section of the Lync Control Panel) is a very helpful tool for configuring outbound routing.

You can specify a sample number to dial, along with which dial plan and voice route that will process the call.  You can then see what the normalized number looks like and whether it matched the PSTN usage and voice route that you expected. You can save these scenarios as test cases and re-run them after you make configuration changes.


Tip #2:  Use the new PSTN Test Cmdlet’s

Lync server ships with a set of PSTN Connectivity Cmdlet’s.  Several of these cmdlet’s can be used to test the Lync configuration and ability to make calls.

The Test-CsPstnOutboundCall cmdlet is particularly useful for testing outbound PSTN calling. It saves having to jump out-of-context from your Lync server to make a test call with the Lync client (or device) to ensure everything is configured correctly on the Front-End and Mediation server.

Here’s a sample run of the cmdlet:

> $cred1 = Get-Credential “ExampleDomain\User01″
> Test-CsPstnOutboundCall -TargetFqdn Pool01.example.com -TargetPstnPhoneNumber “+16135551234″ –UserSipAddress “sip:User01@example.com” -UserCredential $cred1

Sample output:

TargetFqdn :  Pool01.example.com
Result     : Success
Latency    : 00:00:00.4362018
Error      :

The test cmdlet’s are synthetic transactions that can be scheduled to help monitor the PSTN connectivity.

Tip #3:  Use the Get-CsWindowsService Cmdlet to See the Current Activity on the Lync Mediation Role

The Get-CsWindowsService Cmdlet returns an ActivityLevel value which can be used to see the current number of outbound and inbound calls on a Mediation server. This is handy and a quick way to see if a call is currently being processed by the mediation server.

Sample cmdlet run:

> Get-CsWindowsService -Name RTCMEDSRV -ComputerName MEDSERVER01 | fl -property ActivityLevel

Sample Output:

> ActivityLevel : Current Outbound Calls=0, Current Inbound Calls=0, Current Outbound Priority Calls=0, Current Inbound Priority Calls=0

Tip #4:  Use Snooper.exe Version 4 from the New Lync Resource Kit to View the Call Logs on the Lync Mediation Server

The Lync resource kit was released on November 18, 2010: Microsoft Lync Server 2010 Resource Kit Tools.

It includes a version of Snooper.exe that can be used to analyze the call log files on the Lync Mediation server.

Tip #5:  Consider Creating a Static Route if you are Getting a “503 Service Unavailable” because the “Gateway peer in outbound call is not found in topology document”

If you are getting this error, consider creating a static phone route with the ReplaceHost parameter. In a nutshell, depending on your outbound calling scenario, the host portion of the SIP INVITE that is sent to the Mediation server might contain a domain name and not IP address of the Voice Gateway.  The domain name isn’t a part of the Topology, hence the error the “Gateway peer in outbound call is not found in topology document”.  The ReplaceHost parameter used in the New-CsStaticRoute cmdlet will replace the host portion with the actual next hop destination – the voice gateway – which is part of the topology.

Tom Pacyk does a good job explaining this in the context of Dial-In conferencing, but it could apply in other outbound routing situations: Lync Dial-In Conferencing Static Route Configuration.

Bonus Tip: Remember that inbound caller-id numbers are governed by the translations rules in the Global Dial-Plan, or the a Dial Plan created specifically for that voice gateway.

Share and Enjoy:
  • Twitter
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • LinkedIn
  • MySpace
  • Reddit
  • Technorati

12 comments to 5 Tips for Configuring a Voice Gateway with Lync 2010

  • Tuan Lal

    Thx for information.

  • Atif Bilal

    for MP114 you configured it for TCP thats great, and for TLS you’ll need certificate to be installed on your Gateway ( certificate of your internal CA) with FQDN of your internal servers and also you have to give information of your gateway in the certificate which you’ll install on your lync servers. this is worth a practice, but for best integration Audiocodes and MS recommend their certified Gateways through which you can do seamless integration. like Mediant 1000MSBG(i think)
    i hope this helps you

  • From the one of the main AudioCodes web console menu items (under the Management node I believe), you can see a live operational log of what the voice gateway is doing (incoming and outgoing calls). Hope that helps,

  • Jonathon H

    Good article. I am having trouble receiving certain calls inbound before the call is transferred to the Lync mediation server. Is there anyway I can see what is going on in the AudioCodes gateway?

  • Tyler

    re: Audiocodes v Dialogic v NET

    In my experience Audiocodes has good functional products, but the configuring and administration is very challenging. My limited experience with a NET voice gateway has been good (easier deployment and configuration).

  • Hugh

    Audiocodes v Dialogic v NET

    Does anyone have a view on how these compare, or hate a particular brand or really like another?
    I am considering a gateway for Lync, connecting to 3 x E1 (ISDN) lines.

    Any views welcome.

  • Krishna


    I am using the Audio codes MP 114 Gateway along with the Lync Server 2010 RTM. I have successfully integrated and both incoming/outgoing calls are working fine with TCP. But I want to change the TCP to TLS. For that What need to be set on Topology Builder and what configuraitons I have to change in Gateway?


  • Hi Bret, I was hesitant to post the details on configuring the AudioCode gateway because I made it work through trial-and-error, and it may not be the ‘correct’ way to achieve what others are trying to do. Also, the gateways can be used for different purposes and different environments which likely differ from mine.

    However, I could post screen shots, or let you know what settings I had in a particular area. My gateway was used to enable PSTN connectivity through a Lync mediation server through an incoming PSTN analog line. What area is causing you the most trouble?

  • Hi Curtis,

    Can you please send/post the details on configuring the AudioCodes side for interop with Lync 2010. This configuration is a total nightmare!!


  • Hi Nick, agreed – it can be challenging – especially if you do not have a telephony background (like myself). Once it’s all working (inbound/outbound), and if there is no sensitive data in the config, I’ll send it to you. If you haven’t already, I found the user manual for the model I was working with (the MP-114) on the AudioCodes web site which helped.


  • Ken

    Tip #6: Use the Lync Dialing Rule Optimizer to automatically create local dialing rules for your site. http://lync.buchanan.com/LyncOptimizer

  • NickC

    Fantastic, thanks for this, will help with our setup lots.
    Any chance of a post fully detailing the AudioCodes config itself? Frankly it’s a nightmare…

Leave a Reply




You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>