It is now possible to use Direct Routing numbers for Call Queues and Auto Attendants hosted in Teams / Phone System. Direct Routing is function that allows you to bring your own SIP-trunk instead of using phone numbers provided by Microsoft will Calling Plans. To be able to use your own DR-number for a Call Queue (CQ) or Auto Attendant (AA) you have to create a resource account that you assign a phone number to.
1. Create resource account
First create the Resource Account. You can do this in Teams Admin Console. Expand Org-wide settings and select Resource accounts.
You will see all existing resource accounts and to create a new one click on the New account button.
Enter the information about your new account; Display Name, Username (select domain) and Resource account type (should be Call queue).
You can also create your resource account with powershell. There is two different Applications IDs you can set, one for Call Queues and one for Auto Attendants.
- Auto Attendant: ce933385-9390-45d1-9512-c8d228074e07
- Call Queue: 11cd3e2e-fccb-42ad-ad00-878b93575e07
New-CsOnlineApplicationInstance -UserPrincipalName firstname.lastname@example.org -ApplicationId “ce933385-9390-45d1-9512-c8d228074e07” -DisplayName "Resource account"
2. Assign a license
Assign a Phone System – Virtual User to that account from Office 365 Admin portal. If you don’t assign a license you will get an error in the next step.
Earlier you had to assign a Office 365 E1, E3 (Phone System add-on) or E5 ). But this has changed now, if you want to change to Virtual user license do not remove the E-license before you add the Virtual User license.
Assign licenses to users in Office 365
3. Assign number to resource account
For this step we have to switch to Powershell. Connect to Skype for Business Online Powershell module and run the following command.
Set-CsOnlineApplicationInstance -Identity email@example.com -OnpremPhoneNumber +46890510
4. Assign resource account to an existing Call Queue
Go back to resource accounts in TAC and select the resource account you create. In the top menu select Assign/unassign.
You should see the phone number that you assign with powershell and you should be able to select an existing CQ in the select a call queue drop down, select a CQ and click save.
You can assign multiple resource accounts to one Call Queue or Auto Attendant, so if you had a service number provided by Microsoft before you can keep that and assign your own Direct Routing number as a second number.
Wait a while for everything to sync in Office 365 and then you should be able to call your number and get routed to your Call Queue.
When I tried this the first time in our tenant I got an 404 error when the SBC routed the call to Teams. I had to start a support case with Microsoft Support, they escalated the case and after a couple of days it started to work. Microsoft Support were not able to say if they did anything or if it just were the waiting time that solved this. After the first number were solved we did not have more 404 error with new numbers.
Purchase Phone System – Virtual User license
In Office 365 Admin portal you can acquire these licenses for “free”. You will get 25 “Phone System – Virtual User” for the first Phone System license you purchase, then you will get one (1) additional one for every 10th Phone System license. So if you have a company with 100 Phone system users you will get 35 Phone System – Virtual User licenses.
Get Phone System – Virtual User licenses
- Open Office 365 admin center
Open https://admin.microsoft.com/ from a web browser and sign in with you administrative credentials.
- Make sure that you are not running the new admin center
The new admin center will not show these licenses currently so if you are running the new admin center switch back to the old one.
You can see the option in the upper right corner.
- Open Purchase services
In the left menu expand the Billing menu and select Purchase services
- Purchase license
Find Phone System – Virtual User licenses and purchase the amount you think you will need.
M365 Apps & Services MVP | Consultant work at Exobe, based in Göteborg, Sweden. Co-host of Teamspodden, co-organizer of Teamsdagen. Been working with Exchange, LCS, OCS, Lync, Skype, Teams and related stuff for a while. Mostly writing tips and news after getting questions from customers.
6 thoughts on “Direct Routing numbers in Call Queues and Auto Attendant”
How do you proceed to remove a number, from a resource?
This should remove the number:
Set-CsOnlineApplicationInstance -Identity firstname.lastname@example.org -OnpremPhoneNumber $null
Set-CsOnlineApplicationInstance – Is not even a command to be found anymore…Or me and my PS guru couldnt find it period as a cmd that is used.
All we keep getting is errors,
Also do you know why when creating a RA I have to choose the “.onmicrosoft.com” domain?
Is there a reference from Microsoft confirming this
I am trying to setup a Directory Search via Direct Routing number assignment. If I call the number and ask for the user, the system acknowledge the user, however fail to transfer the call. Any idea’s?