Unlike Lync & Skype for Business, Teams doesn’t have a method to handle unassigned numbers (yet). There is a UserVoice post here requesting the feature: https://microsoftteams.uservoice.com/forums/555103-public/suggestions/38673550-unassigned-number-range
Typically the unassigned numbers feature was used to program ALL available number ranges in the system. A number was deemed “unassigned” if it was not populated as a LineURI against an SfB Object (i.e. User, Response Group, Application Endpoint etc). If an unassigned number received a call you had two options:
- Route to Exchange UM (I.e. Auto Attendant)
- Route to an Announcement (i.e. Play a message “This number is not in use” and optionally redirect to another number like Reception)
You could configure an unassigned number action on a per range basis which was useful for international deployments. Other benefits included using 3rd party scripts to report on number allocation/available numbers (by comparing all numbers in use to the numbers programmed in unassigned numbers). When someone leaves the organisation the Unassigned Number range was a handy tool to ensure numbers don’t just “black hole” after IT disable the user.
What about Teams Unassigned Numbers?
The short answer is – there isn’t an Unassigned Number feature. The good news is I have a method to handle unassigned numbers, although not as feature packed as the SfB feature. This workaround only applies to numbers routing via Direct Routing where you are in control of an SBC. This post involves creating an alternative routing reason to handle 404s from Teams to re-route to an Auto Attendant 🙂
Part 1 – Create an Auto Attendant for Unassigned Numbers
In this example I will create a Teams Auto Attendant that plays “I’m sorry this number is not in use” then disconnects the call.
Step 1 – Add a Resource Account via Teams Admin Center
Step 2 – Grant a Microsoft 365 Phone System – Virtual User license to the Resource Account user using Microsoft 365 Admin Center
Step 3 – Run PowerShell to assign a Telephone Number to the Resource Account. Note in this example I’m using +440000000000 as this number never needs to be reachable from an outside line. You can use a number from a range you hold.
Connect-MicrosoftTeams Set-CsOnlineApplicationInstance -Identity [email protected] -OnpremPhoneNumber +440000000000
Step 4 – Create the Auto-Attendant
Step 5 – Add the Resource Account to the Auto Attendant
Part 2 – Configure the SBC
In this example I will be using AudioCodes. This should be possible on other SBC vendors but the process may differ slightly.
Step 1 – Create an Alternative Reasons Set with a Release Cause 404 Not Found
Setup > Signalling & Media > SBC > Routing > Alternative Reasons Set
Step 2 – Ensure the existing Teams IP Group is configured to use the SBC Alternative Routing Reason Set above
Setup > Signalling & Media > Core Entities > IP Groups
Step 3 – Create a new route in the IP-to-IP Routing table. Ensure the rule is directly below your route to Teams and the Alternative Route Options is set to “Alternative Route Consider Inputs”. The destination should be your Teams IP Group and the “Modified Destination User Name” should be your Auto Attendant for unassigned numbers.
Setup > Signalling & Media > SBC > Routing > IP-to-IP Routing
Step 4 – Ensure the new route is correctly configured below your existing route to Teams
Step 5 – Test and Trace.
On my SBC it attempts to route the call to all three Microsoft SIP endpoints:
The Alternative Route then kicks in and routes to the Auto Attendant in Teams.
This example plays the “I’m sorry this number is not in use” message then disconnects, but this could be another message, redirect to a Switchboard or use other Teams Auto-Attenant features.
Teams will only send a 404 Not Found back to the SBC if the number is not allocated to a Teams Phone System object (User, Common Area Phone, Resource Account, Teams Room etc). Once the number is allocated, it will no longer hit the alternative route to the Auto Attendant.
Technical Architect at Symity