Microsoft Teams Trunks in VI Back Office
To set up your Microsoft Teams trunks in the Back Office, you will need to go to Endpoints > Microsoft Teams Trunks.
At this page, you will click the Create New Microsoft Teams Trunk button.
You will be prompted with the following input fields:
Trunk Name
This is a friendly name for your Microsoft Teams Trunk within the Back Office.
Subdomain
This is the subdomain name you wish to use for your Microsoft Teams Instance.
After you have entered in that information, you will want to click Create Trunk. If successful you will receive a success message that it was submitted.
Adding a Custom Domain to Microsoft via Azure Active Directory Portal
The following steps is a summary of documentation from Microsoft: https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/add-custom-domain
Add New Domain to Azure AD
With the domain name provided entered in the Back Office, you can now add this to your Azure AD Directory.
Steps in adding the new domain according to Microsoft:
Sign into the Azure Portal as a Global administrator account for the directory you are using.
Search for and select “Azure Active Directory” from any page. Then select Custom Domain Names -> Add Custom Domain
In Custom domain name, add the new domain name shown in the Back Office under the Subdomain column on the Microsoft Teams Trunks page. (XXXXXX.teams.sangoma.com)
After you have entered the now unverified domain, you will need to save the information to create a TXT record. This is needed so the Subdomain can be properly configured in the Back Office.
The information you will need to paste into the Back Office will look like this:
Please copy the MS=ms######## and go back into the Back Office under Endpoints->Microsoft Teams Trunks. Click on the “Edit” button next to the trunk that matches the domain you created and put the information inside the pop-up:
Once the TXT record information is submitted, you’re ready to continue configuring Microsoft Teams.
You will also see the configured checkbox checked on the Microsoft Teams Trunks page in the Back Office.
After configuration has been completed, you will want to verify the domain back in the Azure AD Portal.
Find and select your new custom domain name in the list of your domains.
You will see a “Verify Domain” section where you will click the “Verify” button.
FYI this may take up to 24 hours to complete for propagation on Microsoft’s side
Assigning a User to New Domain (1 User needs to be created on the new domain)
This user will need an E3 with a Phone System license add-on or an E5 (which includes the phone system license) or the equivalent in your plan. If you're not sure if the add-on is needed, you can find out more information about your plan here:
You can create a new user by going to the “Azure Active Directory” menu item and then Users.
Then find “+ New User”
Select “Create User” and fill out the rest of the form, ensuring that the domain selected is the one that you have just verified. (XXXXX.teams.sangoma.com)
Once this new user is created, you will be able to find the user in the list of users for your account under the Users menu option on the menu.
You will want to now click on the new user that was created for your new domain to view that new user.
Next, click on “Licenses” which is located under the “Manage” section of the User menu.
We will now want to apply the license to this user so voice calls can start.
To do this
Click on “+ Assignments” and search for “Microsoft 365 Phone System
Apply the license to the User
If an E5 user then the license is included but it will be an add-on if not an E5 user.
This may take some time to propagate.
Configure Voice Policy
To configure Microsoft Teams’ Voice Routing is done by running the following script in Powershell as an administrator filling out the “$tenant_domain” with the domain name chosen when setting up the Microsoft Teams Trunk which should match the domain name that was verified and now has a single user with a Phone system license on it:
#CREATE TRUNKS AND VOICE POLICY |
Configure Users with Voice Policy (These users do NOT need to be on your new domain)
For a user to be able to make/receive phone calls with MS Teams, they must have an E5 account or Phone System License add-on. Skip to step 5 if they already have these.
1.) Label the existing PowerShell (after step 5) as Deprecated.
2.) Add a new box under it, with the following PowerShell command:
$USER = "user@domain.tld" $DID = "+1234567890" $VoicePolicy = "VP_SANSAY1" Set-CsPhoneNumberAssignment -Identity $USER -EnterpriseVoiceEnabled $true -PhoneNumber $DID Grant-CsTeamsSharedCallingRoutingPolicy -Identity $USER -PolicyName $VoicePolicy
3.) Click on the user you are configuring, then click on “Licenses” under the “Manage” section of the submenu
4.) Click +Assignments and search for Microsoft 365 Phone System and add it to the customer (This will be included for E5 accounts and does cost additional for E3 accounts)
5.) In PowerShell, run the following script to add voice service and a DID to the customer:
$USER = "user@domain.tld" |
It can take some time after adding voice policies, but the user should be able to browse to “Calls” in Microsoft Teams and have a Dial pad along with a message saying “Your Number: +1 (234) 567-8901”
Point DID to Microsoft Teams Trunk
The last step after you have a configured Microsoft Teams trunk in the Back Office and you have direct routing set up with Microsoft Teams, is to point a DID to your Microsoft Teams trunk in the Back Office.
To do this is just like pointing a DID to an endpoint group.
Go to the DIDs tab
Go to Manage DIDs
Find the DID you want to point to the Microsoft Teams Trunk
Select Microsoft Teams as the route to option when viewing the DID configuration wizard
See example in image below
After a 15 minute window of propagation, you can start testing your calls to ensure calls are routing properly.