Configure Lync 2010 voice using a SIP gateway and an uncertified SIP trunk, step-by-step – Part 2

This post takes on right where post 1 in this series ended and we will jump right into it. We will cover PSTN Gateway configuration, Trunk configuration, Normalization rules and Voice Routes.

PSTN Gateway

Head over to you Lync Server 2010 and open up Lync Server Topology Builder, then choose Download Topology existing deployment and click Ok.


Choose a location and enter a name for you topology file and then click Save.


Expand Mediation pools and then click Edit Properties… in the Actions pane.


Select New to create a PSTN gateway.


Enter the FQDN or IP address for your gateway, ensure TCP is set as we configured TCP in the Intertex IX78 in the previous post and change the default port to 5060. When finished click Ok.


Make sure that the gateway is listed in the The following gateways are associated with this mediation server and  then click Ok.


Go ahead and publish your new topology. I will not cover the publishing in this post, instead we will continue with configuring our trunk.

Trunk Configuration

Open the Lync Server control Panel and navigate to Voice, Trunk Configuration and click New.


Make sure your settings match mine and then create a translation rule by clicking New.


I will create a Translation Rule that looks for the +00 prefix, and makes sure that the number is more then 3 digits long, then it replaces 0 digits (in other words it does not replace anything). We will use Normalization Rules to make sure that the dialed numbers have an ok syntax. When finished click Ok to save our Translation Rule.


Take a quick look at the configured settings and then click Ok to save your Trunk configuration.



Normalization Rules

Normalization rules define how phone numbers expressed in various formats are to be routed for the named location. It is a way of forming an E. 164 number from the number dialed by an Lync Server 2010 user. It is necessary for call routing because users may dial numbers in various formats.

I will list all my 5 Normalization Rules, you might not need all of them but this is what works for me in my lab in Sweden. Feel free to add a comment if you need help with forming these rules, it can be quite tricky. More information regarding Normalization Rules can be found here and here.

Navigate to Voice Routing and Dial Plans and open your Global Dial Plan.


In my example you can see the 5 Normalization Rules that I use for my lab environment. Create a new rule by clicking New.


This rule initiates on the starting digits 00, it does simply that and nothing more. The reason for this is that I want to normalize all numbers to include both country code and area code, for example 0046855566677. I would recommend you to try different Normalization Rules until you have a combination of rules that fits your needs and demands.


To make sure that your rule works you can test it before clicking Ok and saving it. If I enter a number that I believe should match the rule and then click Go it should display the normalized number in green.


My next Normalization Rule initiates if a number starts with a single 0 and is at least 1 digit long. In Sweden our area codes starts with a single 0. Then it adds the prefix 0046 to make it a standard Swedish number including the country code.


When I enter a number with Stockholm’s area code it should Normalize it to a number that that removes the initiating 0 and then adds the prefix for the Swedish country code.


My next Normalization Rule initiates on any number starting with one of the numbers 1 to 8. A local number in Sweden can start with any of those numbers. It must also be at least 5 numbers long since no telephone number in Sweden has less then 5 numbers. Then it adds the local area code of both Sweden and Stockholm.


And when I test this rule with a local number it should add a prefix of 00468.

Note: This Normalization Rule assumes that this server is placed in Stockholm and that all numbers missing an area code is meant for Stockholm.


This next rule initiates based on the staring digit +, as in +46855566677. It then removes the + and adds 00.


And when tested it does exactly that…


And last but not least, this rule initiates when the number starts with 33 and is exactly 3 digits long. This indicates that it is a local number and it should not be normalized in any way.


When tested it does seem to match, note that I have also checked Internal Extension.


When you have added all your Normalizations Rules you can make more tests if you want and then click Ok to save your Dial Plan.


I am by far no expert in normalization rules, if you have any thought on the rules I use please feel free to post a comment or contact me and I will be happy to optimize my lab.

Route Configuration

Our final step towards a working Lync Server 2010 voice implementation is to configure routing. A Voice Route looks for a specific pattern in numbers and then decides which gateway that it will route the call to. Navigate to Voice Routing and then Route. Click New to create a new route.


Give the Voice Route a Name and then add the pattern that you want this route to match. In my case I have normalized everything that is supposed to leave the Lync Server with 00 I add 00. In your case this might differ depending on your Normalization Rules.


The next step is to add an Associated gateway. Click on Add to open the gateway selection.


Search for and select the gateway you would like to add and then click Ok to save your selection.


Next we must add an Associated PSTN usages, click Select to open the PSTN usage record selection.


Select your PSTN record and then click Ok.


Now it is time to test our routing. Enter a suitable number that you think should match the pattern and click Go.


Also, to make sure that all is well, enter a number that should not match the pattern.


When finished save the Voice Route by clicking Ok.

Now make sure that you Commit all changes properly!!

After this you should be all set and ready for testing. This concludes part 2 of this series, I hope you have enjoyed reading it and that you find it useful. If you have any thoughts or questions regarding the configuration please do not hesitate to post a comment.

Part 1 in this series can be found here!

Part 2 in this series can be found here!