From Bright Pattern Documentation
Jump to: navigation, search
• 5.19 • 5.8

Configuration for Microsoft Teams Direct Routing

Direct voice routing allows your Bright Pattern Contact Center (BPCC) to connect to your Microsoft Teams environment via a single-tenant PBX trunk. Configuring direct voice routing allows the following:

  • Users of either system (Teams/BPCC) may call each other directly without incurring a PSTN carrier charge.

  • Microsoft Teams users may make outgoing calls to a PSTN via BPCC and receive incoming calls from a PSTN via BPCC.

As your contact center’s Microsoft Teams admin, you will do the following in order to allow direct routing:

  1. Add an alias domain to your Microsoft Office 365 instance
  2. Configure the session border controller (SBC) and routing in Microsoft Teams
  3. Configure a Teams user for calling
  4. Configuring reachability of all Teams users from BPCC via an Attendant


1. Add an Alias Domain to Your Office 365 Instance

This step is required so that Microsoft Teams will trust the domain when you add the session border controller (SBC) in the following step.

  1. In the Microsoft 365 admin center, navigate to Settings > Domains > Add domain (proxy TLS domain) and add the alias domain. When you do this, a text string will be generated that will be used by your service provider to validate your domain. Note that you must provide this string to your service provider.

  2. Next, navigate to Users > Active Users > Add a user. Here you will add a user (e.g. “proxy”) for the previously created domain. After you have registered a domain name, you must activate it by creating at least one E1, E3, or E5 licensed user on that domain. Note that the license can be revoked after the domain activation (i.e., it can take up to 24 hours).

2. Configure the Session Border Controller (SBC) and Routing in Microsoft Teams

  1. In the Microsoft Teams admin center, navigate to Voice > Voice Routing Policies > Edit Global OR create new. This is what you will assign to users; however, note that Global is already assigned. They consist of PSTN usage records that, in turn, are linked to voice routed below. Add PSTN usage “To BPCC” (i.e., it’s just a text label).

  2. Next, navigate to Voice > Direct Routing > SBCs > Add and add the proxy TLS domain that was added as an alias. Set the port to 5064 and disable the send Options.

  3. Next, navigate to Voice > Direct Routing > Voice Routes > Add and add the route that the number should match to be sent to BPCC. Add “1100” (it is a special invalid US area code), and then link it to “To BPCC” usage.

  4. Note that depending on your country, Microsoft will insist on all phone numbers to either start with a leading + sign or start with your country code. You can affect the process of short number translation to long ones in the following section: Voice > Dial plans > <dial plan> > Localization rules.

3. Configure Teams Users for Calling

In order for all Microsoft Teams users to take advantage of Bright Pattern Contact Center (BPCC) direct-routing capabilities, users must have at a minimum an E1/E3 + Office 365 Phone System license or an E5 license; however, the license has to be from the enterprise-family level.

For a user to be reachable from BPCC software, they must have a business/enterprise phone number defined. The number can be set only by the Skype for Business command-line interface, via the Windows Powershell, or via the Azure Cloud Shell.

Note: This applies to users who will get their phone numbers from BPCC. For users who will have a phone number via a Microsoft Calling Plan, see 3a. Configuring Microsoft 365 Calling Plan Users.

Windows Powershell

To configure phone numbers from BPCC through the Windows Powershell, take the following steps:

  1. Install the Skype for Business Powershell module.

  2. After installing, start the powershell with administrator privileges.

  3. Enter the following commands:

    Import-Module "C:\\Program Files\\Common Files\\Skype for Business
    Import-Module SkypeOnlineConnector
    $userCredential = Get-Credential
    $sfbSession = New-CsOnlineSession -Credential $userCredential
    Import-PSSession $sfbSession

  4. Note that the Import-PSSession command will display the login window. From here, enter your Microsoft Teams admin credentials.

  5. Set the phone number for the user with the following command (i.e., using the special invalid US area code 000):

    Set-CsUser -Identity -EnterpriseVoiceEnabled $true -HostedVoiceMail
    $true -OnPremLineURI tel:+10005555555

  6. Assign to the user the voice routing policy that was defined in this procedure.

  7. Once the phone number is added to the user’s account in the Microsoft Teams admin center, it must be manually added to the same user’s contact card in the Microsoft 365 admin center, section User.

Azure Cloud Shell

To configure phone numbers from BPCC through the Azure Cloud Shell, take the following steps:

  1. Log into your Azure portal:

  2. Click on the terminal/console Azure-Terminal-Console-Button.PNG button in the top bar.

  3. Enter the following commands, ensuring you substitute your own domain name:

    import-module MicrosoftTeams
    $sfboSession = New-CsOnlineSession -Credential $credential -OverrideAdminDomain ""
    Import-PSSession $sfboSession

  4. Set the phone number for the user with the following command (i.e., using the special invalid US area code 000):

    Set-CsUser -Identity -EnterpriseVoiceEnabled $true -HostedVoiceMail
    $true -OnPremLineURI tel:+10005555555

3a. (Optional) Configuring Microsoft 365 Calling Plan Users

If a user already has a Microsoft 365 Calling Plan and a Microsoft phone number, adding a voice routing policy is sufficient for making calls to and from BPCC.

Note: These users might require a policy separate from other users, depending on whether you want their calls to the PSTN to go through SBC/BPCC or the Microsoft Calling Plan.

To configure a Microsoft Calling Plan user, do the following:

  1. Create a location (i.e., an emergency location).

  2. Give the user a Microsoft 365 Domestic Calling Plan license.

  3. Order a phone number, and then specify the location created previously.

  4. Note that you will search for locations by their city name (i.e., not by the defined location names).

  5. From the phone number, assign the user to the license, and then set the emergency location.

  6. Edit the user policies and then set the voice routing policy with the BPCC routing entries, if needed.

4. Configuring Reachability of All Teams Users from BPCC

All Teams users can be dialed from BPCC via an attendant. In order to do this, take the following steps:

  1. Create a Resource User in the Microsoft Teams admin portal (i.e., Org Wide Settings > Resource Accounts).

  2. Give the new user the Phone Systems Virtual User add-on license in the Microsoft Office 365 Admin portal.

  3. Give the new user a phone number via Windows Powershell or Azure Cloud Shell using the following command:

    Set-CsOnlineApplicationInstance -Identity -OnpremPhoneNumber

  4. Create an attendant that plays a menu prompt and offers dial by name.

  5. Associate the attendant with the resource user (i.e., via Resource User properties).

  6. The calling attendant number via BPCC will reach the attendant. Any user can be reached by dialing their name followed by the pound symbol.

  7. A string now can be entered into the Office 365 user contact field (e.g., Office Phone: 1111111,,222222 where 111111 is the attendant number and 222222 is the dial by name string. Note that this tool uses 0 for space.).

Diagnostics Checklists

Testing Microsoft Teams to Bright Pattern Contact Center Calls

  • The Teams user has an E1/E3 license + Office 365 Phone System, or an E5 license.

  • The Teams user has a calling policy selected that includes usage that selects the matching prefix that points to the repro proxy domain.

  • The BPCC tenant has a matching extension or a dial-out entry.

Testing Bright Pattern Contact Center to Microsoft Teams Calls

  • The BPCC contact center has a single-tenant PBX trunk.

  • The dialed number matches the prefix on the trunk.

  • The trunk’s number-mangling parameters change from and to numbers to their proper destinations.

  • The repro proxy has BPCC SIP processor addresses enabled in the ACL

  • The repro proxy has firewall ports open toward BPCC.

  • The repro proxy has a matching route that point to Teams.

  • The repro proxy has the proper certificate(s).

  • There is a Teams user with a tel URL set to the dialed number.

< Previous | Next >