Forum Discussion
Questions to New-CsTeamsUnassignedNumberTreatment
- Sep 11, 2023
Hi JFM_12,
when using the New-CsTeamsUnassignedNumberTreatment cmdlet in Microsoft Teams to handle unassigned phone numbers, you can define a pattern for incoming calls.
However, specifying a range like "from 1234567 to 1234570" directly in the Pattern parameter isn't supported.Instead of that, you could use wildcards to define a pattern. For example, you can use `123456[7-0]` to match any number in the range from 1234567 to 1234570. The `[7-0]` represents a character set that includes digits 7, 8, 9, and 0.
This allows you to cover the desired range by crafting a pattern with the appropriate wildcards.
I hope this helps clarify how to define a pattern for your needs with the `New-CsTeamsUnassignedNumberTreatment` cmdlet.
New-CsTeamsUnassignedNumberTreatment (MicrosoftTeamsPowerShell) | Microsoft LearnPlease click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.If the post was useful in other ways, please consider giving it Like.
Kindest regards,
Leon Pavesic
JFM_12 You could also leverage Teams Admin Center, to generate the expressions for you.
Under PhoneNumbers --> Routing Rules there's a GUI to view/build new rules and it generates the expressions for you:
The problem was that I had 350 unassigned number configurations and wanted to automatize it.
We did most of it by powershell. I searched for a tool to generate it in bulk.
Thank you for your support
Regards
JFM_12