LogoLogo
Partner Portal Login
  • Welcome
  • Getting Started
    • Becoming A Partner
    • Getting Support
      • Community Services
        • SMTP Servers
        • DNS Servers
      • Service Status and Incidents
        • Status Page
        • nbn Incident Notifications
    • Accounts & Billing
      • Billing Overview
      • How to pay
  • Services
    • Connectivity
      • nbn TC4
        • Getting Started
        • Troubleshooting
          • nbn Self-Diagnostic Tool
        • Technical References
          • nbn TC4 Sevice Classes
          • nbn TC4 AVC-ID
      • nbn Enterprise Ethernet
        • Getting Started
      • Internet Services
        • IP Geolocation
        • Troubleshooting
          • Advanced Troubleshooting
            • nbn Enterprise Ethernet
            • Telstra Ethernet Access and AAPT Fibre
            • nbn TC4 Connectivity
              • FTTP (Fibre to the Premise)
              • FTTN/B (Fibre to the Node/Basement) or VDSL2
              • FTTC (Fibre to the Curb)
              • HFC (Hybrid Fibre Coaxial)
              • Wireless
          • Logging a fault for your WAN Service
          • WAN Diagnostic Tool
          • WAN Monitoring
        • Technical Reference
          • What is CGNAT and How does it work?
          • Ethernet Service Shaping Requirements
          • Router configuration for Telstra 4G/5G services
      • SD-WAN
        • Getting Started
          • How to login to Antares V2 Portal
          • Getting Familiar with Antares Portal
      • Requesting co-managed router access
    • Voice over IP (VoIP)
      • Best Practices to Protect You from Toll Fraud
      • Best Practice Guidelines
      • Inbound Numbering System
        • How to access the Inbound Numbering System?
        • Creating a new user
        • Diverting a 1300/1800 number
        • Moving a DID between services
        • Creating a basic IVR
      • Grandstream Device Management System (GDMS)
        • How to login to the GDMS platform
        • How to run diagnostic tests within the GDMS
        • How to add a site and move a VoIP Device into it
        • How do I add/remove users from the GDMS Portal?
      • 3CX Guides
        • How to configure our CTS Trunk on 3CX
        • Resolving Call Quality issues on 3CX deployments
        • How to configure a SIP Trunk on 3CX
        • Changes to default 3CX Headers
      • Microsoft Teams Direct Routing
        • Getting Support for Microsoft Direct Routing
        • Configuration Guide
        • Troubleshooting Call Routing
        • Unable to Dial Internationally from Teams
        • Creating a resource account and assigning a Direct Routing DID
        • "Call cannot be connected" error with Auto-Attendants and Queues
        • Creating Dial Plans to Prefix Outbound Calls
      • Brand Specific Guides
        • NetComm Router/ATA
          • How to register VOIPnow extension to NetComm device (NL1901ACV)
        • Cisco
          • SPA112 - Fax Settings
        • Grandstream
          • How to enable TLS encryption on Grandstream phone
          • Upgrading the firmware on Grandsteam phones
          • Setting up voicemail on the DP720 (Cordless Handset)
          • How to setup a VoIP Account on a Grandstream phone
          • Grandstream GXP2140 Voicemail
          • Setting up Monitored Call Parking
      • General
        • Getting Started with your VoIP Reseller Account
        • How much bandwidth do I need for VoIP?
      • VoIP Troubleshooting
        • VoIP Troubleshooting Guide
        • VoIP Fault Guide
        • SIP ALG and turning it off
        • Emails from VoIPNow going to SPAM
      • Number Porting
        • Can I port my existing phone numbers over?
        • How do I port numbers over to Hosted Network?
        • Reasons for Number Port Rejection
      • VoIPNow Guides
        • How to activate call recording in VOIPnow
        • Configuring Charging Plans to add margin to outbound calls
        • Configuring Charging Plans to add margin to 13/1300/1800 Inbound calls
        • What is a valid Caller ID?
        • How can I make Anonymous Calls?
        • Getting a breakdown on the resources for an Organization
        • Configuring Fax to Email
        • VoIP Bundle Creation & Implementation
        • Uploading Sound files to VoIPNow
        • How does Call Parking work on VoIPNow?
        • Transferring Calls Waiting in Queues
        • How to setup a Queue (Hunt Group)
        • How to find a list of all the numbers assigned to your Service Provider account
        • How to do a context jump based on the incoming Called DID
        • How to change Music on Hold for an extension
        • Creating and updating a time interval
        • How to apply a time interval to an Incoming Call Rule
        • How to add an Incoming Caller ID Prefix with an IVR
        • Applying sound files to an IVR
        • How to configure an IVR to transfer to an external number
        • How to enable International Call barring on Organizations and Users
        • List of the common issues submitted by the partners
        • How to Configure BLF on Virtual Multi-Purpose Key
        • How to configure Intercom/Paging
        • How to configure TLS and SRTP on VOIPnow and Grandstream Phones
        • How to give end customer an access to VOIPnow to view/manage the CDR and Call recordings
      • SIP Trunk Requirements: Ports, Protocols, and Codecs
    • Cloud
      • Infrastructure as a Service
        • Getting Started
          • How to login to vCloud Director
          • vCloud Resource Allocation
        • Virtual Machines & vApps
          • Creating a new Virtual Machine
          • What is a vApp and how to create one?
          • Mounting an ISO to a VM
          • Accessing the VM console
          • Using VM snapshots
          • Converting a VM to a Template
        • Backup and Restorations
          • Accessing Veeam Self Service Backup Portal
          • Creating a Backup Job
          • Enabling Application-Aware Processing in Veeam Self-Service Portal
          • Setting up Guest Processing
          • How to start a File Level Restore
          • How to carry out a full VM restore
          • Archived: Restoring a VM or guest files
        • Networking
          • Routed, Isolated and Direct networks in vCloud
          • How to create/delete a vApp network
          • How to create/delete a new Organization level network
        • Administrative Tasks
          • Creating Users
          • What is a 'Catalog' and how to create one
          • Uploading ISO files or OVA/OVF templates
          • Setting up Azure AD SAML based authentication for vCloud
          • Microsoft Software Licensing
          • Activating Windows Servers
          • Checking and Decreasing IaaS resources
      • Backup as a Service
        • Tenant Management via VSPC
          • VSPC Overview
          • Creating Companies
          • Adjusting tenant storage allocation
        • Configuration with Veeam B&R
          • Getting Started
          • Configuring Backup Jobs
          • Configuring Backup Copy Jobs
            • Seeding Backup Copies
        • Configuration of Veeam Agents via VSPC
          • Getting Started
          • Installing Agents
          • Using backup policies
      • Disaster Recovery as a Service
        • Getting Started
        • Configuring Replication Jobs
        • Seeding Replicas
        • Failover
          • Partial Failover
          • Full Site Failover
          • Accessing replica VMs
  • Partner Portal
    • General
      • Manage Contacts
      • How to cancel services in the Partner Portal
    • Rebilling System
      • End Customers Management
        • Services
        • Recurring and Once-Off Charges
      • Charging Plans
      • Rebilling Configuration
        • Integrations
        • Integration Errors
        • Email Settings
        • Product Settings
        • Bank Account
        • Invoice Details
    • Service Qualifications
      • How perform a WAN Service Qualification
      • WAN Service Qualifications Drafts
      • WAN Service Qualification History
      • FTTP Upgrade
    • Security
      • Multi-Factor Authentication
      • Microsoft Single Sign-On (SSO)
      • Account Permissions
Powered by GitBook
On this page
  • Prerequisites
  • Licensing
  • Configuration Steps
  • Phase 1 - Domain Configuration
  • Phase 2 - Enable Direct Trunking and User Access
  1. Services
  2. Voice over IP (VoIP)
  3. Microsoft Teams Direct Routing

Configuration Guide

This page contains all the information needed to configure Teams Direct Routing with the Hosted Network SIP Trunks.

PreviousGetting Support for Microsoft Direct RoutingNextTroubleshooting Call Routing

Last updated 2 years ago

This guide will walk you through the configuration of Teams Direct Routing within your Microsoft Office 365 Tenant. You can follow this guide for both new and existing Office 365 Tenants. This guide does assume you have some experience with the Microsoft Teams infrastructure and general experience with Windows Powershell.

Prerequisites

As mentioned the guide assumes you have a basic knowledge of Microsoft Teams and Windows Powershell. You will need Admin access to the Microsoft Tenant in order to complete the Domain Setup and configuration of Teams Direct Routing.

In summary, to complete this guide you will need the below:

  • Administrator access to Microsoft Tenant

  • General knowledge of Microsoft Teams and Windows Powershell

  • Ability to install Skype for Business Powershell plugin:

Microsoft have discontinued the use of the Skype for Business Powershell plugin, you will need to install the new Teams module following the steps in Phase 2

Licensing

In order for you to activate the backend requirements of Microsoft Teams and allow subsequent users to utilize the public calling functions of Teams direct routing you will need to ensure the licenses you're assigning contain the below features:

  • Microsoft Teams

  • Microsoft Teams Phone System

Any of the E5 licensing includes the above two options, however anything below E5 does not and requires the "Microsoft Phone System" add-on to be assigned to the user as well.

You can use Microsoft Business Apps, Basic, Standard and Premium licenses for this as well but you will need the "Microsoft Phone System" add-on in addition to the Microsoft Business License.

Users who won't be making or receiving calls via the Teams Direct Routing product aren't required to have the Phone System license.

Configuration Steps

Follow the steps below to configure Teams Direct routing within your Office 365 Tenant.

You will need to have submitted an order with our service delivery team prior to following these steps as they will provision you a unique domain for your Microsoft Tenant.

If you encounter any issues please contact us at support@hostednetwork.com.au or call us on 1300-781-148

Phase 1 - Domain Configuration

As part of how the Teams Direct Routing works within the Microsoft infrastructure you will need a unique domain which will act as a unique identifier within the Hosted Network and Microsoft Teams networks, and allow all the traffic to route to where it needs to. This should be provided to you as part of your order submitted with our service delivery team.

Step 1. Adding the unique domain

As mentioned you will need to add the unique domain provided by our Service Delivery team to the end-customers Microsoft Tenant.

  1. Navigate to "Settings" and then "Domains" to bring up your list of domains

  2. Click "+ Add Domain" to add your unique domain

  3. Enter your domain in the "Domain Name" field, this will be the one provided in your order (e.g. contoso.teams.mhn.cloud)

  4. On the next screen you will be given the DNS entries to verify your domain. Reply to your order with our Service Delivery team with the TXT DNS Entry it asks for and wait until they come back to you confirming it has been added.

  5. Once the TXT entry has been added click "Verify" to continue

  6. When prompted for what services to add, simply untick everything and then click "Continue" (You do not need to enter any services for the Direct Routing to work)

  7. You should now see a "Domain Setup is Complete" message

Step 2. Create a user

Once the domain is added you will need to create one user that has the new domain as the username, this is so that the domain activates in Microsoft's servers. (e.g. the domain we added was contoso.teams.mhn.cloud, so the users email/login will be jane.doe@contoso.teams.mhn.cloud)

When you have added the user you will need to let things sync in the backend, this can take anywhere from 30 minutes up to 2-3 hours. If there is high load on Microsoft's servers you will see a warning in the Admin interface.

The user needs to have a E5 licence or a Phone System licence assigned, you can make use of the trial licences Microsoft provides if you don't have any spare. If the user isn't fully licenced the new domain will not be activated and you won't be able to configure the teams direct routing.

You will need to keep this user for at least 24 hours, or until you finish the deployment of Microsoft Teams. Deleting it before you're finished or before 24 hours has passed can result in difficulties with the configuration

Phase 2 - Enable Direct Trunking and User Access

Once you have your unique domain added to the Tenant and you've let things sync in the backend you can now continue onto configuring the Teams Direct Routing for your tenant.

Microsoft have discontinued the use of the Skype for Business Powershell Module, you can install the new module using the below command in an elevated Powershell window.

Install-Module MicrosoftTeams -AllowClobber

Step 1. Connecting to the Tenant

You will need to use an Admin account that is not using the new domain as part of their username, if you do you will encounter "Gateway not found" errors.

If you encounter the errors even with the normal Admin account please ensure they have the Skype For Business DNS Records added for their domain.

You will need to connect to the Microsoft Tenant using Powershell to configure the Teams Direct Routing, use the below command to connect. (You will need to use the credentials of a user that has Administrator access)

Import-Module MicrosoftTeams
Connect-MicrosoftTeams

To confirm you have connected run the below command, you should see all of your users appear if you have connected correctly:

Get-CsOnlineUser | select DisplayName,SipAddress,LineURI

Step 2. Enabling Teams Direct Routing

Once you have successfully connected, you will need to run some commands to create your PSTN Usage and some Voice routes for Standard, National, Emergency and International Calls.

You will need to adjust the below commands and replace <domain> with your unique domain that you added to the tenant in Phase 1. Once you adjust the commands run them in your Powershell Window.

Set-CsOnlinePstnUsage -Identity Global -Usage @{Add="Australia"}
New-CsOnlineVoiceRoute -Identity "AU-Emergency" -NumberPattern "^+000$" -OnlinePstnGatewayList <domain>.teams.mhn.cloud -Priority 1 -OnlinePstnUsages "Australia"
New-CsOnlineVoiceRoute -Identity "AU-Service" -NumberPattern "^\+61(1\d{2,8})$" -OnlinePstnGatewayList <domain>.teams.mhn.cloud -Priority 1 -OnlinePstnUsages "Australia"
New-CsOnlineVoiceRoute -Identity "AU-National" -NumberPattern "^\+61\d{9}$" -OnlinePstnGatewayList <domain>.teams.mhn.cloud -Priority 1 -OnlinePstnUsages "Australia"
New-CsOnlineVoiceRoute -Identity "AU-International" -NumberPattern "^\+(?!(61190))([1-9]\d{9,})$" -OnlinePstnGatewayList <domain>.teams.mhn.cloud -Priority 1 -OnlinePstnUsages “Australia”
Remove-CsOnlineVoiceRoute -identity LocalRoute
New-CsOnlineVoiceRoute -Identity "International-CatchAll" -NumberPattern "^(\+[0-9](.*))$" -OnlinePstnGatewayList <domain>.teams.mhn.cloud -Priority 4 -OnlinePstnUsages “Australia”
New-CsOnlineVoiceRoutingPolicy "Australia" -OnlinePstnUsages “Australia”

Step 3. Enable User Access

Once you have added the Voice routing and configured the Policy you can now start giving users access to the direct routing, and allocating them Public DIDs. In some cases you will encounter errors at this step, you will need to be patient and let things sync as it can take some time for Microsoft's server to pickup the changes.

To give users access to the Teams Direct Routing you can run the below commands. You will need to adjust the commands with the correct information as per below.

  • Change the <pri_email> section to the primary email address of the user

  • Change the <fnn> section to the Direct In Dial for the user in the command. This needs to be in the +61 format, e.g. for 0289998000 the format would be +61289998000

Set-CsPhoneNumberAssignment -Identity <pri_email> -EnterpriseVoiceEnabled $true

Set-CsPhoneNumberAssignment -Identity <pri_email> -PhoneNumber +61<fnn> -Ph
oneNumberType DirectRouting

Grant-CsOnlineVoiceRoutingPolicy -Identity "<pri_email>" -PolicyName Australia

If the "Set-CsUser" command fails to run correctly check that the user you're connected as has the "Teams Administrator" role as you may not have the required permissions to run the command

Repeat the above command for each user you want to have access to the Teams Direct Routing. Once you've added them all you may need to allow 30 minutes to an hour for the Microsoft Teams app to pickup that they have been allowed to have access to the direct routing.

Step 4. Enable AutoAttendant Resource Accounts to Call Outbound (Optional)

This step is only needed if you intend to allow the IVR/AutoAttendant to dial outbound to an external number as it is not able to do so by default.

To enable the AutoAttendant to dial an external number you need to assign it to the PSTN usage within the Powershell connection to Teams. You can do this by running the below command, once run you will need to wait 15~30 minutes for the changes to take affect.

## Replace "<res_account_email>" with the primary email address of the resource
## account attached to the AutoAttendant

Grant-CsOnlineVoiceRoutingPolicy -Identity <res_account_email> -PolicyName Australia

NOTE: If you do not log a ticket prior to calling it can cause the issue to take longer in being resolved.

As a pre-requisite you will need to install the Skype for Business Powershell module, without this you cannot run the commands needed to configure Teams Direct Routing:

If you encounter any issues with this article please log a ticket with Hosted Network support at prior to giving us a call on 1300-781-148 as we will require a ticket number in order to undertake any support.

https://www.microsoft.com/en-au/download/details.aspx?id=39366
https://www.microsoft.com/en-au/download/details.aspx?id=39366
support@hostednetwork.com.au