Microsoft Teams Integration Guide

Microsoft Teams Integration Guide

Introduction 

The goal of this guide is to walk you through the configuration of Teams direct routing to integrate Teams with Omnivigil’s telephony service. Once the configuration is completed, you should be able to dial to the PSTN from teams and receive calls from the regular telephone network in teams.  

This guide will cover configuring your account or your client’s account if you are a Microsoft reseller. This guide is intended for technical users. As such, you must be comfortable with concepts such as DNS and PowerShell.  

Licenses Requirement 

The voice and phone system for teams requires either 

  • Microsoft 365 E5 plan  
  • Microsoft 365 Business Basic or Microsoft 365 Business Standard or Microsoft 365 Business Premium + the add on Business Voice Without Calling Plan license 
    • Please note that the Business Voice Without Calling Plan license is only available through Microsoft partners, it may not be bought independently. 

Office configuration – Domain configuration 

The first step will be to add your Omnivigil subdomain to Microsoft office domains. The first step is to use the “Activate Microsoft Teams” function in Omnivigil portal.  

  • Log-in 
  • Navigate to your client’s page 

       

  • Once on the client’s page, use the menu button and click “Activate Microsoft Teams 

  • The page should give you the domain to be added in Office. 
  • With the domain in hand, navigate to the Microsoft 365 admin center
  •  
  • In the left menu, navigate to Settings -> Domains and select Add domain 
  • You should be greeted with the Add domain wizard

  • Enter the domain found in the Omnivigil Teams onboarding wizard (eg: customername.teams.omnivigil.net) 
  • On the next step, verify the domain by using the “Add a TXT record to the domain’s DNS” 
  • Copy the TXT value given by Microsoft and go back to Omnivigil’s page 

  • Enter the given TXT value in the Omnivigil wizard 
  • Go back to the Microsoft domain wizard and click “Verify” 
  • Note that this might take up to 2 hours for the DNS to propagate. In most cases however it is quite quick. 
  • Complete the Add domain wizard 

Office configuration – Users and licenses 

  • Navigate to Microsoft 365 admin center 
  • In the left menu go to Users -> Active users 
  • Ensure that your users have the correct licenses 

 

 

  • Create a temporary user under the new domain to complete the domain activation 
    • In the left menu go to Users -> Active users 
    • Click New and enter any name 
    • Domain should be the newly created domain 

 

Teams configuration – Admin panel 

  • In the left menu, go to Voice -> Voice routing policies 
    • Click on Global (Org-wide default) 
    • Click Add / Remove PSTN usage records 
    • Add a new PSTN usage record 
      • Name does not matter but note it for future use in a PowerShell command 
    • Apply and save changes 

  • In the left menu, go to Voice -> Dial plans 
    • Click on Global (Org-wide default) 
    • Add a new Normalization rule 
      • Name: Outbound (name does not really matter)
      • Advanced
        • If Condition: ^(.*)$ 
        • Then do this: $1 

Adding Teams extensions 

Now that direct routing is established and that the users are configured in Teams, simply create new Teams extension in Omnivigil’s portal.

  • Navigate to the portal 
  • In the left menu go to Telephony -> Extensions -> Extensions 
    • Click New 
    • Select Teams extension type 

  • Enter the desired extension number 
  • Save 

Teams configuration – PowerShell 

Usage of PowerShell is currently mandatory to configure users and to correctly add the direct routing. 

Ensure the following PowerShell modules are installed

Ensure that you have Global Admin access right, else some commands might appear undefined, you won’t get an access denied error. If you are a Microsoft reseller you will usually have Global Admin rights on your tenants. 

If the New-CsOnlineVoiceRoute command complains about missing gateway

  • Ensure that a user in Office is assigned to that domain 
  • The domain activation can take up to 24 hours although it usually completes within 1 hour. 

Obtain the tenant ID of the account you are trying to configure, either through Microsoft administration panel or by using whatismytenantid.com 

In PowerShell, run the following commands: 

1. This allows execution of necessary configuration scripts from Microsoft. It only needs to be executed the first time.

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

2. Connect to your Microsoft account

Connect-AzureAD -AccountId "admin@domain.com"

*** Note: To login to your account but manage a customers account, use the tenantID of your customer

Connect-AzureAD -AccountId "admin@domain.com" -TenantId "GUID"

3. Import the Skype Online Connector Module.

Import-Module SkypeOnlineConnector  

4. Create a new online session with your user.

$sfboSession = New-CsOnlineSession -UserName "admin@domain.com"  

*** Note: If you are managing another customer, you can override their account

$sfboSession = New-CsOnlineSession -UserName "admin@domain.com" -OverrideAdminDomain "clientmaindomain.com" 

5. Import your Online Session and Microsoft Teams module.

Import-PSSession $sfboSession
Import-Module MicrosoftTeams

6. Connect to your Microsoft Teams account.

Connect-MicrosoftTeams -AccountId "admin@domain.com"  

*** Note: To login to your account but manage a customers account, use the tenantID of your customer

Connect-MicrosoftTeams -AccountId "admin@domain.com" -TenantId "GUID"

7. Create the new Gateway route

*** main should be replaced by the PSTN name you set earlier in the admin panel.
*** customerdomain.teams.omnivigil.net should be replaced by the domain configured earlier.

New-CsOnlineVoiceRoute -Identity Route1 -OnlinePstnUsages @{add="main"} -NumberPattern "^(.*)$" -OnlinePstnGatewayList @{add="customerdomain.teams.omnivigil.net"}  

8. Enable Enterprise Voice and create an extension for a user:

*** User must be the same user configured in the Omnivigil Portal.
*** Extension is the same extension number the user uses in the Omnivigil Portal.
*** This must be run per user in order to activate and assign an extension to that user.

Set-CsUser -Identity "user@domain.com" -EnterpriseVoiceEnabled $true -OnPremLineURI "tel:+extension" 


Final words 

Calling a configured extension should now route the calls to the user’s Team client, whether it’s a cellphone or desktop client. 

Each user that was configured using the SetCs-User command should now have access to the dial pad to dial the regular telephone network. They will however need to log out of all their device and then log back in. 

 

 

 

 

 

 

 

 

 

PLACE AN ORDER

To place an order for Microsoft Teams licenses, simply contact us.

Want to learn more? Ask us for a demonstration!

I would like a demo