Lync Enterprise Voice ; Dial Plans and normalization

Dial plans and normalization. I believe this is a hot topic in Lync Enterprise voice. What is best practice? how can I configure it? What about inbound normalization?  and so on and so on…
So lets create some! We will bounce to the questions while getting along with the post.
Lets first look at what options we have when we create a dial plan.
LyncDialplan
New Picture

So we see we have 3 types of dial plans that can be used. Here is a short summary of what each does :
User dial plan: Can be assigned to individual users, groups, or Contact objects. Voice applications can look up and use a per-user dial plan when a phone-context value of user-default is received. For the purpose of assigning a dial plan, a Contact object is treated as an individual user.
Pool dial plan: Can be created at the service level for any PSTN gateway or Registrar in your topology. To define a pool dial plan, you must specify the particular service (PSTN gateway or Registrar pool) to which the dial plan applies.
Site dial plan: Can be created for an entire site except for any users, groups, or contact objects that are assigned a pool dial plan or user dial plan. To define a site dial plan, you must specify the site to which the dial plan applies.
And we have already in place the Global one.
Global dial plan: Is the default dial plan installed with the product. You can edit the global dial plan, but you cannot delete it. This dial plan applies to all Enterprise Voice users, groups, and contact objects in your deployment unless you configure and assign a dial plan with more specific scope.

Normalization and how to use them in dial plans? When to use site, pool or user dial plan? And what to put there for normalization. I mean, if we all use E.164 in the world we don’t need normalization. unfortunately in many scenarios we need to normalize the number. For example. On a site they use coexistence with their current PBX and Lync . when we fork the calls maybe we can only use the extensions in organization to be able to fork the call so when we enter the trunk to the PBX we need to strip the E.164 to the extension that is dialed.
Lets look at Normalization patterns and regex and which we can use in our Dial Plans:

Element
Meaning Example Explanation of example
^ Match at beginning of string ^123 Match the digits 123 at the beginning of the string
() Captures the matched subexpression (456) Capture what is between the parentheses into a numbered variable, starting at 1 which can be accessed as $n, eg $1
* Specifies zero or more matches d(*)
+ Specifies one or more matches d(+)
? Specifies zero or one matches d(+)
{n} Specifies exactly n matches d{4} Match 4 digits
{n,} Specifies at least n matches d{3,} Match at least 3 digits (with no limit to number of digits matched
{n,m} Specifies at least n, but no more than m, matches. d{3,6} Match at least 3 digits but no more than 6 digits
d Matches any decimal digit ^d Match any decimal digit (at the beginning of a string)
| Matches any one of the terms separated by the | (vertical bar) character 134 | 135 Match either the string 134 or the string 135
$ The match must occur at the end of the string ^(123)$ Match exactly digits 123 (and not 1234)

Example of simple normalization rules:

Name
Starting Digits Length Digits to remove Digits to add Pattern to match Translation rule
4 Digit Extension 3 Exactly 4 0 3130123 ^(3d{3})$ +3130123$1
International Numbers 00 At least 2 2 + ^00(d*)$ +$1
National Numbers 0 At least 1 1 31 ^0(d*)$ +31$1

If you have a Lync deployment located in just one site and country it is more easy to define dial plans then when you need to implement Lync in a corporation with multiple geo locations and different number patterns used for internal voice routing and geo voice routing. Lets look deeper in how to use these kind of dial plans and assign them to your topology. In the 1 plan fits all I recommend to create the Site dial plan or configure the Global one. These will apply for all your Enterprise Voice enabled users.

When you configure Pool Dial Plan you assign this plan to a PSTN gateway or registrar. This could be useful for transitioning between Lync and a PBX. So the normalization is done on the PSTN gateway. Or when you require specific rules to dial outbound on a mediation gateway.
Configuring user dial plans normalizes the number before the call is made. This is for example when you use internal extensions for traditional calling and forking or when you dial localized number without using E.164 format to dial out. For example when I am in Netherlands region Amsterdam the Country code is 31 City code is 20. When I dial 7123456 in my Lync clients it makes: +31207123456. This could be useful when you have people in different regions in the country who are used to use short numbers instead of E.164. For those you can create User dial plans for and I recommend to use Geographical named user dial plans.

How does Lync handles then the normalization rules for my organization?
I recommend to normalize all numbers to E.164 within your Lync environment and with Pool Dial plans you can if needed strip back to use ISDN or other number format required by PBX or gateway in place to dial out. same for inbound routing through mediation gateways you might use some normalization in order to retrieve the correct sip address for the endpoint (UC Client).

You want to see some example here? Lets see what we can create:
The following scenario in place: Lync Pool located in HQ Office in the Netherlands.Branch Office in UK and France. They have sip trunk from a provider in the UK capable for Lync. We have PSTN Gateway in Netherlands and no phone line in France. How would my Dial plans look like.
Global Dial plan:
image

So when you have users assigned to the global dial plan the need to enter or E.164 format +31201234567 or the old fashion 0031201234567 When they want to dial out. More normalization isn’t done here. We will assign in our scenario the French office users to the global Dial plan.
UK London Dial Plan:
image

Here we specified all local London normalization, National calls in the UK and International calls. All London users will be assigned to the UK_LON dial plan. We need to do the same for Netherlands dial plan
NL Amsterdam Dial Plan:
image

For the NL we did the same as for London but referring to Amsterdam region.The Amsterdam users we will  assign the NL_AMS dial plan to their profile.
image

So in our test case we have created the dial plans for our regions and in the next posts I will cover Voice Policies, Routes and PSTN Usage and we will mix all up to a working enterprise voice scenario. Stay tuned.