SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and...

26
1 SFB/Lync Voice Routing First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as it’s the most essential part of understanding Voice Routing as a whole. Many give different examples and analogies, and of course I have my very own that’s very practical. Dial Plan(s) Think of dial plan as what numbers (digits) you want to dial day-to-day. Let’s say, I’ll and I may dial the following numbers any time of the day. In Singapore context, we would have the following dialing or dialed usages: Ref: https://en.wikipedia.org/wiki/Telephone_numbers_in_Singapore Offices and Local home and office numbers 61234567 (my manager’s number) 61236789 (Doreen’s number, from finance department) xxxx (Anyone in our office dialing their 3 (xxx) or 4 (xxxx) digit extension numbers in our case 4 digits) 6xxxxxxx (Any offices or homes numbers starting with 6 in Singapore) Mobile Phones 9xxxxxxx (any mobile number starts with 9) 8xxxxxxxx (any mobile number starts with 8) Voice over IP (VoIP) numbers 3xxxxxxx (starts with 3) Special numbers (Toll-free number) 800 xxxxxxx (Toll free international services) 1800 xxxxxxx (Toll-free line services) Emergency numbers 999 Police 995 Civil Defence Force Fire and emergency ambulance So, I’ll be dialing any numbers mentioned above at any given time of the day that’s my Dial Plans ( “s” more than one dial plan) suit my requirements. Offices and Local home and office numbers (Dial plan 1 in general) Mobile Phones (Dial plan 2 in general) Voice over IP (VoIP) numbers (Dial plan 3 in general) Special numbers (Dial plan 4 in general) Emergency numbers (Dial plan 5 in general)

Transcript of SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and...

Page 1: SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as

1

SFB/Lync Voice Routing

First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as it’s the

most essential part of understanding Voice Routing as a whole.

Many give different examples and analogies, and of course I have my very own that’s very practical.

Dial Plan(s)

Think of dial plan as what numbers (digits) you want to dial day-to-day. Let’s say, I’ll and I may dial the

following numbers any time of the day.

In Singapore context, we would have the following dialing or dialed usages:

Ref: https://en.wikipedia.org/wiki/Telephone_numbers_in_Singapore

Offices and Local home and office numbers

61234567 (my manager’s number)

61236789 (Doreen’s number, from finance department)

xxxx (Anyone in our office – dialing their 3 (xxx) or 4 (xxxx) digit extension numbers – in our case 4 digits)

6xxxxxxx (Any offices or homes numbers starting with 6 in Singapore)

Mobile Phones

9xxxxxxx (any mobile number starts with 9)

8xxxxxxxx (any mobile number starts with 8)

Voice over IP (VoIP) numbers

3xxxxxxx (starts with 3)

Special numbers (Toll-free number)

800 xxxxxxx (Toll free international services)

1800 xxxxxxx (Toll-free line services)

Emergency numbers

999 Police

995 Civil Defence Force – Fire and emergency ambulance

So, I’ll be dialing any numbers mentioned above at any given time of the day – that’s my Dial Plans ( “s”

more than one dial plan) suit my requirements.

Offices and Local home and office numbers (Dial plan 1 in general)

Mobile Phones (Dial plan 2 in general)

Voice over IP (VoIP) numbers (Dial plan 3 in general)

Special numbers (Dial plan 4 in general)

Emergency numbers (Dial plan 5 in general)

Page 2: SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as

2

Normalization

Once you fundamentally understood what Dial Plan(s) is all about, next is Normalization. What’s

normalization and why we need that?

I don’t go with theory, instead I’ll put it in practical term.

SFB/Lync needs the phone numbers (digits) going out and coming in via it to be formatted/arranged/aligned

(complied) with E.164 standard – that’s “+ sign, country code and number”, for example;

E.164 Standard

+ Country code phone number = +6565432178 = E.164

Q. Why we need normalization?

A. Because Lync/SFB needs it.

A. Normalization enables dialing and dialed numbers to conform to E.164 standard.

Q. What is normalization?

A. Normalization is to arrange/format/align dialing and dialed numbers in our Dial Plans to conform

to E.164 standard.

Q. How do we normalize dialing and dialed number?

A. By using “Regular Expressing” method.

Q. Regular Expressing” is difficult to understand? Do I need to understand programming?

A. No. Not at all. And you don’t need to write any code in most cases.

A. It’s very easy to understand and can be done through GUI in the SFB control panel.

A. After reading this guide you should be able to manipulate dialing and dialed number comfortably

and confidently.

Dial plan(s) is constructed by normalization rule(s).

Dial plan(s) is associated with one or more

normalization rules.

Page 3: SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as

3

Creating a Dial Plan

Dial Plan > Site dial plan

Page 4: SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as

4

Select a Site to which you want to apply the dial plan that you are creating if you have more than one site. In

my case, I choose ABCHQ located in Singapore.

If you want to apply a dial plan to more than one site, you could use Global scope instead but remember

each site may not be in the same location and have different dial plan(s) based on requirements and locality.

In fact we don’t need to create separate dial plans for each dialing requirement, such as office numbers,

mobile numbers, Toll-free numbers, etc., instead we’ll create a single consolidated Site-level dial plan

associated with a different set of normalization rules.

I mentioned 5 different dial plan”s” at the first page just to simplify and strengthen our understanding of

“What is dial plan”.

Page 5: SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as

5

Type descriptive information based on your environment. And click “+New” to create a new dial plan for

this ABCHQ Site.

A dial plan, “Keep All” is created by default highlighted in blue box. Just leave it as it is.

Page 6: SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as

6

I subscribed telephone numbers range from a Telco; from 61234000 to 61234100 – 100 numbers.

My first dial plan is called “Office Number 6123xxxx” to represent/reflect my office extension numbers

starting from 61234000 (6123xxxx) to 61234100 (6123xxxx). The leading number is 6123 and always

constant, so we’ll base/start from that 4 digits. Remember our dial plan must conform to E.164 standard.

To translate my dial plan in simple term:

If the dialing/dialed number staring with 6123 and

has 8 digit in total,

add +65 infront of the dialing/dialed number.

Page 7: SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as

7

Pattern to match and Translation rule written in regular expression are taken care by the SFB/Lync itself and

we don’t need to do anything about it. It is automatically derived from what you set/defined in the red boxes.

Testing

I just typed non-E.164 number, 6123400 (without + sign, without country code) – just plain 8 digit number.

Notice that my first dial plan, “Office Number 6123xxxx” is working and complied/conformed to E.164 as

it’s normalized to E.164 standard - +6561234000”

Type a number out of our subscribed range 61234000-61234100), 6123500, it’s still working, why? Because

our dial plan defined that so long as “a number starts with 6123 and has 8 digit in total”, that’s why.

Now, how about if I type (call) 65642100, will it work?

My first dial plan, “Office Number 6123xxxx” is NOT defined by or associated with nay normalization

rule(s) that conforms to E.164. That means it’s strictly working for number starting with “6123” – other than

that – it will not work.

Therefore, I have to start creating another normalization rule so that any numbers I call starting with 6 and

having 8 digits in total will conform to E.164 format.

Why I need to have a dial plan starting with 6 and has 8 digits in total? Because all offices and home

numbers in Singapore start with 6 and have 8 digits in total. My dial plan(s) to suit the

environment/country/locality the users are in.

Click OK to save this normalization rule.

Page 8: SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as

8

Create another normalization by click “+New”.

If I type emergency number

“999” will this dial plan work?

Page 9: SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as

9

So far we have done creating 2 normalization rules - “Office Number 6123xxxx” and “Any number starts

with 6”.

If I type a VoIP number

“3xxxxxxx” will this dial plan

work?

Page 10: SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as

10

We are left with the followings in red that are applicable in Singapore and Singapore context;

1. Office Number 6123xxxx and has 8 digits in total

2. Any number starts with 6 and has 8 digits in total

3. 4 digits extension numbers for internal usages, for example, userA dials 4 digits extension of userB.

4. Mobile number starts with 9 and has 8 digits in total

5. Mobile number starts with 8 and has 8 digits in total

6. VoIP number starts with 3 and has 8 digits in total

7. Toll-free number starts with 800 and has 10 digits in total

8. Toll-free number starts with 1800 and has 11 digits in total

9. Emergency numbers, 999 and 995 – start with 99 and has 3 digits in total

10. Service Provider number, for StarHub ( 1633) – starts with 16 and has 4 digits in total

11. Service Provider number, for SingTel (1688) – starts with 16 and has 4 digits in total.

I will show a dial plan for 1800 and you try to do the rest.

Formula:

If the dialing/dialed number staring with 1800 and

has 11 digit in total (1800 + 7 digits = 11 digits in total)

add +65 in front of the dialing/dialed number.

Page 11: SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as

11

I have created all dial plans from 1 to 11 as follow. I tested again using “8001234567” but it’s NOT

Matching with the dial plan I created, “Toll-free number starts with 800” as shown.

The number I tested starts with 800 and has 10 digits in total, by right, it should match to the normalization

rule I created, “Toll-free number starts with 800”. Instead it’s matching to the default “Keep All” rule.

That’s the problem.

The “Keep All” rule is accepting/matching any numbers so long as it has “1 digit” - so, the number I tested

is matching it – the widest scope of all rules. Virtually accepting any numbers so long as it has 1 digit.

The most important point here is “the order of the normalization rules” – You can see that “Keep All” is

top most of all rules.

This means, in SFB/Lync, any number dialed will be first tried with the top most rule, followed by second

rule, and so on. As soon as it found matching, it stops trying other following rules.

Therefore, we cannot put “Keep All” rule at the top most, we must put it at the last rule, and otherwise it will

bypass all our customized and E.164 complied normalization rules.

Page 12: SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as

12

I am going to commit (save changes) without putting “Keep All” at the lowest order of the rules as I wanted

to show and prove you how SFB client evaluates the dial plan.

Notice that there is Only 1 dial plan at the Site-level I created, namely “ABCHQ”, however it’s associated

with a number 11 normalization rules I created. It is 12 if we included the default “Keep All” rule.

Click “Commit all” to save the changes, and click “OK” when prompted.

I dialed a number, 61234080, by right, the client should be able to normalize the dialed number to

+6561234050 but it’s not doing it, why?

Because it’s matching with the normalization rule “Keep All” ordered at the top most of all rules. So we

need to move that rule to the lowest of all normalization rules we created.

Please note that once a user login, it will automatically download all dial plans associated with

normalization rules.

Page 13: SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as

13

I rearranged “Keep All” rule to the lowest, and commit it.

I logout from the SFB client, login and test it again as shown. Now I see that the client is able to normalize

the number I dialed to E.164 format +6561234050

It works. Try to test the other normalization rules you created this way.

Page 14: SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as

14

Voice Policy

This is a comprehensive design of how Voice Policy is made of, constructed, call flow routed to its final

destination.

When you are able to break down the relationship between each Voice Policy components, understand how

they are working hand-in-hand together to route calls to and fro, you would be able configure and administer

SFB/Lync Voice Routing comfortably and confidently.

Page 15: SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as

15

I am going to break down the components, concepts, and call flows of Voice Policy. I am drawing a simple,

easy to understand as well as get-the-job-done voice policy diagram to get the configuration started.

This is how a Voice Policy is composed of and I have numbered each component involved in setting up a

Voice Policy so that we have check list of what to do first, what’s next, what needs to be done, etc.

Please always refer back to this Voice Policy Diagram (VPD in short) as and when you needed.

Voice Policy Diagram

Voice Policy (1)

As shown in the diagram, task no.1 is to start with creating Voice Policy – “+New” > “Site Policy”.

Calling Features (2)

PSTN Usage (3)

Route (4)

Matching Patterns (5)

Trunk (6)

Trunk configuration (7)

Gateway (8) PSTN

Page 16: SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as

16

Select “abchq” site and click OK.

As shown in VPD, under the Voice Policy, there are two configurable components; one is Calling Features

(task2) which is as pretty straight forward as selecting which calling features, such as “Enable Call

Forwarding, Enable Call Transfer” you would like to enable in this Voice Policy.

To carry out task2, just select which Calling Features you want as follow.

Page 17: SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as

17

Second component (task3) under Voice Policy is PSTN Usage, click “+New” to create a new PSTN Usage.

Type a name for this PSTN Usage, “PSTN Usage for ABCHQ”. Under the PSTN Usage, you need to start

defining which route (task4) you want to associate with this PSTN Usage.

Click “+New” to create route(s) for this PSTN Usage. This is task4.

Page 18: SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as

18

Type a name for this route (we are doing task4), “Route for ABCHQ”.

Start adding the starting phone number digit you want this route to handle in the Matching Pattern (task5).

For example, based on our dial plan, we would have the following starting digits.

+ (for E.164 standard)

1 (1800 Toll-free number and service providers’ numbers)

3 (all VoIP numbers start with 3 in Singapore)

6 (for all offices and home numbers in Singapore)

8 (all mobile numbers start with 8 in Singapore and 800 Toll-free number )

9 (all mobile numbers start with 9 and Emergency numbers in Singapore)

However, I intentionally added very generous, broadest scope of all matching patterns for this route, as you

can see, this route will carry the following possible numbers. Basically any numbers and everything.

Any numbers start with + (pattern 1)

Any numbers start with 1 (pattern 2)

Any numbers start with 2 (pattern 3)

Any numbers start with 3 (pattern 4)

Any numbers start with 4 (pattern 5)

Any numbers start with 5 (pattern 6)

Any numbers start with 6 (pattern 7)

Any numbers start with 7 (pattern 8)

Any numbers start with 8 (pattern 9)

Any numbers start with 9 (pattern 10)

Any numbers start with 0 (pattern 11)

11 patterns in total.

Page 19: SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as

19

It’s not usually the case in a real production environment, we have to customize and restrict the calls based

on users/departments, requirements, whether this particular user or a group of users is able to make an

international or particular countries.

The “Matching Pattern” where you manipulate, restrict and customize which phone numbers can go

through this route.

Testing the Matching Pattern.

This is to test and ensure that which phone number this route is able carry and handle.

This will pass any numbers since our matching pattern is any numbers staring with + and/or from 0-to-9.

Customization and Restriction

Now, we need to restrict this route to carry only phone numbers starts with “+65” (Not + and 6 and 5) - it’s

“+65” one pattern consisting 3 digits – a big difference.

You need to add this way.

+65 (pattern 1) - 1 pattern in total.

If you add “+65” pattern, user can make calls (route will carry) phone numbers only starting with “+65”. As

you can see in the test, this route WILL NOT carry so long as the phone numbers don’t start with “+65”.

Translated number = E.164 = +6561234570 (in Singapore context)

Page 20: SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as

20

NOT this way.

+ (pattern 1)

6 (pattern 2)

5 (pattern 3)

3 patterns in total.

If you add like this, users can make calls (route will carry) to any numbers start with +, for example, the user

will be able to make phone calls to +60, +71, +91, and any number starts with 6, and any number start with

5 etc. A huge difference.

Be very specific and precise. If you have two groups of users – one group can only call phone numbers

starting with +65 (within Singapore) and the other group of users not only +65 (within Singapore) but also

should be able to make international calls.

In this case, you would create 1 Site-level Voice Policy that covers within Singapore (+65) and another

user-level Voice Policy which covers not only Singapore but also international calls – You would need two

Voice Policies. Assign the User-level Voice Policy you created to the group of users who need +65 and

international calls. And assign Site-Level Voice Policy to all users to meet the requirements.

Associate this route to a SIP trunk (task6) which will eventually route calls to PSTN through a Gateway.

(I’ll not cover SIP trunk and Gateway setup in this guide).

Note that you can associate a route to multiple SIP Trunks, for example, redundancy purpose. And different

routes to the same SIP Trunks, for example, call restrictions based on users.

Click OK all the way back to Voice Policy page, and click “Commit all” to save changes.

Page 21: SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as

21

Trunk Configuration

SIP trunk configuration (task7) settings define the relationship and capabilities between a Mediation Server

and the public switched telephone network (PSTN) gateway, an IP-public branch exchange (PBX), or a

Session Border Controller (SBC) at the service provider. These settings do such things as specify:

Whether media bypass should be enabled on the trunks.

The conditions under which real-time transport control protocol (RTCP) packets are sent.

Whether or not secure real-time protocol (SRTP) encryption is required on each trunk.

Trunk Configuration > “+New” > select “abchq” and click OK to start configuration.

Choose the features you want from the drop down list, for example, whether or not to enable “Encrypting”

between the SIP trunk(s) defined at the Site-level and Gateway. And select trunk features like

“Media Bypass” and so on.

Page 22: SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as

22

Associate the PSTN Usage we created with this trunk configuration.

Test which phone numbers this trunk configuration could carry and handle, remember we created a

matching pattern of “+65” – so this trunk should carry any numbers start with “+65” as shown.

Page 23: SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as

23

Calling Number translation rules

We would need to create “Calling Number translation rules” as and when required. It’s not always required.

When we would need it?

For example, calls receiving parties at the other end, like some PBX systems or PSTN providers want just a

flat number instead of E.164 qualified number. In that case, you would need to strip down “+65” and

translate user’s calling number from “+6561234017” to “61234017”.

Click “+New” to create a new translation rule.

This rule means any numbers start with “+” , at least having 8 digits then remove 3 digit from the beginning

of the number – this will remove starting 3 digits which is “+65”.

You can set the length of the digit to “At least 1” to cover any numbers.

Page 24: SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as

24

Testing

Type an E.164 calling number, +6561234017, choose “calling number” because we are testing “calling

number”. Based on the translation rule we just created above, it should strip down the first 3 digits “+65”.

It works.

This time create “Called Number” translation rule to strip down “+65” from any numbers being called by

our internal users.

You can set the length of the digit to “At least 1” to cover any numbers.

Page 25: SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as

25

There is one more thing I would like to highlight is that just now I showed only “digit to remove”.

How about “digit to add”? This has pretty different concept and impact compared to “digit to remove”.

Digit to add.

For example,

You have a phone number +6561234017 and if you set “digit to remove to 3” – what will it do?

It will remove the first three digits of a given phone number, in this case, it will remove “+65” not the single

digit number “3”.

Digit to remove.

On the other hand, in “digit number to add” and if you set “digit to add to 3” – what will it do?

It will in fact add a single digit “3” not 3 digits in front of the calling or called number that you configured.

Page 26: SFB/Lync Voice Routing - gallery.technet.microsoft.com · SFB/Lync Voice Routing First and foremost, and before anything else, we must know fundamentally what “Dial Plan” is as

26

Testing is believing.

Based on this rule, it should add 00 in front of the called number as well as remove “+65”.

Noticed that I am configuring at “Called Number Translation Rule”. You could set at “Calling Number

Translation Rule” as well if you needed.

Testing is believing. It works.