office 365 tenant dial plans plan, implement, manage skype for business tenant dial plan admin guide...

38
Office 365 Tenant Dial Plans plan, implement, manage © 04.04.2017, Thomas Poett, MVP Office Servers and Services (Skype for Business) - Version 1.0 Contact: http://www.uclabs.blog

Upload: vunhan

Post on 08-Apr-2018

243 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Office 365 Tenant Dial Plans

plan, implement, manage © 04.04.2017, Thomas Poett, MVP Office Servers and Services

(Skype for Business) - Version 1.0

Contact: http://www.uclabs.blog

Page 2: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Contents Skype for Business Tenant Dial Plan Admin Guide .................................................................................. 5

Office 365 Online Dial Plans - General .................................................................................................... 6

Online Default Dial Plan (Service Country) .......................................................................................... 6

Online Dial Plan structure................................................................................................................ 8

Dial Plan Hierarchy .......................................................................................................................... 8

Skype for Business Tenant Dial Plan cmdlet’s ..................................................................................... 9

Working with Tenant Dial Plans ........................................................................................................ 10

Planning, creating and maintaining Online Dial Plans ................................................................... 10

Assigning and managing Online Dial Plans for users ..................................................................... 10

Working with Online Voice Policies ................................................................................................... 11

Working with Online Voice Routes.................................................................................................... 11

Planning and configuring dial plans with normalization rules .............................................................. 12

Planning for normalization rules ....................................................................................................... 12

Planning scenario for normalization rules (example) ....................................................................... 13

Location based normalization rules for Online Dial Plans ............................................................. 14

Dial Plan Munich, Germany ....................................................................................................... 14

Dial Plan Kuala Lumpur, Malaysia ............................................................................................. 18

Preparing users for an Online Dial Plan ......................................................................................... 23

Assigning a Hybrid PSTN Site to Users ....................................................................................... 23

Assigning Voice to Users (Cloud PBX) ........................................................................................ 23

Assigning On-premises Phone Numbers to Cloud PBX Users ................................................... 25

Grant an Online Dial Plan to a user ........................................................................................... 27

Test an Online Dial Plan ............................................................................................................. 28

Remove an Online Dial Plan for a user ...................................................................................... 30

Unexpected results with Online Dial Plan for a user ................................................................. 31

Define the Session Boarder Controller Dial Plan (SBC Telco normalization)..................................... 32

Define SBC Munich, Germany ....................................................................................................... 32

Define SBC Kuala Lumpur, Malaysia .............................................................................................. 33

Remote PowerShell login ...................................................................................................................... 34

Set a user's password to never expire ............................................................................................... 35

Skype for Business Command Output shown as cropped List .............................................................. 36

Important Links and Blog Articles: ........................................................................................................ 38

Page 3: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Introduction and special thanks

Thanks to Dave Howe (Microsoft): Dave is the PRINCIPAL PROGRAM MANAGER, Skype Bus - Service & Partner Eng at Microsoft Redmond. He and his team provided me with the Skype Elite Team tenant, where I can work on making all necessary tests.

This guide is written for Pre-Sales Consultants, technical Consultants and System engineers at Level

400.

It guides you through the general understandings of Office 365 Skype for Business Online Dial Plans,

the related planning process and should inspire you thinking about different approaches towards

technology and best practices.

If you have question or need assistant with Skype for Business please contact me via my blog:

© 04.04.2017, Thomas Poett, MVP Office Servers and Services

(Skype for Business)

Contact: http://www.uclabs.blog

Page 4: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

About the author:

I'm working with Westcon UCC Germany as Business Unit Leader Skype for Business, supporting

professional Sales for Enterprise Voice On-Premise, Hybrid or Cloud.

Extensive experience in business and market development. Specialized in intercultural and business

relationship in Asia. Successful in providing leadership on new topics and complex global projects that

require interfacing with internal/external teams and ecosystems. Early adaptor of visionary

technologies.

• 20+ year career within different companies in the areas software development, telecommunication,

IT, mobility and hosted/cloud services.

• Strong technical and business background – was member of Microsoft´s German Inner Circle.

• Organized, logical, rationale thinker and problem solver with superb communication and

collaboration skills.

• Business Management skill in strategic and organized developing German SME subsidiaries in Asia

Specialties: Management:

Start-up companies, Business Relation Management, Partner Relation Management, Enterprise

Business Sales Skills, strong team leader and motivator, perfect Asian business and human behavior

understandings, excellent financial cash flow management

Technical:

Microsoft Office 365, Public and Private Cloud Computing, specialized in Hybrid Cloud integration,

Unified Communication (Skype for Business, Exchange), Security (PKI, ForeFront), Active Directory,

View my complete profile

Page 5: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Skype for Business Tenant Dial Plan Admin Guide In Skype for Business Online we have now two types of Dial Plans available. Tenant Dial Plan (Online)

on a per user basis and the default tenant dial plans (Service Country).

Before we have an inside look into the Online Dial Plans, we should once more talk about Best

Practice with number formats.

The E.164 format should be used at all time with in Office 365. This is the standard and will help us

aligning with all requirements and dependencies in our eco system.

The E.164 format is discussed as: +49 89 1234 5678 and can’t be longer than 16 digits.

+49 is the country code, it always starts with a ‘+’ followed be 1-3 digits

89 is the city code, its length varies between 1-4 digits

1234 is the regional code within the cities area

5678 is the participant number, the number provided the phone user

O365O365

PSTNPSTN

PBXPBX

CCE CCE

Within Office 365/ Skype for Business Online, you should

best practice use E.164 Format only

Between the CCE and a PBX different Dial Plans and

Normalization cloud be used. Depending on the PBX

configuration

A Telco Provider will have different

number formats, the PBX in this case

will do the normalization in accordance with

the Telco s requirements

The illustration above should help you understanding the approach towards a numbering plan within

our organization. Even if the Telco or your local PBX doesn’t make us of the E.164 format, you can

easily change on the SBC belonging to the CCE the number into the best practice format E.164

Page 6: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Office 365 Online Dial Plans - General

Online Default Dial Plan (Service Country) The tenant dial plans are provided by Microsoft within Office 365 Skype for Business and will be

assigned based on the user’s location. Those are set during the location assignment with Online User

creation, illustrated in the picture below.

Page 7: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

The Location under Product License defines the default dial plan.

Within the dial plan the normalization rules are addressed. If you want to see the normalization rules

within a dial plan you need to type a cmdlet in the following format:

(Get-CsDialPlan -Identity DE).NormalizationRules | ft Name, Pattern,

Translation, Description

Page 8: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Online Dial Plan structure The tenant dial plans are provided by Microsoft within Office 365 Skype for Business and will be

assigned based on the user’s location. Those are set during the location assignment with Online User

Three different types of dial plans

Service dial plans have always existed and been applied to users, these can’t be changed

Tenant dial plans are new and can be customized

Tenant-Global – the dial plan applies to all users in the tenant

Tenant-User – the dial plan applies only to specific users

O365O365

Service Country (Default Dial Plan)

Tenant Dial Plan

GLOBAL TAG: USER

Dial Plan Hierarchy The Online Dial Plan hierarchy (scope) is working differently if a Tenant Dial Plan is activated. As well

the Tenant Dial Plan is hierarchy differs from On-Premise scopes. On-Premise you could define Dial

Plan based on Global, Site, Pool and User level, where the lowest (closer to the effective user) Dial

Plan will be effective.

With Online Dial Plans you merge the Service Country with the Global or User applied Dial Plan.

Note:

The Tenant Dial Plan always comes first!

Only Service Country Dial Plan in-place, which NO Tenant Global or Tenant User Dial Plan assigned

Tenant Global Dial Plan with NO Tenant User Dial Plan assigned

Tenant User Dial Plan assigned

Service Country Service Country Service Country

Tenant - Global Tenant - User

Page 9: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Skype for Business Tenant Dial Plan cmdlet’s Those Online Dial Plans must be assigned on a per user basis, only possible via PowerShell yet.

Note:

The Skype for Business admin center can't be used for creating and managing dial plans.

Starting with a dial plan design isn’t different from the on-premise design. You run exactly the same

planning process as you did before.

Further example and design processes I provide late in this article.

First I provide an overview of the dial plan cmdlets:

PS C:\> Get-Command *tenantdialp*

Command comment

Get-CsEffectiveTenantDialPlan retrieve an effective tenant dial plan

Get-CsTenantDialPlan retrieve a tenant dial plan.

Grant-CsTenantDialPlan assign an existing tenant dial plan to a user

New-CsTenantDialPlan create a tenant dial plan

Remove-CsTenantDialPlan remove a tenant dial plan

Set-CsTenantDialPlan modify an existing tenant dial plan

Test-CsEffectiveTenantDialPlan test a tenant dial plan

Page 10: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Working with Tenant Dial Plans When you start working with Online Dial Plan, you will see it from two different angles.

1. Planning, creating and maintaining Online Dial Plans

2. Assigning and managing Online Dial Plans for users

As this both tasks are important in handling Online Dial Plans, I want show you quick examples how

you will use the corresponding cmdlets.

Planning, creating and maintaining Online Dial Plans To create a new dial plan, run:

New-CsTenantDialPlan -Identity DeMuc -Description "Germany Munich

Office” -NormalizationRules <pslistmodifier> -ExternalAccessPrefix 9

-SimpleName "DE-MUC-DP"

ExternalAccessPrefix is a set of numbers, which identify this call as external. You will have to use e.g.

a “9” in front of a dialed number if this call should reach out to an PSTN callee. Important to

remember is, that his external prefix will be ignored by the included normalization rules.

To make setting changes to an existing dial plan, run:

Set-CsTenantDialPlan -Identity DeMuc -NormalizationRules

<pslistmodifier> -ExternalAccessPrefix 9

-SimpleName "DE-MUC-OFC"

To view the settings on a dial plan, run:

Get-CsTenantDialPlan -Identity DeMuc

To delete a dial plan, run:

Remove-CsTenantDialPlan -Identity DeMuc -force

Note:

<pslistmodifier> normalization rules are subject to be included in this list.

Normalization rules are discussed in a later chapter in this document.

Assigning and managing Online Dial Plans for users To add users to a dial plan, run:

Grant-CsTenantDialPlan -Identity [email protected] -PolicyName DeMuc

To see the settings of the effective dial plan, run:

Get-CsEffectiveTenantDialPlan -Identity [email protected]

To test the effective settings of a dial plan, run:

Test-CsEffectiveTenantDialPlan -DialedNumber 14255551234 -Identity

1849827b-a810-40a8-8f77-e94250d4680b_US_TenantDialPlanRedmond

Page 11: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Note:

the following cmdlet is used to determine your tenant ID: Get-CsTenant | Select-Object DisplayName, TenantID

Working with Online Voice Policies During writeup of this guide, Online Voice Policies are not available.

Working with Online Voice Routes During writeup of this guide, Online Voice Routing is not available.

Page 12: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Planning and configuring dial plans with normalization rules This chapter will help you understanding the planning and configuration process for dial plans,

including their associated normalizations.

A normalization is regular expression identifying the dialed number and modifying this number into

the expected format.

Since RegEx’s can be quite difficult in designing, there is my preferred website creating and validating

RegEx is:

https://regex101.com/

or

http://www.regextester.com/

Planning for normalization rules In general, we are used to certain dialing behaviors. Meaning if you use for example a mobile, you

know you dial a number including the area code, like 017212345678 or if you initiate an international

call, 0049 172 12345678 or +49 172 12345678.

Different might be your dialing experience you had in the past with your PBX. Here you might have

internal extension dialing or other pattern, like an internal area code and the extension. For sure this

has speed up your phone dialing. I want asking you, in an UC environment, where your most likely

call an internal workmate with his SIP address, like [email protected], does it make sense having

internal extension dialing?

If you identified “yes” during your consulting and analysis process, then you are required

incorporating this pattern into your Online Dial Plans too.

On the other hand, you will still make outbound calls. Here it looks different, you need to reflect the

common dial pattern in your normalization rules, based on the location where you are mainly

located!

Let’s therefore start with an example process for location based patterns.

I wish making the understandings for Online Dial Plans as easy as possible, I included a very simple

and straightforward logic behind.

And always remember, E.164 at the end should be your target number.

Page 13: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Planning scenario for normalization rules (example) The scenario I discuss here will be Office 365 CloudPBX with two location in Munich Germany and

Kuala Lumpur, Malaysia:

O365

CCE

CCE

CCE

CCE

DeMucMunich

Germany

MyKulKuala Lumpur

Malaysia

PSTN

SBC normalization

Online Dial Plan

normalization

PSTN Provider Dial Plan info:

- the German provider accept E.164 format- the Malaysian provider must have for area calls 12345678, for domestic 0412345678And for international 00xx

Solution:In O365 normalize to E.164On the SBC normalize to local format the provider expects

Page 14: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Location based normalization rules for Online Dial Plans Assuming we are in Munich, Germany and another location will be Kuala Lumpur, Malaysia. We are

now setting up our planning process first, then we will build the normalization and create our dial

plans.

Dial Plan Munich, Germany

Germany’s country code is 0049 or +49

Munich area code is: 089

Based on this information we will have the following expected dial pattern.

Located in Munich:

1. Calling someone in Munich You will dial 12345678, or 08912345678 or 00498912345678

2. Calling someone in Germany you will dial 03012345678, or 00493012345678

3. Calling someone international you will dial 00141612345678

Assumption:

The German user is used to seeing after normalization a E.164 format, therefore the consulting

resulted in E.164 is acceptable and a good user experience.

Additionally, users in Malaysia doesn’t have an E.164 number assigned. Here we will add a

normalization rule for E.164 de-normalization from international Kuala Lumpur numbers, matching

the OnPremLineURI.

The expected normalization to those numbers should be like this:

Input: 00141612345678 Output: +141612345678

Name Munich International

Pattern: ^00(\d+)$ Translation: +$1

Input: 03012345678 Output: +493012345678

Name Munich Domestic

Pattern: ^0(\d+)$ Translation: +49$1

Input: 12345678 Output: +498912345678

Name Munich local

Pattern: ^(\d+)$ Translation: +4989$1

Page 15: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Info:

Normalization rule matching the Kuala Lumpur, Malaysia office users. Our office in Malaysia owns

the number bock +6031234-0000 - +6031234-9999

Input: +6031234xxxx Output: 12345678 (CloudPBX MY office user)

Name Kuala Lumpur Office

Pattern: ^[+]6031234(\d+)$ Translation: 1234$1

The initial Tenant Dial Plan is GLOBAL

Get-CsTenantDialPlan

Therefor you are able to create your dial plan “TAG:”, or you associate the dial plan under the

“GLOBAL:” dial plan, by using Global/DialPlanName

1. Next step will be creating the dial plan: DeMuc

New-CsTenantDialPlan -Identity DeMuc -Description "Germany Munich Office” -

SimpleName "DE-MUC-DP"

2. will be creating the VoiceNormalizationRule

Pslistmodifier:

$NR1 = New-CsVoiceNormalizationRule -Identity DeMuc/MunichInternational -

Description “Munich International” -Pattern '^00(\d+)$' -Translation '+$1'

-InMemory

$NR2 = New-CsVoiceNormalizationRule -Identity DeMuc/MunichDomestic -

Description “Munich Domestic” -Pattern '^0(\d+)$' -Translation '+49$1' -

InMemory

$NR3 = New-CsVoiceNormalizationRule -Identity DeMuc/MunichLocal -

Description “Munich Local” -Pattern '^(\d+)$' -Translation ‘+4989$1’ -

InMemory

Page 16: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

$NR4 = New-CsVoiceNormalizationRule -Identity DeMuc/KLOfcLoc -Description

“Kuala Lumpur Office” -Pattern '^[+]6031234(\d+)$' -Translation '1234$1' -

InMemory

WARNING:

Make sure the you use the correct apostrophe with -Pattern and -Translation

not the “ or ‘’ it must be -> ' <-

3. will be adding the first normalization rule to the dial plan

Set-CsTenantDialPlan -Identity DeMuc -NormalizationRules $NR1

4. will proceed with the next two normalization rules

Set-CsTenantDialPlan -Identity DeMuc -NormalizationRules @{Add=$NR2}

Set-CsTenantDialPlan -Identity DeMuc -NormalizationRules @{Add=$NR3}

Set-CsTenantDialPlan -Identity DeMuc -NormalizationRules @{Add=$NR4}

Note:

The PsList Modifiers can be ADD, DELETE or MODIFY

Next verify your new Tenant dial plan:

Get-CsTenantDialPlan -Identity DeMuc

Page 17: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Verifying the created normalization rules:

(Get-CsTenantDialPlan -Identity DeMuc).NormalizationRules | ft Name,

Pattern, Translation, Description

Page 18: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Dial Plan Kuala Lumpur, Malaysia

Malaysia country code is 0060 or +60

Kuala Lumpur area code is: 030

Based on this information we will have the following expected dial pattern.

Located in Kuala Lumpur:

4. Calling someone in Kuala Lumpur You will dial 12345678

5. Calling someone in Malaysia you will dial 04012345678

6. Calling someone international you will dial 00498912345678

Assumption:

The Malaysian user is not used to see a normalized E.164 format. This is due to the Malaysian

providers common dialing pattern. Even if the best practice say’s, we should globally use the E.164

format with in the entire tenant, we cannot ignore the user experience. This let us to the setup

providing the Malaysian users with a local Malaysian pattern.

The expected normalization to those numbers should be like this:

Input: 0060312345678 Output: 12345678

Name KL local from international

Pattern: ^00603(\d+)$ Translation: $1

Input: 0060412345678 Output: 04012345678

Name KL domestic from International

Pattern: ^0060(\d+)$ Translation: 0$1

Input: 03012345678 Output: 12345678

Name KL local from domestic

Pattern: ^030(\d+)$ Translation: $1

Page 19: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Input: +60312345678 Output: 12345678

Name KL local from International E.164

Pattern: ^[+]603(\d+)$ Translation: $1

Input: +60412345678 Output: 04012345678

Name KL domestic from International E.164

Pattern: ^[+]60(\d+)$ Translation: 0$1

Input: +498912345678 Output: 00498912345678

Name KL international from International

Pattern: ^[+](\d+)$ Translation: 00$1

WARNING: With the provided normalizations, you must MATCH a correct order. Else ^[+]

also matches ^[+]60, therefore the rule on ^[+]60 must come first !

We can see, the dialing pattern in Malaysia is quite different for this defined in Germany, Munich.

What we now have to understand based on the normalization on the SBC, especially if we use an SBC

for inter-connecting and handling least cost routing, this different dialing pattern need to be

reflected on both ends.

NOTE:

This gives us the understanding, why we should in the entire tenant use E.164 normalization and

train users.

1. Staring with creating the dial plan: MyKul

New-CsTenantDialPlan -Identity MyKul -Description "Malaysia KL Office” -

SimpleName "MY-KUL-DP"

Page 20: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

2. creating the VoiceNormalizationRule

Pslistmodifier:

$NR1 = New-CsVoiceNormalizationRule -Identity MyKul/KLloc-int -Description

“KL local from international” -Pattern '^00603(\d+)$' -Translation '$1' -

InMemory

$NR2 = New-CsVoiceNormalizationRule -Identity MyKul/KLdom-int -Description

“KL domestic from International” -Pattern '^0060(\d+)$' -Translation '0$1'

-InMemory

$NR3 = New-CsVoiceNormalizationRule -Identity MyKul/KLloc-dom -Description

“KL local from domestic” -Pattern '^030(\d+)$' -Translation '$1' -InMemory

$NR4 = New-CsVoiceNormalizationRule -Identity MyKul/KLloc-intE164 -

Description “KL local from International E.164” -Pattern '^[+]603(\d+)$' -

Translation '$1' -InMemory

$NR5 = New-CsVoiceNormalizationRule -Identity MyKul/KLdom-intE164 -

Description “KL domestic from International E.164” -Pattern '^[+]60(\d+)$'

-Translation '0$1' -InMemory

$NR6 = New-CsVoiceNormalizationRule -Identity MyKul/KLintE164-int -

Description “KL international from International” -Pattern '^[+](\d+)$' -

Translation '00$1' -InMemory

WARNING:

Make sure the you use the correct apostrophe with -Pattern and -Translation

not the “ or ‘’ it must be -> ' <-

Page 21: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

3. will be adding the first normalization rule to the dial plan

Set-CsTenantDialPlan -Identity MyKul -NormalizationRules $NR1

4. will proceed with the next two normalization rules

Set-CsTenantDialPlan -Identity MyKul -NormalizationRules @{Add=$NR2}

Set-CsTenantDialPlan -Identity MyKul -NormalizationRules @{Add=$NR3}

Set-CsTenantDialPlan -Identity MyKul -NormalizationRules @{Add=$NR4}

Set-CsTenantDialPlan -Identity MyKul -NormalizationRules @{Add=$NR5}

Set-CsTenantDialPlan -Identity MyKul -NormalizationRules @{Add=$NR6}

Next verify your new Online Dial Plan:

Get-CsTenantDialPlan -Identity MyKul

Verifying the created normalization rules (especially the order of the rules)

(Get-CsTenantDialPlan -Identity MyKul).NormalizationRules | ft Name, Pattern, Translation, Description

Note:

We see the provided order is as we have defined it!

Page 22: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Modify in normalization rule in your dial plan

With several PowerShell cmdlet’s you need to add elements in form of a list. This list is called <PsListModifier> and contains the added list entries in column. With Skype for Business this list is used for adding Normalization Rules into the Dial Plans. This is the same for Online and On-Premise. The cmdlet’s supports to commands modifying the PsList:

• @{Add - Adding values

• @{Remove - Removing values

• @{Replace - Replacing values

You can specify more than one operation by using a list separated by semicolons. For example, use the following syntax to add and remove normalization rule values - NormalizationRules @{Add=value1,value2,...};@{Remove=value3,value4,...}

If a <PsListModifier> element is incorrect or needs to modified, chose either to delete dial plan or change the rule in it.

Remove a normalization rule in your dial plan The following example shows how to remove a normalization rule object by using the cmdlet

Get-CsVoiceNormalizationRule -Identity DeMuc/MunichDomestic

Identify the name of the normalization rule entry to be removed

$NRRemove2 = New-CsVoiceNormalizationRule -Parent Global –Name

‘MyKul/KLdom-int’ –InMemory

Set-CsTenantDialPlan -Identity DeMuc -NormalizationRules @{Remove=$

NRRemove2 }

Page 23: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Preparing users for an Online Dial Plan Prior to the dial plan, the user need to be assigned to the associated HybirdPSTNSite and must have a

OnPremLineURI with EnterpriseVoice enabled.

After this tasks the next step will be our dial plan assignment.

Assigning a Hybrid PSTN Site to Users

Office 365 users need to be assigned to a dedicated Hybrid PSTN Site.

o The Office 365 Online command Set-CsUserPstnSettings is enabled for this task

o The command HybridPSNSite addresses the configured CCE Site

o The AllowInternationalCalls command allows calls not associated with a country code

Set-CsUserPstnSettings -Identity [email protected] -HybridPSTNSite

Germany -AllowInternationalCalls $true

Set-CsUserPstnSettings -Identity [email protected] -HybridPSTNSite

Malaysia -AllowInternationalCalls $true

Assigning Voice to Users (Cloud PBX)

Each user must have parameters set for their Cloud PBX identification. The Get-CsOnlineVoiceUser

commandlet shows the user, enabled for PSTN Calling Service. In this guide, Cloud Connector is used.

Cloud Connector is an on-premises part from Skype for Business Online. If the provided command is

run alone with no further format-list, it will not show any users.

Page 24: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

The next command (unrelated to Azure AD, but part of Skype for Business Online) is the Get-

CsOnlineUser. The command Get-CsUser is the Azure AD query this object. For the CCE

configuration, the following will directly query the parameters for Skype for Business.

Get-CsOnlineUser -identity [email protected] | fl

*host*,*dial*,*reg*,*voice*, *sip*,*usage*,*phone*,*id*,*onprem*

The above example only queries the Malaysian User B setting, while the pipe (|) forces the format

list table to limit the parameters only to what needs to be shown. Using the asterisk (*) means that

any other character (that is, in front of or behind the word defined) will also be queried, so *reg*

refers to TargetRegistrarPool, but also to CountryOrRegionDisplayName as well.

Some of the parameters that are important for this scenario include DialPlan, VoicePolicy and

UsageLocation.

When checking for user assignment to Malaysia and Germany, the Default DialPlan is already

assigned. This was done automatically. At this point, where users are enabled for the Cloud PBX

feature geographically, the chosen location is reflected in UsageLocation.

Page 25: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Get-CsOnlineUser -identity [email protected] | fl

*dial*,*sip*,*voice*,*usage*,*phone*,*onprem*

Note:

This command display shows that phone numbers are not yet assigned to Skype for Business Online

users. This will be addressed in the next section.

Assigning On-premises Phone Numbers to Cloud PBX Users

Users must have a phone number assigned. The Reverse Number Lookup Service in Skype for Business

needs an incoming E.164 format number string to search for an associated user.

Remember:

Since the user’s PSTN access is on-premises, there must be an OnPremLineURI. The user’s on-

premises parameter is associated with Azure AD, so the Set-CsUser command is used to set this

parameter.

Enable the user for Enterprise Voice with EnterpriseVoiceEnabled $true, and set the phone number

in E.164 format starting with tel:, as in tel:+498912345678. If the user needs to use Exchange Unified

Messaging Voice Mail in Office 365, enable it with HostedVoiceMail.

Set-CsUser -Identity [email protected] -HostedVoiceMail $true -

OnPremLineURI tel:+498912345678 -EnterpriseVoiceEnabled $true

Set-CsUser -Identity [email protected] -HostedVoiceMail $true -

OnPremLineURI tel:12345678 -EnterpriseVoiceEnabled $true

Page 26: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Now, verify that the phone number is assigned, and Enterprise Voice is enabled.

Get-CsOnlineUser -identity [email protected] | fl

*dial*,*sip*,*voice*,*usage*,*phone*,*onprem*

Note:

We see the user in Malaysia doesn’t have an E.164 number. This requires a user de-normalization for

Germany users to the matching Malaysian phone number assigned.

Get-CsOnlineUser -identity [email protected] | fl

*dial*,*sip*,*voice*,*usage*,*phone*,*onprem*

Page 27: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Grant an Online Dial Plan to a user

After the above step were successful, we must assign the tenant dial plan along the location based

dial plan.

The Grand-CsTenantDialPlan cmdlet should follow the principal for both UserA and USerB in

Germany and Malaysia:

Grant-CsTenantDialPlan -Identity [email protected] -PolicyName

Tag:DeMuc

Grant-CsTenantDialPlan -Identity [email protected] -PolicyName

Tag:MyKul

Verify if the dial plan was assigned correctly: Get-CsOnlineUser [email protected] |fl *dial*

Get-CsOnlineUser [email protected] |fl *dial*

Get-CsEffectiveTenantDialPlan is the cmdlet of our choice. We will verify the dial plan with if effective

on the Online User.

Get-CsEffectiveTenantDialPlan -Identity [email protected]

Page 28: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Test an Online Dial Plan

Testing a dial plan should be mandatory task. You don’t want to have surprises, won’t you?

Test an Online Dial Plan UserA Munich, Germany

Testing a local Munich number:

Get-CsEffectiveTenantDialPlan -Identity [email protected] | Test-

CsEffectiveTenantDialPlan -DialedNumber 12345678

Testing a local Kuala Lumpur office number:

Get-CsEffectiveTenantDialPlan -Identity [email protected] | Test-

CsEffectiveTenantDialPlan -DialedNumber +60312345678

If you want a Normalization Rules dedicated list up for a user, go ahead with this cmdlet

(Get-CsEffectiveTenantDialPlan -Identity

[email protected]).NormalizationRules

We proper order of the tenant and default location dial plan.

Page 29: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Test an Online Dial Plan UserB Kuala Lumpur, Malaysia

Again here, we have assumed the past dialing pattern experience for traditional PBX user in Malaysia.

Therefor we do NOT expect a normalization to E.164, this de-normalization must be handled, if

necessary on the Session Boarder Controller

The next step is validating the Kuala Lumpur, Malaysia dial plan:

Get-CsEffectiveTenantDialPlan -Identity [email protected] | Test-

CsEffectiveTenantDialPlan -DialedNumber 03012345678

(Get-CsEffectiveTenantDialPlan -Identity

[email protected]).NormalizationRules

Page 30: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Remove an Online Dial Plan for a user

Grant-CsTenantDialPlan -Identity [email protected] -PolicyName $null

Verify if the dial plan was unassigned correctly: Get-CsOnlineUser [email protected] |fl *dial*

Page 31: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Unexpected results with Online Dial Plan for a user

Note: (if no result or changes are reflected in PS)

If you shouldn’t get a result instantly after you made changes to a user, remember there is an Active

Directory present in Office 365 (Azure AD). This also need time for replication. Especially if you made

changed after fast process of creating a dial plan and assigning it to a user.

If you see the empty result, stay calm and try it around 5-10min later. Ending an online session are

restart PowerShell also can help showing results faster.

Get-CsEffectiveTenantDialPlan -Identity [email protected] | Test-

CsEffectiveTenantDialPlan -DialedNumber 12345678

(Get-CsEffectiveTenantDialPlan -Identity

[email protected]).NormalizationRules

Page 32: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Define the Session Boarder Controller Dial Plan (SBC Telco normalization) Remember my example definition for user experiences and the requirements for telco dial plans.

In the chapter: Planning scenario for normalization rules (example), I had defined the dial plans for

the Telco’s. Based on each country I will now show the generic planning’s required for each country.

I also want to assume, that we have an MPSL network between all location. Therefore, the Cloud

Connector Edition SBC components are interlinked as illustrated in the picture below.

DeMucMunich

Germany

MyKulKuala Lumpur

Malaysia

SBC normalization

and routing

Online Dial Plan

normalization

PSTN PSTN

MP

LS

A User with DeMuc Online Dial Plan make a call to a Malaysian Number in Kuala Lumpur. LEAST COST Routing is used on SBC

CCE

CCE

CCE

CCE

This example should not discuss any routing feature for the used SBCs, rather provide you the idea of

make more out of Office 365 Online Dial Plans and Cloud Connector Edition with CloudPBX.

Note:

This routing is NOT part of the CCE, the routing will be taken care by the Session Boarder Controller

Define SBC Munich, Germany First I have a look into the accepted dial plan from the chosen Telco:

The Germany site accept an E.164 number starting with 00 instead of “+”. Also, a number in the area

code and city code could be submitted, like 089xxx or 12345, which calls a number in Munich.

Our Online Dial Plan DeMuc, normalizes everything into E.164, staring with an “+”. Indeed, we only

need a single normalization. A number send from a Malaysian user to a German location will always

have the same format +49xx and needs to be taken care in the same way as a Munich users call will.

Input: +498912345678 Output: 00498912345678

Name Replace + with 00

Pattern: ^[+](\d+)$ Translation: 00$1

Page 33: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Define SBC Kuala Lumpur, Malaysia Malaysia looks pretty different!

The Malaysian provider must have for area calls in the form 12345678, for domestic calls

0412345678 and international call 006252368569

Call coming from a Malaysian Office 365 user are already normalize in that way. But the German

Office 365 user not. He still come in the E.164 format. This our SBC in Malaysia needs to transform/

normalize in the Telco dial plan required format. Kuala Lumpur area code is 03.

Input: +60312345678 Output: 12345678

Name Call to Kuala Lumpur 03

Pattern: ^[+]603(\d+)$ Translation: $1

Input: +60412345678 Output: 0412345678

Name Call to Malaysia domestic

Pattern: ^[+]60(\d+)$ Translation: 0$1

I have not declared anything on the Least Cost routing to the ASEAN region, but assuming you might

let the Germany User also make Calls to Singapore, which is +65

Input: +6512345678 Output: 006512345678

Name Replace + with 00

Pattern: ^[+](\d+)$ Translation: 00$1

Page 34: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Remote PowerShell login Requisites login into Office 365 Skype for Business Online are:

• Running OS must be 64bit

• Microsoft .NET Framework 4.5.x

• PowerShell Version 3.0 or higher

(if you need to install Version 3.0+, download and install Windows Management Framework

4.0: https://www.microsoft.com/en-us/download/details.aspx?id=40855)

• You need to install the modules that are required for Office 365, SharePoint Online, and Skype for Business Online:

o Microsoft Online Service Sign-in Assistant for IT Professionals RTW

o Windows Azure Active Directory Module for Windows PowerShell (64-bit version)

• Download the Windows PowerShell module for Skype for Business Online o https://www.microsoft.com/en-us/download/details.aspx?id=39366

MicrosoftOnlineLogin Set-ExecutionPolicy RemoteSigned

$credential = Get-Credential

Connect-MsolService -Credential $credential

Page 35: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

SkypeForBusiness Import-Module SkypeOnlineConnector

$SfBoSession = New-CsOnlineSession -Credential $credential

Import-PSSession $SfBoSession

SharePoint Import-Module Microsoft.Online.SharePoint.PowerShell -

DisableNameChecking

Connect-SPOService -Url https://domainhost-admin.sharepoint.com -

credential $credential

Exchange $exchangeSession = New-PSSession -ConfigurationName

Microsoft.Exchange -ConnectionUri

"https://outlook.office365.com/powershell-liveid/" -Credential

$credential -Authentication "Basic" -AllowRedirection

Import-PSSession $exchangeSession -DisableNameChecking

Security $ccSession = New-PSSession -ConfigurationName Microsoft.Exchange -

ConnectionUri

https://ps.compliance.protection.outlook.com/powershell-liveid/ -

Credential $credential -Authentication Basic -AllowRedirection

Import-PSSession $ccSession -Prefix cc

Logout Remove-PSSession $sfboSession

Remove-PSSession $exchangeSession

Remove-PSSession $ccSession

Disconnect-SPOService

Set a user's password to never expire I strongly urge you, that your admin user have the password set to never expire!

Run the following cmdlet to set the user password to never expire 1. Connect to Windows PowerShell by using your company admin credentials. Run the following cmdlet:

Connect-MsolService

2. In the Enter Credentials page, enter your Office 365 global admin credentials. 3. After you enter your Office 365 credentials, do the following:

o To set the password of one user to never expire, run the following cmdlet: Set-MsolUser -UserPrincipalName <[email protected]>

-PasswordNeverExpires $true Find out whether a user's password is set to never expire

1. Connect to Windows PowerShell by using your company admin credentials. Run the following cmdlet: Connect-MsolService

2. Do the following: o To see whether a single user’s password is set to never expire, run the following cmdlet by using

the user principal name (UPN) (for example, [email protected]) or the user ID of the user you want to check: Get-MSOLUser -UserPrincipalName <user ID> | Select

PasswordNeverExpires

Page 36: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Skype for Business Command Output shown as cropped List If a Skype for Business Get-Cs command provides an output as list, which is longer, it will provide a

cropped output only.

The solution towards is, you need writing the output into a variable and screen print it into the

command shell.

Example:

Get-CsEffectiveTenantDialPlan

Identity : 5c38cef7-806d-45b4-b347-05d96a9c9c96_DeMuc_DE

NormalizationRules :

{Description=MunichInternational;Pattern=^00(\d+)$;Translation=+$1;Name=Mun

ichInternational;IsInternalExtension=False;LegacyPointer=,

Description=MunichDomestic;Pattern=^0(\d+)$;Translation=+49$

1;Name=MunichDomestic;IsInternalExtension=False;LegacyPointer=,

Description=MunichLocal;Pattern=^(\d+)$;Translation=+4989$1;Name=MunichLoca

l;IsInternalExtension=False;LegacyPointer=,Description=Kuala Lumpur

Office;Pattern=^[+]6031234(\d+)$;Translation=1234$1;Name=KLOfcLoc;IsInterna

lExtension=False;LegacyPointer=...}

Getting the entire output you need the shell providing the output in a variable

$A = Get-CsEffectiveTenantDialPlan

$A.NormalizationRules

This should output something like this:

PS > $A = Get-CsSimpleUrlConfiguration

PS > $A.NormalizationRules

Description=MunichInternational;Pattern=^00(\d+)$;Translation=+$1;Name=Muni

chInternational;IsInternalExtension=False;LegacyPointer=

Description=MunichDomestic;Pattern=^0(\d+)$;Translation=+49$1;Name=MunichDo

mestic;IsInternalExtension=False;LegacyPointer=

Description=MunichLocal;Pattern=^(\d+)$;Translation=+4989$1;Name=MunichLoca

l;IsInternalExtension=False;LegacyPointer=

Description=KualaLumpurOffice;Pattern=^[+]6031234(\d+)$;Translation=1234$1;

Name=KLOfcLoc;IsInternalExtension=False;LegacyPointer=

Description=DEInternationalDialingRule;Pattern=^00(\d+)$;Translation=+$1;Na

me=DE Intl Dialing;IsInternalExtension=False;LegacyPointer=

Description=DELongDistanceDialingRule;Pattern=^0(\d+)$;Translation=+49$1;Na

me=DE Long Distance;IsInternalExtension=False;LegacyPointer=

Description=DE Default Rule;Pattern=^(\d+)$;Translation=+49$1;Name=DE

Default;IsInternalExtension=False;LegacyPointer=

Description=DEExtensionsrule;Pattern=^((\+)?(\d+))(;)?(ext|extn|EXT|EXTN|x|

X)(=)?(\d+)$;Translation=$1;ext=$7;Name=DEExtensionRule;IsInternalExtension

=False;LegacyPointer=

Page 37: Office 365 Tenant Dial Plans plan, implement, manage Skype for Business Tenant Dial Plan Admin Guide 5 Office 365 Online Dial Plans - General 6 Online Default Dial Plan (Service

Note: If you wish writing the output into a txt file, simple use:

PS > $A.NormalizationRules > C:\output.txt

Or

(Get-CsEffectiveTenantDialPlan -Identity

[email protected]).NormalizationRules