Teams – Manage Unassigned Phone Numbers (with an Audiocodes SBC)

Unassigned numbers management is essentially the capability of redirecting calls to a number in a company DDIs range but not assigned to any user to a switchboard/voicemail/automatic answer.

At the moment there are at least three different Uservoice posts requiring to have in Teams management for the above similar to the one we had in Skype for Business on-premises.

Whilst we wait for this feature to be released, the easiest way to manage unassigned numbers it to work on the SBC (in my scenario, AudioCodes)

My objective: redirect all the calls from the PSTN to an unassigned number to a switchboard

My scenario: Direct routing already configured and working. All the calls from the PSTN are sent to Teams

Note: I took the base idea from this post on Reddit (if the original author wants to be quoted here, more than happy to do that)

So, every time the SBC will try to forward a call to Teams and the number is not assigned, we will have SIP response 404 Not Found

First step: add 404 to the Alternative Reasons Set

Signaling & Media -> SBC -> Routing -> Alternative Reasons Set
Alternative Reasons Set
Adding 404
404 added to the Alternative Reasons Rules

Second Step: Create an IP Group that duplicates the existing Teams Direct Routing IP Group (I used the same Proxy Set, IP Profile and Media Realm of the existing Teams IP Group). I will call is “Unassigned-Numbers

Signaling & Media -> Core Entities -> IP Groups
Add IP Group
Unassigned-Numbers IP Group

Third Step: Add a route (in IP-to-IP routing) after the one going to Teams. This one will use the ‘Alternative Route Ignore Inputs’ and have, as a destination the “Unassigned-Numbers” IP Group

Signaling & Media -> SBC -> Routing -> IP-to-IP Routing
IP-to-IP Routing
Additional IP-to-IP Route
Route added after the one to Teams Direct Routing

Fourth Step: define and Outbound Manipulation pointing to the “Unassigned-Numbers” IP Group that re-writes the destination URI, replacing the original called number with the number of the switchboard (I have called it “Unassigned-Numbers-Manipulation“)

Signaling & Media -> SBC -> Manipulation -> Outbound Manipulation
Changing the callee number to the switchboard one

What we have to do now, is just testing. You will see the call go to the Teams Direct Routing IP Group and then go to the Unassigned-Numbers IP Group

Callee number manipulated