Manage Microsoft Teams Direct Routing customers and numbers with Azure Communications Gateway
Providing Microsoft Teams Direct Routing service with Azure Communications Gateway requires configuration on Azure Communications Gateway and in customer tenants. This article provides guidance on how to set up Direct Routing for a customer, including:
- Setting up a new customer.
- Managing numbers for a customer, including optionally configuring a custom header.
Tip
You typically need to ask your customers to change their tenants configuration, because your organization won't have permission.
For more information about how Azure Communications Gateway and Microsoft Teams use tenant configuration to route calls, see Support for multiple customers with the Microsoft Teams multitenant model.
Prerequisites
Connect Azure Communications Gateway to Microsoft Teams Direct Routing.
During this procedure, you provision Azure Communications Gateway with the details of the enterprise customer tenant and numbers for the enterprise.
- To use Azure Communications Gateway's Number Management Portal (preview) for provisioning (recommended), you must have Reader access to the Azure Communications Gateway resource and ProvisioningAPI.ReadUser and ProvisioningAPI.WriteUser roles for the AzureCommunicationsGateway enterprise application.
- To use Azure Communications Gateway's Provisioning API (preview), you must be able to make requests using a client integrated with the API. You must also have access to the API Reference.
The enterprise must be able to allocate at least two user or resource accounts licensed for Microsoft Teams, because they need to use these accounts to activate domain names. For more information on suitable licenses, see the Microsoft Teams documentation.
Set up Direct Routing for a customer
When you set up Direct Routing for a customer, you need to configure Azure Communications Gateway with an account for the customer, and ask the customer to configure their tenant to connect to Azure Communications Gateway.
This procedure provides detailed guidance equivalent to the following steps in the Microsoft Teams documentation for configuring an SBC for multiple tenants.
- Registering a subdomain name in the customer tenant.
- Configuring derived trunks in the customer tenant (including failover).
Choose a DNS subdomain label to use to identify the customer
Azure Communications Gateway has per-region domain names for connecting to Microsoft Teams Direct Routing. You need to choose subdomains of these domain names for your customer. Microsoft Phone System and Azure Communications Gateway use these subdomains to match calls to tenants.
- Work out the per-region domain names for connecting to Microsoft Teams Direct Routing. These domain names use the form
1r<region-number>.<base-domain-name>
. The base domain name is the Domain on your Azure Communications Gateway resource in the Azure portal. - Choose a suitable customer-specific DNS label to form the subdomains.
- The label must be up to nine characters in length and can only contain letters, numbers, underscores, and dashes.
- You must not use wildcard subdomains or subdomains with multiple labels.
- For example, you could allocate the label
contoso
.
Important
The full customer subdomains (including the per-region domain names) must be a maximum of 48 characters. Microsoft Entra ID does not support domain names of more than 48 characters. For example, the customer subdomain
contoso1.1r1.a1b2c3d4e5f6g7h8.commsgw.azure.com
is 48 characters. - Use this label to create a customer subdomain of each per-region domain name for your Azure Communications Gateway.
- Make a note of the label you choose and the corresponding customer subdomains.
For example:
- Your base domain name might be
<deployment-id>.commsgw.azure.com
, where<deployment-id>
is autogenerated and unique to the deployment. - Your per-region domain names are therefore:
1r1.<deployment-id>.commsgw.azure.com
1r2.<deployment-id>.commsgw.azure.com
- If you allocate the label
contoso
, this label combined with the per-region domain names creates the following customer subdomains for your customer:contoso.1r1.<deployment-id>.commsgw.azure.com
contoso.1r2.<deployment-id>.commsgw.azure.com
Important
The per-region domain names for connecting to Microsoft Teams Direct Routing are different to the per-region domain names for connecting to your network.
Tip
Lab deployments have one per-region domain name. A customer for a lab deployment therefore also only has one customer subdomain.
Ask the customer to register the subdomains in their tenant and get DNS TXT values
The customer tenant must be configured with the customer subdomains that you allocated in Choose a DNS subdomain label to use to identify the customer. Microsoft 365 then requires you (as the carrier) to create DNS records that use a verification code from the enterprise.
Provide your customer with the customer subdomains and ask them to carry out the following steps.
- Sign into the Microsoft 365 admin center as a Global Administrator.
- Using Add a subdomain to the customer tenant and verify it:
- Register the first customer subdomain (for example
contoso.1r1.<deployment-id>.commsgw.azure.com
). - Start the verification process using TXT records.
- Note the TXT value that Microsoft 365 provides.
- Register the first customer subdomain (for example
- Repeat the previous step for the second customer subdomain.
Important
Your customer must not complete the verification process yet. You must carry out Configure the customer on Azure Communications Gateway and generate DNS records first.
Configure the customer on Azure Communications Gateway and generate DNS records
Azure Communications Gateway includes a DNS server that you must use to generate the DNS records required to verify the customer subdomains. Provision the details of the customer tenant and the DNS TXT values on Azure Communications Gateway.
- From the overview page for your Communications Gateway resource, find the Number Management section in the sidebar.
- Select Accounts.
- Select Create account.
- Enter an Account name and select the Enable Teams Direct Routing checkbox.
- Set Teams tenant ID to the ID of the customer tenant.
- Optionally, select Enable call screening. This screening ensures that customers can only place Direct Routing calls from numbers that you assign to them.
- Set Subdomain to the label for the subdomain that you chose in Choose a DNS subdomain label to use to identify the customer (for example,
contoso
). - Set the Subdomain token region fields to the TXT values that the customer provided when they registered the subdomains.
- Select Create.
- Confirm that the DNS records have been generated.
- On the Accounts pane, select the account name in the list.
- Confirm that Subdomain Provisioned State is Provisioned.
Ask the customer to finish verifying the domains in the customer tenant
After you use Azure Communications Gateway to generate the DNS records for the customer subdomains, ask your customer to verify the subdomains in their Microsoft 365 admin center.
The customer must:
- Sign into the Microsoft 365 admin center for the customer tenant as a Global Administrator.
- Select Settings > Domains.
- Finish verifying the customer subdomains by following Add a subdomain to the customer tenant and verify it.
Ask the customer to activate the domains in the customer tenant
To activate the customer subdomains in Microsoft 365, set up at least one user or resource account licensed for Microsoft Teams for each domain name. For information on the licenses you can use and instructions, see Activate the subdomain name.
Important
Ensure the accounts use the customer subdomains (for example, contoso.1r1.<deployment-id>.commsgw.azure.com
), instead of any existing domain names in the tenant.
Ask the customer to configure call routing that uses Azure Communications Gateway
Ask the customer to configure a call routing policy (also called a voice routing policy) with a voice route that routes calls to Azure Communications Gateway.
The customer must:
- Set the PSTN gateway to the customer subdomains for Azure Communications Gateway (for example,
contoso.1r1.<deployment-id>.commsgw.azure.com
andcontoso.1r2.<deployment-id>.commsgw.azure.com
). This step sets up derived trunks for the customer tenant, as described in the Microsoft Teams documentation for creating trunks and provisioning users for multiple tenants. - Not configure any users to use the call routing policy yet.
Important
You must use PowerShell to set the PSTN gateways for the voice route, because the Microsoft Teams Admin Center doesn't support adding derived trunks. You can use the Microsoft Teams Admin Center for all other voice route configuration.
To set the PSTN gateways for a voice route, use the following PowerShell command.
Set-CsOnlineVoiceRoute -id "<voice-route-id>" -OnlinePstnGatewayList <customer-subdomain-1>, <customer-subdomain-2>
Manage numbers for a customer
When you allocate numbers to a customer, you need to provision those numbers on Azure Communications gateway, and ask the customer to configure their tenant with those numbers.
Configure the numbers on Azure Communications Gateway
When you set up Direct Routing for the customer, you configured Azure Communications Gateway with an account for the customer. You must configure the numbers that you allocate to the customer under this account.
- From the overview page for your Communications Gateway resource, find the Number Management section in the sidebar. Select Accounts.
- Select the checkbox next to the enterprise's Account name and select View numbers.
- Select Create numbers.
- Select Enable Teams Direct Routing.
- Optionally, enter a value for Custom SIP header.
- Add the numbers in Telephone Numbers.
- Select Create.
To change or remove existing numbers:
- From the overview page for your Communications Gateway resource, find the Number Management section in the sidebar. Select Accounts.
- Select the checkbox next to the customer's Account name and select View numbers.
- Select the checkbox next to the number you want to change or remove and select Manage number or Delete numbers.
Ask the customer to configure users in their tenant
Your customer can now set up users for Microsoft Teams Direct Routing. To add new numbers, they must:
- Enable users for Microsoft Teams Direct Routing, by following Enable users for Direct Routing.
- Configure these users with the voice route for Azure Communications Gateway that they configured earlier. For instructions, see the steps for assigning voice routing policies in Configure call routing for Direct Routing.
Next step
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for