Creating Dial Plans to Prefix Outbound Calls

This guide covers how to configure Dial Plans within Microsoft Teams to prefix local calls in order to allow users to not have to enter the local prefix

Summary

This guide covers creating Dial Plans within Microsoft Teams, specifically this guide covers creating a Dial Plan to prefix outbound calls to local numbers with the relevant local area code.

Prefixing the outbound call allows customers based in different states to then allow their staff to call locally without having to dial 02 or 03, etc, first.

E.g. Joe lives in NSW but the head office for the company he works for is based in WA, he currently has to put 02 in front of all local Sydney calls to be able to get to them. With the prefixing, you can assign a custom dial plan to Joe and he will no longer need to dial 02 first to call local numbers.

Process

First Steps

The first thing you need to do is ensure the "Microsoft Teams" module is installed in PowerShell so you can connect to the Teams tenant. To do this open an elevated PowerShell window and run the command below. (Say yes to any warnings that appear)

If you already have the module installed you can skip this step and go straight to connecting to teams.

Install-Module MicrosoftTeams -AllowClobber

Connecting to Microsoft Teams

Once that is installed connect to the Microsoft Teams tenant with an Admin account using the commands below.

Import-Module MicrosoftTeams
Connect-MicrosoftTeams

Creating the Dial Plans

Once you've successfully connected to the tenant you should see some information about the account you connected with. If you see that you can now run the commands below and create your dial plans.

#Creating NSW Dial Plan
$nsw = New-CsVoiceNormalizationRule -Identity AUSTRALIA/NSW-PREFIX -Description "Australia - NSW Prefix Rule" -Pattern '^(\d{8})$' -Translation '+612$1' -InMemory
New-CsTenantDialPlan -Identity "Australia - NSW Dial Plan" -Description "Dial plan that prefixes calls to 8 digit numbers with NSW area code" -NormalizationRules @{Add=$nsw}

#Creating QLD Dial Plan
$qld = New-CsVoiceNormalizationRule -Identity AUSTRALIA/QLD-PREFIX -Description "Australia - QLD Prefix Rule" -Pattern '^(\d{8})$' -Translation '+617$1' -InMemory
New-CsTenantDialPlan -Identity "Australia - QLD Dial Plan" -Description "Dial plan that prefixes calls to 8 digit numbers with QLD area code" -NormalizationRules @{Add=$qld}

#Creating VIC/TAS Dial Plan
$victas = New-CsVoiceNormalizationRule -Identity AUSTRALIA/VICTAS-PREFIX -Description "Australia - VIC TAS Prefix Rule" -Pattern '^(\d{8})$' -Translation '+613$1' -InMemory
New-CsTenantDialPlan -Identity "Australia - VIC TAS Dial Plan" -Description "Dial plan that prefixes calls to 8 digit numbers with VIC/TAS area code" -NormalizationRules @{Add=$victas}

#Creating WA/SA/NT Dial Plan
$wasant = New-CsVoiceNormalizationRule -Identity AUSTRALIA/WASANT-PREFIX -Description "Australia - WA SA NT Prefix Rule" -Pattern '^(\d{8})$' -Translation '+618$1' -InMemory
New-CsTenantDialPlan -Identity "Australia - WA SA NT Dial Plan" -Description "Dial plan that prefixes calls to 8 digit numbers with WA/SA/NT area code" -NormalizationRules @{Add=$wasant}

Assuming the commands above completed without error you should now have four new Dial Plans created in Teams, you can find them under "Teams Admin Portal >> Voice >> Dial Plans"

Assigning the Dial Plan to a User

Now you can go ahead and assign them to a user, you can do this via the Teams Admin portal by editing the user or you can do this via PowerShell. To make the change via PowerShell you can use the command below, and repeat it for every user you want to adjust.

The commands require some modification, change "<user@emailaddress>" to the users actual email address

# For NSW Based Users
Grant-CsTenantDialPlan -Identity <user@emailaddress> -PolicyName "Australia - NSW Dial Plan"

# For QLD Based Users
Grant-CsTenantDialPlan -Identity <user@emailaddress> -PolicyName "Australia - QLD Dial Plan"

# For VIC/TAS Based Users
Grant-CsTenantDialPlan -Identity <user@emailaddress> -PolicyName "Australia - VIC TAS Dial Plan"

# For WA/SA/NT Based Users
Grant-CsTenantDialPlan -Identity <user@emailaddress> -PolicyName "Australia - WA SA NT Dial Plan"

If you encounter any issues with this guide please reach out to our support team at support@hostednetwork.com.au or give us a call on 1300-781-148

Last updated