Microsoft Teams Direct Route
Onboarding MS Teams phone calling using our Direct Route configuration couldn't be easier. Our PowerShell wizard integrates directly into your Teams account to automate and simplify what is otherwise a complicated setup. Our only prerequisite's are your Teams Domain and Teams Phone licensing and we handle the rest; DNS, users / phone numbers and finally all PSTN and routing information.
Useful guides on getting Microsoft Teams
Admin and PowerShell
1. Licensing Summary
To enable Phone services for Microsoft Teams requires a 'phone system license' for each users:
-
Enterprise licensing: add either an E1, E3, or E5 license for a user and this will give you the functionality you need to enable phone services for that user.
-
Team Phone standard: this 'Add-on' is a requirement to enable a phone service. Any license that has Teams included can purchase a Phone System Standard license to enable phone services.
-
Sign into Microsoft 365 admin center (as Admin)
-
Select Billing > Licenses
This step by step guide illustrates a 'vanilla' customer new to Teams and looking to signup to Teams with a single mapping 1 phone line.)
2.1 Add MS Teams Numbers
-
Log into your account.
-
Go to Switchboard Select > Add Number.
-
Select Area Code > Number Type > MS Teams.
-
Click on Add to save settings and add the chosen number to your account.
3.0 PowerShell wizard
Use our PowerShell wizard to generate the necessary pwsh scripts to complete your Microsoft Teams Direct Route setup.
-
Go to Tools Select > Teams.
-
Select PowerShell
3.3 Get TXT Record
#:$MgVerificationCode = (Get-MgDomainVerificationDnsRecord -DomainId "ms50000100.teams.sipcity.com" | Where-Object {$_.RecordType -eq "Txt"}).AdditionalProperties.text
#: echo $MgVerificationCode
Domain validation TXT record: This record is generated by Microsoft to validate your customers unique address against our DNS. Copy the record into the ADD TXT dialog to insert the record.
3.4 Domain confirmation
#:Confirm-MgDomain -DomainId "ms50000100.teams.sipcity.com"
Time to complete: 04:59
Following confirmation we will remove the confirmation TXT record from our CloudFlare DNS.
NB -- We have provided a 5 minute window to complete this step. If, you are unable to confirm the domain in the allocated time, you can repeat this 'Confirmation' step at a later date.
4. Create Users
-
Microsoft Admin Center: | Users | 'Add a user'
-
Temp User: Microsoft require a 'temporary user' to associate with the trunk domain. This temporary user requires one Office 365 Business license.
-
Trunk domain: Select from the drop down menu (e.g. sbc@ms50000100.teams.sipcity.com).
-
Click Next.
5. Create PSTN
-
Go to Tools Select > Teams.
-
Select PowerShell > 4. Create PSTN PowerShell
5.1 Connect to MS Admin
#: Install-Module Microsoft.Graph
#: Connect-MgGraph -Scopes "User.ReadWrite.All","Domain.ReadWrite.All"
Open a PowerShell window and connect to your Microsoft 365 tenant using the Microsoft Graph API.
5.2 Create PSTN Gateway
#: New-CsOnlinePSTNGateway -FQDN ms50000100.teams.sipcity.com -SIPSignalingPort 5061 -MaxConcurrentSessions 100 -Enabled $true
Use the New-CsOnlinePSTNGateway cmdlet to create a PSTN gateway. You'll need to specify the parameters required for the gateway, including the FQDN (Fully Qualified Domain Name) and other configuration details.
5.3 Verify the PSTN Gateway
#: Get-CsOnlinePSTNGateway
Use the New-CsOnlinePSTNGateway to verify that the PSTN gateway has been created.
6.0 Associate Users
6.1 Connect to MS Admin
#: Install-Module Microsoft.Graph
#: Connect-MgGraph -Scopes "User.ReadWrite.All","Domain.ReadWrite.All"
Open a PowerShell window and connect to your Microsoft 365 tenant using the Microsoft Graph API.
6.2 Routing configuration
#: Set-CsOnlinePstnUsage -Identity Global -Usage @{Add="VOIP"}
#: New-CsOnlineVoiceRoute -Identity "VOIP" -NumberPattern ".*" -OnlinePstnGatewayList "ms50000400.teams.sipcity.com" -Priority 1 -OnlinePstnUsages "VOIP"
#: New-CsOnlineVoiceRoutingPolicy -Identity "VOIP" -OnlinePstnUsages "VOIP"
Paste the commands to set up the PSTN identity and Voice route details.
6.3 Associate users
#: Set-CsPhoneNumberAssignment -Identity "userEmail" -PhoneNumber +phoneNumber -PhoneNumberType DirectRouting
#: Grant-CsTeamsCallingPolicy -PolicyName AllowCalling -Identity "userEmail"
#: Grant-CsOnlineVoiceRoutingPolicy -Identity "userEmail" -PolicyName "VOIP"
#: Set-CsOnlineVoicemailUserSettings -Identity "userEmail" -VoicemailEnabled $false
If you have more than a single user then you will need to now map a phone number to each of your Teams users using the following commands. The example below assumes that our example user Joe@SIPcity.com is going to be assigned the phone number 13106351799, using the Identity of "VOIP".
Replace these as required for your own circumstances.
6.4 Disconnect from MS Teams (Optional)
#: Disconnect-MicrosoftTeams
BYE - Good luck