Menu Close

Microsoft TEAMS

Requirements

  • A peoplefone Account (Registration)
  • A Microsoft 365 account with:
    • Microsoft 365 Business Essential, Premium or M365 Business with the add-on license Microsoft 365 Business Voice; or
    • Microsoft 365 Enterprise E1 / E3 with the Add-Ons Phone System and Audio Conferencing; or
    • Microsoft 365 Enterprise E5

How-to configure direct routing

Set up of the domain, step 1

  • During the onboarding process, peoplefone will assign you a specific domain that must be configured in your O365 account.
    To configure them, go to your O365 portal, select on the left menu Setup → Domain and select Add domain
  • Enter the domain that you received from peoplefone (in this example 31857.uctrunk.com)
  • Select “Add a TXT record instead”
  • Copy-paste this screen and send it back to peoplefone so they can setup the validation 

Set up of the domain, step 2

  • When you receive the confirmation that the TXT verification is ready from peoplefone, you must go back to this domain set up and start the verification process.
    After that you must select “I’ll add the DNS records myself”
  • Disable all services and click Next
  • The domain should now be ready

Activation of the domain

  • Once the domain setup’s are completed, the next step is to activate them.
    For this, we will need to add a “dummy” user (with a E3 or E5 license) to this specific domain, not the default one.
    When the setup is completed you can delete this “dummy” user.

Direct Routing Configuration

Please note, that enabling the rules you configure on Microsoft’s pages via PowerShell can take up to 48 hours.

This How-To covers the setup for a simple solution where only Teams is enabled as communication solution in your O365 account.
If you have or plan to have a hybrid solution with Teams and Skype for Business online or Skype, then you will need to select more parameters.
More information on:
https://docs.microsoft.com/en-us/microsoftteams/direct-routing-plan
https://docs.microsoft.com/en-us/microsoftteams/direct-routing-configure

Before starting this setup, verify that you have received the following information from peoplefone:
sbc_port
sbc_domain
sbc_nb_channels (voice channels)

In the following setup, we will use as example: (it is possible that the sbc_port is the same)
sbc_port: 6000
sbc_domain: 31857.uctrunk.com

For this setup you will need PowerShell with the Skype Online Connector.
The following link will provide you all information on how to install them: https://docs.microsoft.com/fr-fr/SkypeForBusiness/set-up-your-computer-for-windows-powershell/set-up-your-computer-for-windows-powershell 

  • When the PowerShell is ready, you need to load the Skype for Business Online module with:
Import-Module LyncOnlineConnector
  • Create the session:
$sfboSession = New-CsOnlineSession -UserName <user@domain>
  • Example:
$sfboSession = New-CsOnlineSession -UserName laurent@ucc-lync.ch
  • Load the session:
Import-PSSession  $sfboSession

Verify whether the user is registered in Skype for Business Online: 

Get-CsOnlineUser -Identity “<User name>” | fl RegistrarPool

You must then receive a non-empty location.

Assign ddi to each user with the command:

Set-CsUser -identity <user@domain> -EnterpriseVoiceEnabled $true -HostedVoicemail $true -OnPremlineURI tel:+<ddi>
  • Example:
Set-CsUser -identity laurent@ucc-lync.ch -EnterpriseVoiceEnabled $true -HostedVoicemail $true -OnPremlineURI tel:+41582550840
  • Configure the SBC: 
New-CsOnlinePSTNGateway -Fqdn <sbc_domain> -SipSignalingPort <sbc_port> -ForwardCallHistory $true -Enabled $true -ForwardPai $true -MaxConcurrentSessions <sbc_nb_channels>
  • Example:
New-CsOnlinePSTNGateway -Fqdn 31857.uctrunk.com -SipSignalingPort 6000 -ForwardCallHistory $true -Enabled $true -ForwardPai $true -MaxConcurrentSessions 10
  • If you get the following error:
Can not use the "31857.uctrunk.com" domain as it was not configured for this tenant.
   + CategoryInfo          : InvalidArgument : (Fqdn=31857.uctr...diaBypass=False:TrunkConfig) [New-CsOnlinePSTNGateway], ArgumentException
   + FullyQualifiedErrorId : CustomValidationFailed,Microsoft.Rtc.Management.Internal.NewOnlinePSTNGatewayCmdlet
   + PSComputerName        : admin2e.online.lync.com
  • this can be due to different reasons:
    • You activated just one user on this domain and it is still not ready. You must wait – it can take a few minutes
    • You did not activate a user
    • The domain assigned to the user is not the correct one. Double check that the domain of the dummy user is the same as the sbc_domain
    • The dummy user does not have the correct license – double check that it has an E3 or E5 license.
  • Create the PstnUsage
Set-CsOnlinePstnUsage  -Identity Global -Usage @{Add="Peoplefone"}
  • Create an online route:
New-CsOnlineVoiceRoute -Identity "Peoplefone" -NumberPattern ".*" -OnlinePstnGatewayList <sbc_domain> -Priority 1 -OnlinePstnUsages "Peoplefone"
  • Example:
New-CsOnlineVoiceRoute -Identity "Peoplefone" -NumberPattern ".*" -OnlinePstnGatewayList 31857.uctrunk.com -Priority 1 -OnlinePstnUsages "Peoplefone"
  • Create the VoIP routing policy :
New-CsOnlineVoiceRoutingPolicy "Peoplefone" -OnlinePstnUsages "Peoplefone"
  • Grant this VoIP routing policy to the user:
Grant-CsOnlineVoiceRoutingPolicy -Identity "<user>" -PolicyName "Peoplefone"
  • Example:
Grant-CsOnlineVoiceRoutingPolicy -Identity "laurent@ucc-lync.ch" -PolicyName "Peoplefone"

If you get an error, saying that the policy cannot be applied, this user needs to login one time into the team client

Set Teams as preferred calling client: (needed if account was migrated from Skype to Teams)

Get-CsOnlineUser <user>| Select Teams*
TeamsMeetingPolicy :
TeamsCallingPolicy: AllowCalling
TeamsInteropPolicy: DisallowOverrideCallingTeamsChatTeams
TeamsMessagingPolicy :
TeamsUpgradeEffectiveMode : Islands
TeamsUpgradeNotificationsEnabled : False
TeamsUpgradePolicyIsReadOnly : None
TeamsUpgradePolicy :
TeamsCortanaPolicy :
TeamsOwnersPolicy :
TeamsMeetingBroadcastPolicy :
TeamsUpgradeOverridePolicy :
TeamsVideoInteropServicePolicy :
TeamsWorkLoadPolicy :

Check and fix the Interop Policy & Calling Policy

Grant-CsTeamsUpgradePolicy -PolicyName DisallowOverrideCallingTeamsChatTeams -Identity <user@domain>
Grant-CsTeamsCallingPolicy -PolicyName AllowCalling -Identity <user@domain>

Example for how to set a specific user as Anonymous:

  • Create an anonymous policy:
New-CsCallingLineIdentity  -Identity Anonymous -Description "Anonymous policy" -CallingIDSubstitute Anonymous -EnableUserOverride $false
  • Assign the policy to the user:
Grant-CsCallingLineIdentity -Identity "<user>" -PolicyName Anonymous

PowerShell Command for an overview of the configuration of a single user

Get-CsOnlineUser -Identity "<identity>" | Format-List -Property FirstName, LastName, EnterpriseVoiceEnabled, HostedVoiceMail, LineURI, UsageLocation, UserPrincipalName, WindowsEmailAddress, SipAddress, OnPremLineURI, OnlineVoiceRoutingPolicy

Other Information

How can a caller ID be used in your organization?
https://docs.microsoft.com/en-us/SkypeForBusiness/what-are-calling-plans-in-office-365/how-can-caller-id-be-used-in-your-organization

Setting the Caller ID for a user:
https://docs.microsoft.com/en-us/skypeforbusiness/what-are-calling-plans-in-office-365/set-the-caller-id-for-a-user

References

This How-To is based on the Microsoft documentation version published 27.06.2018 (GA)
You can find more info on the following links:
https://docs.microsoft.com/en-us/microsoftteams/direct-routing-plan
https://docs.microsoft.com/en-us/microsoftteams/direct-routing-configure
https://docs.microsoft.com/en-us/microsoftteams/onboarding-checklist-configure-direct-routing-in-microsoft-teams