Microsoft Teams Phone System offers you the ability to replace your telephone system (PBX) with Microsoft Teams. There are different options for connecting Microsoft Teams with the Public Switched Network (PSTN). And all of them have the same challenge:

Normally, a company acquires a phone number range from the provider and has for example 100 phone numbers available. But not all phone numbers are in use. Perhaps the company just has 70 employees. So, 30 numbers are unused and available. Or an employee leaves the company, and the employee’s phone number becomes available again.

A classic PBX system usually has a feature that allows incoming calls to unknown phone numbers to be redirected to a specific user in the company or to the receptionist. This is extremely useful if a company does not want to lose external callers. Or when someone from the sales team retires, but their number has been used and known by customers for decades.

 This blog post covers how to deal with unassigned numbers and how the Teams Administrator can configure the unassigned number feature in the Teams Admin Center (TAC).

Unassigned Numbers – Where to Find and How to Configure

The Unassigned Number feature is a little bit hidden in the Teams Admin Center and by default, it is not configured.

The Teams Administrator can find it in the Teams Admin Center by opening Phone Numbers in the Voice section. If the company uses Calling Plans by Microsoft or Operator Connect, all acquired phone numbers are listed in the Admin Center with an overview of the user assignments.

The tab “Routing rules” is used to configure and maintain unassigned phone number handling (figure 1).

Teams Admin Center showing the Routing Rule page
Figure 1: Teams Admin Center showing the Routing Rule page

The feature supports routing rules for a single phone number, multiple numbers, or a phone number range. To create a new rule, the administrator can click on the Add button. A wizard requests further information to create the new rule like a rule name, an optional description, an evaluation order, a rule, and a routing option.

If there are several rules matching the same phone number, the evaluation order defines which rule gets the priority.

The rule section lets the Teams administrator decide if the rule should apply to a single phone number, a number starting or ending with a pattern, a phone number range, or an advanced setup. Advanced setup can be used for complex RegEx patterns.

The wizard requests further information depending on the selection of the rule set. The easiest way is to select a single phone number and enter the full E.164 phone number including the leading plus, country code, area code, and the phone number, for example, +1 555 0100.

The routing option allows the administrator to select between a greeting (play an audio file), transfer the call to a person in the organization, or transfer the call to a voice application like a Microsoft Teams Auto Attendant or Call Queue.

An Auto Attendant or Call Queue can be used if the call should be transferred to a receptionist or a hotline, for example.

Creating a Basic Routing Rule
Figure 2: Creating a Basic Routing Rule

When the Teams Administrator saves the new rule (figure 2), Teams converts the defined number into a RegEx pattern and shows it in the rule overview. This happens automatically and the administrator does not need to enter the pattern manually.

Once the rule has been created and activated, the Teams administrator can also test the new rule in the TAC. To do this, the admin can click on the “Test number”-button in the menu. A new window opens. A phone number can now be entered and tested here. The wizard shows whether the phone number entered matches to a rule or not (figure 3).

Testing a phone number
Figure 3: Testing a phone number

Better to Know About Unassigned Numbers

The Unassigned Numbers or Routing Rules features can be used with any PSTN connectivity type (Calling Plans, Operator Connect, or Direct Routing) in Microsoft Teams.

Routing Options

If the Teams Administrator wants to route a call to a person in the organization, the user must be enabled and configured for the  Teams Phone System. The user must have an assigned phone number. Otherwise, the people picker will not find the person searched.

Take a Cup of Tea While Waiting for Backend Sync

When the Teams Administrator creates a new phone number rule, it can take several hours until the new rule takes effect. From my experience, it takes a minimum of two hours for a change to a rule to become active.

Due to the delay between creating and activating the rule, a trial-and-error principle to find the right rule pattern is not possible. This must be considered and is important to understand.

The Teams administrator should therefore know exactly how a phone number range will function when creating it.

What Type of Calls are the Rules Applied to?

The Phone Number Routing Rules apply in Microsoft Teams to inbound calls from the PSTN, of course. This is the main focus of the Unassigned Number magic.

But the rules apply also to outbound calls to the PSTN. If a Teams Phone user dials a phone number, where the pattern of a phone rule applies, the call will be transferred according to the applied rule.

A phone number rule always applies to both call directions: inbound and outbound.

Phone Number Ranges

Companies often have a whole phone number range, and in that case, it seems to be very easy to configure Unassigned Number rules.

In countries with a fixed size for phone numbers, this is suitable. For countries where the phone number length can vary, like Germany, it is important to define the phone pattern correctly. Otherwise, the unassigned phone number rule acts like a “catch-all” rule, and outbound calls are interrupted for the Teams users.

A short example: a German company owns a phone number range starting from +49 200 1234 – 0 to +49 200 1234 – 9. This allows the company to use phone numbers like +49 200 1234 1, but also +49 200 1234 10 or +49 200 1234 100.

Now, the easiest way to create an Unassigned Number rule would be to use the phone range starting from +49 200 1234 0 to +49 200 1234 999. But this would result in a catch-all rule and most outbound calls from Teams would be transferred to this rule (figure 4).

Practical Teams Phone: How to Deal with Unassigned Numbers
Figure 4: Creating a Routing Rules with wrong number range

Therefore, a Teams Administrator needs to create several rules:

PriorityStart RangeEnd RangeRouting Option
1+49 200 1234 0+49 200 1234 9Person in Org
2+49 200 1234 00+49 200 1234 99Person in Org
3+49 200 1234 000+49 200 1234 999Person in Org

The better solution is to create an Advanced Rule with RegEx:

Practical Teams Phone: How to Deal with Unassigned Numbers
Figure 5: Creating an Advanced Setup Routing Rule with RegEx

The RegEx pattern is ‘^\+492001234[0-9]’ and includes all phone number lengths within this range.

Unassigned Numbers are Free and Available for Use

Next, let’s think about the use case of a Teams Administrator applying a phone number rule to just redirect calls for a specific number. For example, the mainline number of a company requires a second phone number. A phone number rule could be a solution. But in this case, the admin should understand that this number is “free” from the Teams’ platform perspective and is available for phone number assignments.

What does it mean? Another administrator, who is not aware of this little redirect trick, can assign this number to a new user. The Teams platform won’t trigger any warning or error message that the phone number is already in use (as a redirect).

In this particular case, the Teams Administrator should create a new Teams resource account, assign a Teams Phone Resource Account license, and finally assign the phone number to it. Then, the phone number is in use and cannot be assigned twice.

Conclusion

The Teams feature Phone Number Routing Rules are a helpful solution in a Teams Phone system deployment. They can help to avoid customer-unfriendly messages when calling numbers that are no longer assigned. Instead of canceling the call, the Teams Administrator has several options to reroute these calls internally, ideally to another user who can handle this call and find the right persons.

Phone Number rules are a strong feature and require careful preparation. If a rule includes a broader number range than intended or was defined incorrectly, this can lead to disruptions in outgoing telephony. Due to the delay in activation in the backend, it usually takes a while until such errors are noticed and then fixed again.

I recommend starting with single phone numbers, before creating rules for whole phone number ranges. This way the Teams administrator gains more confidence and has a better understanding of the feature.

About the Author

Thorsten Pickhan

Thorsten Pickhan works as Cloud Architect at glueckkanja AG where he is responsible to plan and deploy UC infrastructures based on Microsoft technologies. He has worked as technician and consultant for more than 15 years and been specialized in Microsoft Lync/Skype for Business and Microsoft Teams for 8 years. From the beginning of his UC consultant career, he was focused on Enterprise Voice implementations. Since a few years he is co-organizer of the Microsoft Teams User Group Germany and involved in the community as speaker and blog post author. In March 2020, he started his own Office 365 YouTube channel where he publish on a regular basis new content for his weekly “Office 365 QuickTipps” channel. In a further YouTube project, together with his friend Michael Plettner, they release a German Microsoft 365 Talk. Since July 2021, Thorsten has been awarded as a Microsoft MVP for Microsoft 365 in recognition of his commitment to the Microsoft Tech Community.

Leave a Reply