Jump to content

Configure Teams Direct Routing: Difference between revisions

From wiki.oeser.name
Udo (talk | contribs)
Udo (talk | contribs)
Line 2: Line 2:
==Connect Powershell to Tenant==
==Connect Powershell to Tenant==


  Install-Module MicrosoftTeams (if not there allready)
  Install-Module -Name PowerShellGet -Force -AllowClobber (if not there allready)
  Import-Module SkypeOnlineConnector (older Version)
  Install-Module -Name MicrosoftTeams -Force -AllowClobber (new install)
 
  Import-Module MicrosoftTeams
  Connect-MicrosoftTeams
  $sfbSession = New-CsOnlineSession
  Update-Module MicrosoftTeams
Import-PSSession $sfbSession


==Configure SBC==
==Configure SBC==

Revision as of 17:05, 1 July 2021

Connect Powershell to Tenant

Install-Module -Name PowerShellGet -Force -AllowClobber (if not there allready)
Install-Module -Name MicrosoftTeams -Force -AllowClobber (new install)

Connect-MicrosoftTeams
Update-Module MicrosoftTeams

Configure SBC

$FormatEnumerationLimit =-1
Get-CsTenant | fl Tenantid,Domain*

The DomainUrlMap field must contain the SBC domain!!

New-CsOnlinePSTNGateway -Fqdn <SBC FQDN> -SipSignalingPort <SBC SIP Port> -MaxConcurrentSessions <Max Concurrent Sessions the SBC can handle> -Enabled $true -ForwardPai $true

Enable Users

Get-CsOnlineUser -Identity "<User name>" | fl RegistrarPool,OnPremLineUriManuallySet,OnPremLineUri,LineUri
Set-CsUser -Identity "<User name>" -OnPremLineUri $null -EnterpriseVoiceEnabled $False -HostedVoiceMail $False
Set-CsUser -Identity "<User name>" -EnterpriseVoiceEnabled $true -HostedVoiceMail $true -OnPremLineURI tel:<phone number>

Configure Routing

Set-CsOnlinePstnUsage -Identity Global -Usage @{Add="PBX"}
New-CsOnlineVoiceRoute -Identity "PBXUnrestricted" -NumberPattern "^(\+d)$" -OnlinePstnGatewayList sbc001.domain.de -Priority 1 -OnlinePstnUsages "PBX"
New-CsOnlineVoiceRoutingPolicy "PBXUnrestricted" -OnlinePstnUsages "PBX"

Assign the voice routing policy to a user

Grant-CsOnlineVoiceRoutingPolicy -Identity "User Name" -PolicyName "PBXUnrestricted"