UCPrimer
  • Tech Blog
  • About UCPrimer.com

Microsoft Teams Voice Deployment for IT Pros

11/30/2018

3 Comments

 
Picture
In a previous blog post, the ability to use Skype for Business certified IP Phones in a Teams environment was discussed and how users who have migrated from Skype for Business to Teams can continue to use these IP phones to make and receive calls. In this post, we continue the discussion and provide an overview of how Teams users can be enable for enterprise voice. Unlike its predecessor, Teams is a pure cloud service and there are no on-premise Teams servers, and hence majority of the Voice configurations have to be performed in the O365 tenant using powershell. Our tenant has a E5 license which enables the Phone System (formely CloudPBX) feature for this to work, but E1/E3 users can also be enabled via the Add-on license

Beginning with the basics, enterprise voice in Teams is similar to Skype for Business in terms of the various configuration objects that allow users to be assigned a phone number (TelURI), dial plans for numbers to be normalized into E.164 format and the PSTN usages that link voice routes to voice policies that determine what external calls users are allowed to make along with which PSTN gateway are used. There are only 2 ways in which Teams users can reach the PSTN which are Microsoft Calling Plans and Direct Routing. The former is available in countries such as North America and UK while in APAC it is only available in Australia via Telstra. The rest of APAC countries will have to rely on Direct Routing which will be discussed in more detail later. To begin configuring for voice in Teams, we look at the creating tenant dial plans that specify what normalization rules are required for users when making calls. Tenant dial plans were covered in detail in a previous blog post and so we just a summary will be provided here. Using the following powershell cmdlet examples, we create a new tenant dial plan and add normalization rules:

New-CsTenantDialPlan -Identity MyTenantDP
$nr = New-CsVoiceNormalizationRule -Parent Global -name SG7Digit -Description "Internal 4Digit1" -Pattern '^(1\d{3})$' -Translation '+656389$1' -IsInternalExtension $True -InMemory
Set-CsTenantDialPlan -Identity MyenantDP -NormalizationRules @{Add=$nr}

Once we're done we can verify the dial plan and assign to user accounts using the grant-CsTenantDialPlan cmdlet as shown below:
Picture
​Unlike its predecessor, Teams does not support Hybrid Voice and there is no Cloud Connector Edition (CCE) or OPCH equivalent. Instead, organizations can leverage Direct Routing to allow Teams users to make/receive PSTN calls using an on-premise certified SBC with PSTN trunks. Teams will talk directly to the on-premise SBC to route calls to/from the PSTN. At the time of this post, there are only 2 certified SBC vendors for Teams Direct Routing and they are Ribbon (formerly Sonus) and Audiocodes. More information on these 2 SBCs can be found here: Ribbon | Audiocodes
 
Next we look at the Voice Routes, PSTN Usages and Voice Routing Policy, which are all related. Each Teams user is assigned one and only one Voice Routing Policy (VRP). The VRP contains one or more PSTN Usages which specify Voice Routes. Each Voice Route is a calling number matching pattern and its corresponding PSTN Gateway. An example diagram representing the various voice configuration objects and how they route calls to/from the PSTN is shown below:
Picture
To begin configuration of the VRP, we can first create the PSTN Gateway. The PSTN Gateway must have a public DNS record and the FQDN cannot contain the onmicrosoft.com domain. In our lab, we've created a new PSTN Gateway using the following cmdlet:

New-CsOnlinePSTNGateway -Identity teamstrunk.ucprimer.com -Enabled $true -SipSignallingPort 5061 -MaxConcurrentSessions 10
Picture
Next we can create the necessary PSTN usages in the global container using the cmdlet:

Set-CsOnlinePstnUsage -Identity Global -Usage @{Add="International"}
Picture
This is followed by the creation of Voice Routes and in this example we route all local calls +65<8digits> to the SBC and link it to the "SGLocal" PSTN usage that we just created: 

​New-CsOnlineVoiceRoute -Identity "SG-PBX" -NumberPattern "^\+65(\d{8})$" -OnlinePstnGatewayList teamstrunk.ucprimer.com -Priority 0 -OnlinePstnUsages "SGLocal"
Picture
Then finally create the Voice Routing Policy with the correct PSTN Usage:
Picture
The final step would be to assign the VRP to the Teams user. Note that due to replication, this cmdlet may not work immediately after creating the VRP. If a ".. is not a User policy" error is encountered, simply wait for 10-15mins and try to assign the VRP again and it should work:
Picture
At this time, the user should be enabled for Enterprise Voice in Teams and the "Calls" app will show in the Teams client along with the LineURI, and entering 4-digit extensions will result in it being normalized to E.164 numbers as per the dial plan settings:
Picture
In case where the Calls app does not appear, we can look at the diagnostic logs by hitting the CTRL-ALT-SHIFT-1 keys in the Teams client and we can look at the logs in the Files->Downloads area as shown:
Picture
The log file is the 2nd file shown in the diagram and we can open using notepad and search for this section:

2018-12-18T09:21:24.204Z Inf UserAppsStore: Attempting to add calling with the following flags: {"isCallingEnabledByTenant":true,"isSfbCloud":true,"isEvEnabled":true,"disableCallingForHybridVoice":true,"pstnType":"OnPrem","isBusinessVoicePath":false,"isByotEnabled":true,"isOneToOneCallingEnabled":true,"isCallingSupportedEnvironment":true,"enableVoipCallTab":false,"result":"added"}
2018-12-18T09:21:24.204Z Inf UserAppsStore: Calling app added, flags: {"isCallingEnabledByTenant":true,"isSfbCloud":true,"isEvEnabled":true,"disableCallingForHybridVoice":true,"pstnType":"OnPrem","isBusinessVoicePath":false,"isByotEnabled":true,"isOneToOneCallingEnabled":true,"isCallingSupportedEnvironment":true,"enableVoipCallTab":false,"result":"added"}
2018-12-18T09:21:24.204Z Inf UserAppsStore: Calling app added with isFirstParty as true
2018-12-18T09:21:24.204Z Inf UserAppsStore: shouldShowCallingApp resolved to true

This will help to identify the cause which could be due to parameters not set correctly or the VRP has not been assigned.
3 Comments
Christopher Krafcky
6/28/2019 11:12:02 am

Hello,

I've gotten everything set up, and calls go in and out as expected via Direct Routing (through Avaya). I do however have an issue with the way the number is translated for voicemail when delivered to Outlook. It seems as if the '1' isn't being added after the '+' sign. This effectively makes Outlook think that it is an international call. Do you have any thoughts on this?

Reply
Spencer
3/13/2020 04:49:55 pm

Can you assist with the document you used in setting up? aside the documents, kindly share tips on other things done to make it work. i am not receiving 200 ok response yet....

Reply
Voip Service Providers NZ link
6/26/2020 01:56:14 am

This is really appreciated that you have presented this data over here, I love all the information shared. It will be very helpful to understand the Microsoft team’s voice deployment.... It’s a great post to share, thanks for publishing!! Found an another website nexttelecom.co.nz/products/ip-telephony-and-voip it has lots of valuable information for everyone.

Reply

Your comment will be posted after it is approved.


Leave a Reply.

    Picture
    Picture

    Important Links

    Microsoft Teams Docs
    Microsoft Learn

    ​Microsoft MVP Blogs

    Michael Tressler’s Blog
    Michael’s MTR Quick Tip Videos
    Jimmy Vaughan’s Blog
    Jeff Schertz
    Adam Jacobs
    James Cussen
    ​Damien Margaritis

    Archives

    September 2022
    August 2022
    March 2022
    February 2022
    January 2022
    December 2021
    November 2021
    October 2021
    September 2021
    August 2021
    June 2021
    April 2021
    March 2021
    December 2020
    October 2020
    September 2020
    August 2020
    April 2020
    March 2020
    February 2020
    January 2020
    December 2019
    November 2019
    October 2019
    September 2019
    August 2019
    July 2019
    March 2019
    November 2018
    October 2018
    September 2018
    August 2018
    June 2018
    March 2018
    February 2018
    January 2018
    December 2017
    November 2017
    August 2017
    July 2017
    April 2017
    March 2017
    February 2017
    January 2017
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016
    May 2016
    April 2016
    March 2016
    January 2016
    November 2015
    October 2015
    September 2015
    August 2015
    July 2015
    June 2015
    May 2015
    April 2015
    March 2015
    February 2015
    January 2015
    December 2014
    November 2014
    October 2014
    September 2014
    August 2014
    July 2014
    June 2014
    May 2014
    April 2014
    March 2014
    February 2014
    January 2014
    December 2013
    November 2013
    October 2013
    September 2013
    August 2013
    July 2013
    June 2013
    May 2013
    April 2013
    March 2013
    February 2013
    January 2013
    December 2012
    November 2012
    September 2012
    August 2012

    Categories

    All
    Edge
    Exchange 2013
    Hybrid
    Lpe
    Lync 2010
    Lync 2013
    Mobility
    Oauth
    Office365
    Polycom
    Ucs

    RSS Feed

    This website uses marketing and tracking technologies. Opting out of this will opt you out of all cookies, except for those needed to run the website. Note that some products may not work as well without tracking cookies.

    Opt Out of Cookies