Thursday 25 October 2018

Tenant dialplan for Danish users

The default Office 365 dialplan doesn't offer a correct national translation for the Danish based user (based on location in Office 365) to E.164.

Example:

The official Danish numbering plan has the following general properties:
00 - International Access Code (rule3)
0[1-9] - Not in use
10 - Operator specific routing codes 
1[1-9] - 3-5 digit short dials (like emergency service 112, police 114 etc.) (rule1)
2-9 - 8 digit landline and mobile phonenumbers (rule2)

Special numbers are numbers starting with 80 (toll-free) and 90 (overpriced).

For more information on the numbering plant, please visit Energistyrelsen (Danish Energy Agency): https://ens.dk/ansvarsomraader/telefoni/numre/den-danske-nummerplan 

To support the Danish numbering dialplan, a tenant dialplan has to be created.

These cmdlets will support a Global tenant dialplan:
$rule1 = New-CsVoiceNormalizationRule -Name 'DK - service' -Parent 'Global' -Pattern '^(1\d{2,4})$' -Translation '+45$1' -Priority 2 -InMemory
$rule2 = New-CsVoiceNormalizationRule -Name 'DK - national' -Parent 'Global' -Pattern '^([2-9]\d{7})$' -Translation '+45$1' -Priority 3 -InMemory
$rule3 = New-CsVoiceNormalizationRule -Name 'DK - international' -Parent 'Global' -Pattern '^00(\d+)' -Translation '+$1' -Priority 4 -InMemory
Set-CsTenantDialPlan -Identity 'Global' -NormalizationRules @{add=$rule1,$rule2,$rule3}

And grant this dialplan to the user:
Grant-CsTenantDialPlan -Identity <userid> -PolicyName 'DK'

You could also include a voice normalization rule for internal numbers (old telephony style) - this one will support 4 digits in the range of 4200-4399 and translate to +457874xxxx:
$rule = New-CsVoiceNormalizationRule -Name 'DK - intern' -Parent 'Global' -Pattern '^(4[2-3]\d{2})$' -Translation '+457874$1' -Priority 1 -InMemory

If you have users in multiple countries, you should create a country specific tenant dialplan.
$rule1 = New-CsVoiceNormalizationRule -Name 'DK - service' -Parent 'Global' -Pattern '^(1\d{2,4})$' -Translation '+45$1' -Priority 2 -InMemory
$rule2 = New-CsVoiceNormalizationRule -Name 'DK - national' -Parent 'Global' -Pattern '^([2-9]\d{7})$' -Translation '+45$1' -Priority 3 -InMemory
$rule3 = New-CsVoiceNormalizationRule -Name 'DK - international' -Parent 'Global' -Pattern '^00(\d+)' -Translation '+$1' -Priority 4 -InMemory
New-CsTenantDialPlan -Identity 'DK' -NormalizationRules @{add=$rule1,$rule2,$rule3}

This could also be scripted based on the user location:
Connect-MsolService
$users = Get-MsolUser | Where-Object {$_.UsageLocation -eq 'DK'}
foreach ($user in $users)
{
Grant-CsTenantDialPlan -Identity $user.UserPrincipalName -PolicyName 'DK'
}

As always, please share your thoughts, on this topic, below.

Tuesday 9 October 2018

Provide easy access to call queue optin/optout

As more and more services transition from Skype for Business to Microsoft Teams, also call-queues and auto-attendants are available for a Teams user organization.

In the call-queue, there is an option to allow for agents to opt-out of the call-queue and hence not receive calls from the call-queue.

In Skype for Business, this can be accessed from the client settings.

However, when the user has upgraded to Teams, there is not a link, or setting, that can help the user to the settings, they need to remember the URL themselves. Not the best option, my bet is the URL will be lost, soon after opt-out of the call-queue.

To provide easy access to the settings page, we can create a custom tile in the Office 365 applauncher. Go to the admin page in Office 365 -> Settings -> Organization Profile and select "Add custom tiles for your organization". If this option is not present, you need to assign a license, provision an Exchange mailbox and login to Outlook Web client. The mailbox and license can be removed afterwards.

Select "Add a custom tile"

Add these settings and click "Save"

Now the users can easily access the settings page from the tile in their applauncher and they can even pin the tile to the starter for quicker access.

The user can now opt-out and change other settings easily and the URL will not be lost.