All things Microsoft Teams, Office 365 and the Microsoft Cloud

Routing calls to unassigned numbers – Public Preview

Unassigned numbers can potentially have a negative impact on an organisation’s reputation.

For example, when an employee leaves the organisation, their phone number is re-added to the pool of available numbers.

If a customer calls that number there is generally no way for them to know that the person has left the organisation or how they can reach someone else with regards to their query.

This could mean the loss of business. In Skype for Business server you have the ability to route unassigned numbers to an announcement, response group or user. This functionality is now available for Microsoft Teams in Public Preview.

Let’s take a look at how we set up unassigned number routing in Microsoft Teams.

Pre-requisites

Before I can set up unassigned number routing, I need to update the Microsoft Teams PowerShell module to version 2.5.1 or later. I do this by running the following command.

Update-Module MicrosoftTeams

I can confirm the update was successful, by running the two commands.

Import-Module MicrosoftTeams
Get-Module MicrosoftTeams

Configuring Unassigned number routing

When configuring unassigned number routing, there are two options in Microsoft Teams, these are:

  1. Send the call to a Call Queue or Auto Attendant
  2. Play an announcement to the caller

Let’s look at how to configure these based on common business scenarios.

Sending Unassigned numbers to a Call Queue or Auto Attendant

Sending unassigned numbers to a call queue or auto attendant is a great way to ensure the caller gets through to someone when a number is no longer in use.

An example of this may be a sales team, if a sales agent leaves the organisation, we would want to ensure their call gets through to someone in the sales team to avoid losing their business.

Contoso has a reserved range of phone numbers for their Sales team.

  • The reserved range is between +441632 900 901 and +441632 900 909.
  • The resource account configured for their Sales Call Queue is ‘sales@cloud.teamcontoso.com’

In this scenario, I will set all unassigned numbers between +441632 900 901 and +441632 900 909 to route to the Sales Call Queue (sales@cloud.teamcontoso.com).

Note: All numbers used in this example are fictional and allocated by Ofcom for TV and Radio use only.

The first thing I’ll do is open PowerShell and connect to Microsoft Teams. I’ll run this command to connect to Microsoft Teams.

Connect-MicrosoftTeams

Now, I’m connected, I can look at the command to set the unassigned number routing policy.

I will need to save the Resource Account’s GUID as a variable. I’ll run this command to do that.

$RAObjectId = (Get-CsOnlineApplicationInstance -Identity sales@cloud.teamcontoso.com).ObjectId

Next, I will use the New-CsTeamsUnassignedNumberTreatment command to set the policy for the Sales range of DDI numbers.

New-CsTeamsUnassignedNumberTreatment -Identity Sales -Pattern "^([\+]44163290090\d{1})$" -TargetType ResourceAccount -Target $RAObjectId -TreatmentPriority 1

If like me, you struggle with Regex, you could use Regex101.com to help formulate your regular expression for your phone number range.

Play an announcement to the caller

Playing an announcement is a simple but effective way to let someone know that the number they have called is not in use.

In this scenario, I will set all unassigned numbers between +441632 900 910 and +441632 900 919 to play Contoso’s announcement (NotInUse.wav) to inform the caller that the number is no longer in service.

The first thing I’ll do is define my announcement file.

$Content = Get-Content "C:\Media\NotInUse.wav" -Encoding byte -ReadCount 0

Next, I can upload the audio file, by running this command:

$AudioFile = Import-CsOnlineAudioFile -FileName "NotInUse.wav" -Content $Content

Now the file has been uploaded, I can collect the Id of the Audio File which I just imported.

$fid = [System.Guid]::Parse($AudioFile.Id)

Now, it’s time to create the policy.

New-CsTeamsUnassignedNumberTreatment -Identity General -Pattern "^([\+]44163290091\d{1})$" -TargetType Announcement -Target $fid.Guid -TreatmentPriority 2

Some things to consider

  • If routing to an announcement, the audio file will be played once to the caller.
  • To route calls to unassigned Microsoft Calling Plan subscriber numbers, your tenant needs to have available Communications Credits.
  • To route calls to unassigned Microsoft Calling Plan service numbers, your tenant needs to have at least one Phone System – Virtual User license.

Routing calls to unassigned numbers – Microsoft Teams | Microsoft Docs