Automated Attendants (AA) and Queues are called ‘Voice Applications’ in Teams.
If the AA or Queue needs to be called from the outside world, you must attach a special resource or service account to the application. Right now you cannot assign direct route phone numbers to an application within the Teams admin console so a few steps must be done in PowerShell.
Direct Route phone numbers from Simtex are linked to the special resource account, which in turn is tied to an application instance.
You can map multiple resources accounts (and in turn numbers) to a single AA or queue. Most businesses will setup a temporary account for their test or interim numbers whilst waiting for number porting.
Obtain Free Microsoft Teams Phone Resource Account Licenses
Each application resource user needs a free ‘Microsoft Teams Phone Resource Account’ license which you can obtain from the Microsoft 365 Admin console under Billing.
https://docs.microsoft.com/en-us/microsoftteams/teams-add-on-licensing/virtual-user
Create an Application User
Create Application User (resource) for an Automated Attendant (AA)
- Create the AA user
$resourceuser = "resource_name_aa@domain" New-CsOnlineApplicationInstance -UserPrincipalName $resourceuser -DisplayName "Resource - Temporary Main Number" -ApplicationId "ce933385-9390-45d1-9512-c8d228074e07"
- Apply free ‘Microsoft Teams Phone Resource Account’ (formerly Microsoft Phone System – Virtual User) license to the special user created
https://docs.microsoft.com/en-us/microsoftteams/teams-add-on-licensing/virtual-user - Attach a Direct Route number to the user
Set-CsOnlineApplicationInstance -Identity $resourceuser -OnpremPhoneNumber +61xxxxxxxxx
Create Application User (resource) for a Queue
- Create the queue user
$resourceuser = "resource_name_queue@domain" New-CsOnlineApplicationInstance -UserPrincipalName $resourceuser -DisplayName "Resource - Temporary Main Number" -ApplicationId "11cd3e2e-fccb-42ad-ad00-878b93575e07"
- Apply free ‘Microsoft Teams Phone Resource Account’ (formerly Microsoft Phone System – Virtual User) license to the special user created
https://docs.microsoft.com/en-us/microsoftteams/teams-add-on-licensing/virtual-user - Attach a Direct Route number to the user
Set-CsOnlineApplicationInstance -Identity $resourceuser -OnpremPhoneNumber +61xxxxxxxxx
Create Voice Application
From here it’s best to use the Teams admin console (web interface)
https://admin.teams.microsoft.com/
- Click on Voice
- Click Auto attendants or Call queues
- Click Add and follow the wizard
- Once complete, edit the AA or Queue and select Resource Accounts
- Find the resource account added above, and attach it to the voice application
- When added you will see the name of the resource account and the phone number
- Click Submit and test the number