Sunday, February 26, 2012

Lync 2010 - the Dial Plan mystery

Enterprise Voice still reminds one of the mysteries of Lync deployment. While IM&P and conferencing is relatively well known and documented, EV is sort of gray area due to the fact it involves more than server and roles installation. The interaction with PSTN (Public Switching Telephone Network) often adds complexity that throws Lync Administrator in uncharted territory…

In this post, I will go over the best practices of creating Dial Plan. I have seen many people, overexcited of the possibility to make a phone call via Lync, often would omit the proper configuration and use “one fits all” rules.

Lync uses E.164 number format i.e. “international public telecommunication numbering plan”. As defined per ITU-T recommendations, E.164 format can have maximum of 15 numbers and must be prefixed with “+” sign. An example of such number is +14785550000 where “1” is the country code (US), “478” is area code (Central Georgia), “555”  is exchange (local provider’s PBX) and “0000” – extension

A very simplified explanation of the routing logic Lync uses is this: when a number is dialed from Lync client, the first action is to look if this number can be matched internally – to a user or any other object that have E.164 number assigned. If “Yes”, the call is routed internally to the object, if “No”, if appropriate action is defined, the call is “dispatched” to the destination. If there is no “routing definition”, the call fails. It is so simple!

Back to Lync and E.164. For EV enabled users, we must define the number in E.164 format, like +14785551234. The $64,000 question is – how in the world I dial “+” from my phone? From my Polycom CX600, I can dial 14785551234, but then this number will not match my user’s number because it does not have ”+” on front. Here comes the mystery of “normalization”. While “normalization” is the correct word (since we bring ANY number dialed to a “normal”, or E.164 format), I noted that people are handling the term “transformation” better. In any case, to “normalize” 14785551234 to +14785551234 OR to “transform” it - same action, just worded differently.

Here comes the magic of “Dial Plan” in Lync. Dial Plan uses RegEx (Regular Expressions) to evaluate the string and transform it (if match is found). Simply said – comes down to “what I am dialing” and “what final result I want to achieve”.

^(\d{11})$
+$1

The above can invoke suicidal thoughts in any man or a woman! What does it mean??? Will I ever be able to understand how this works?

Now let’s use this approach – “when I dial something, my goal is the end result to be something else”. In this case, “When I dial 14785551234, I want the final result to be +14785551234”. The above RegEx will do just that. To write RegEx freely, however, requires you to be at least member of Mensa society or above. Fortunately, Lync Control Panel provides graphical representation of “when I dial something, my goal is the end result to be something else”.

It cannot be any easier:

Starting digits – it does not matte

Length – exactly 11 digits. (this means that RexEx will “count’ the number if digits and will not process if it is different from “11”

Digits to remove – in this case “do not remove digits”

Digits to add – add “+” on front.

Let see what happens when we test our RegEx:


We just normalized (or transformed if you wish), 14785551234 to +14785551234.

Now that we know what Normalization (or transformation) does and how to use it, let’s pull back and think about our environment. Every Lync deployment is like DNA – there could be a partial match (if two companies in same town, using the same PSTN provider deploy Lync Enterprise Voice) and yet it will never be the same because of company specifics. Proper evaluation and planning is absolutely vital for successful outcome of any EV deployment.

Here is an example if such process.
  1. In Milledgeville we dial 911 for emergency
  2. Our current “internal extensions” are 4 digit long
  3. We dial local numbers by dialing 7 digits only.
  4. Out of state we dial 11 digits (1 + area code + 7 digits)
  5. International calls – any length (011 + country code + number)
Now I will use Lync Control Panel to “convert” this to Lync Dial Plan.

***I will create new User Dial plan. For differences between Pool, Site and User dial plan, refer to the product documentation.

Here comes my first Normalization rule – for 911.

  Next is handling of 4 digits internal extensions.


***This example requires explanation. All numbers in my organization are from the block 1478387xxxx. From this prospective, it is safe to assume that when user dials (or “mash”, as they call it on South) four digits, the intention is to reach a colleague from the same organization and so, the number will always start with 1478387. Here is an illustration:

Now - local calls

***Because those calls are “Local”, they always stay within the local Area Code (478). We add +1478 on front of the number (to become E.164).

Next – Long Distance calls. There are two ways to dial LD – 10 and 11 digits. I will create two rules to capture both cases.


Lastly, a rule for International calls.


Just for fun, I will throw one more example. The Exchange Auto Attendant’s E.164 number in my organization is +14785559001. I want to provide an easy way for my users to dial the AA and reach a colleague by speaking the name. I selected *99 as “quick dial”.

The test result:

Here is the final result of my hard work:


At the end, I will commit the changes i.e. make it permanent.


In the next post, we will look at Lync Voice Policy and how it interacts in our EV environment.

9 comments:

Unknown said...
This comment has been removed by the author.
Aaron Marks said...

Check out Ken Lasko's "Lync Optimizer". It can create all the dial plans for a Lync EV novice (or Pro). It is a great starting place in any deployment: Complete Guide to Lync Optimizer

Rick Waterman said...

Wow! Great tips about dial plan in here. I really had difficulty on this matter. Good thing, I came across your post.

Robert showerman said...

Hi,

I want to buy text links on internal pages of your website. I can pay you $30 for one link. My link will will NOT be a spam link. The link will be 100% related to your content.

Let me know if you have any questions or concerns.


--
Thanks & Regards

Robert Showerman
Marketing Manager
Robertshowerman2011@gmail.com

Anonymous said...

Thanks man
i really appreciate the explanation
finally i understand what this whole thing means:)

JeffCSP said...

Nice article. Your first example of a normalization rule has an error
^(\d{11})$
+1$1

Should just be +$1

Good Work as always,
Jeff

Mohammed Hamada said...

I completed the steps but when calling voice mail from Lync it says Voice mail is offline or unavailable!

You have mentioned in the end of ur article that u used certificates! what are those certificates for ?

plus do I have to do anything on the gateway side ?
Thanks

Chris A said...

Mohammed you have to setup UM integration with Lync before you can access voicemail. Have you done this?

Rich Hicks said...

Drago,

I just wanted to say that I could have never gotten my Enterprise Voice environment up and running without your tips and responses in the many forums that I have sifted through. I really appreciate you putting in the time and the effort to help everyone out.