VoIP:Teams:Debug
From VTX Public Wiki
We remind you that for the time being, each actions takes several hours to be in production, so you need to be really patient and follow the steps above one by one |
Start powershell script in Command Line to be able to see the errors[edit | edit source]
- Problem: If you enter wrong credentials, or wrong domain, or if the domain or user is not yet ready on Microsoft side, you might get an error that disappears too quickly
- Solution: use the powershell -File file.ps1 command to be able to see the errors
- Start a "cmd" ( Start menu and enter "cmd" + Enter to display the Black Window
- Use the command powershell -File file.ps1 ( replacing file.ps1 with the correct path of the ps1 file )
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
H:\>c:
C:\>powershell -File "C:Users\bob\Desktop\VTX_Connect_Teams_Create_Routing_Rules
.ps1"
VTX Teams Connect domain name is XXXX.teams.ipvoip.ch
VTX Teams Admin Username is vtxadmin@XXXX.teams.ipvoip.ch
Connecting to Microsoft Online Management with the credentials you provided
Get-CsOnlinePowerShellEndpoint : The remote name could not be resolved:
'lyncdiscover.xxxx.teams.ipvoip.ch'
At C:\Program Files\Common Files\Skype for Business
Online\Modules\SkypeOnlineConnector\SkypeOnlineConnectorStartup.psm1:149
char:26
+ ... targetUri = Get-CsOnlinePowerShellEndpoint -TargetDomain $adminDomain ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-CsOnlinePowerShellEndpoin
t], WebException
+ FullyQualifiedErrorId : System.Net.WebException,Microsoft.Rtc.Management
.OnlineConnector.GetPowerShellEndpointCmdlet
C:\>powershell -File "C:Users\bob\Desktop\VTX_Connect_Teams_Create_Routing_Rules
.ps1"
Verify Voice Routing[edit | edit source]
To verify Voice Routing, you can either use Powershell command lines or check from Admin Teams Web interface in the following 2 sections
Verify Voice Routing using Powershell[edit | edit source]
PS H:\> Get-CsOnlinePstnUsage
Identity : Global
Usage : {CsOnlinePstnUsage-123456.teams.ipvoip.ch}
PS H:\> Get-CsOnlineVoiceRoute
Identity : CsOnlineVoiceRoute-123456.teams.ipvoip.ch
Priority : 0
Description :
NumberPattern : .*
OnlinePstnUsages : {CsOnlinePstnUsage-123456.teams.ipvoip.ch}
OnlinePstnGatewayList : {123456.teams.ipvoip.ch}
Name : CsOnlineVoiceRoute-123456.teams.ipvoip.ch
PS H:\> Get-CsOnlineVoiceRoutingPolicy
Identity : Global
OnlinePstnUsages : {}
Description :
RouteType : BYOT
Identity : Tag:CsOnlineVoiceRoutingPolicy-123456.teams.ipvoip.ch
OnlinePstnUsages : {CsOnlinePstnUsage-123456.teams.ipvoip.ch}
Description :
RouteType : BYOT
PS H:\> Get-CsCallingLineIdentity
Identity : Global
Description :
EnableUserOverride : True
ServiceNumber :
CallingIDSubstitute : LineUri
BlockIncomingPstnCallerID : False
Verify Voice Routing using Teams Admin Web Interface[edit | edit source]
- Verify Voice Routing Rule
- Connect to https://admin.teams.microsoft.com/direct-routing/v2/voice-routes and verify the routing rule (cf screenshot)
- Verify Voice Routing Policy
- Connect to https://admin.teams.microsoft.com/policies/teamsonlinevoicerouting and verify Voice Routing policy (cf screenshot )
- Name should be CsOnlineVoiceRoutingPolicy-<service_nummber>.teams.ipvoip.ch
- PSTN Usage Record should be CsOnlinePstnUsage-<service_nummber>.teams.ipvoip.ch
Verify User Setup[edit | edit source]
To verify User setup, you can either use Powershell command lines or check from Admin Teams Web interface in the following 2 sections
Verify User setup using Powershell[edit | edit source]
You can use these powershell commands too verify all your users do have a valid MS Teams license enabled ( that enables EnterpriseVoiceEnabled ) and also have the correct OnlineVoiceRoutingPolicy |
# Set Variables $MSTeamsDomain = "123456.teams.ipvoip.ch" # Connect to Microsoft Teams management and assign number and profile to the user $Session = New-CsOnlineSession Import-PSSession $Session -AllowClobber # Verify all users with correct setup using CsOnlineVoiceRoutingPolicy-$MSTeamsDomain Get-CsOnlineUser ` -Filter {(enterprisevoiceenabled -eq $true) -and(HostingProvider -eq "sipfed.online.lync.com")} ` | Select EnterpriseVoiceEnabled,sipaddress,OnPremLineURI,OnlineVoiceRoutingPolicy,RegistrarPool | Format-List EnterpriseVoiceEnabled : True SipAddress : sip:user1@myoffice.onmicrosoft.com OnPremLineURI : tel:+41215660011 OnlineVoiceRoutingPolicy : CsOnlineVoiceRoutingPolicy-123456.teams.ipvoip.ch RegistrarPool : sippoolAM42E08.infra.lync.com EnterpriseVoiceEnabled : True SipAddress : sip:user2@myoffice.onmicrosoft.com OnPremLineURI : tel:+41215660012 OnlineVoiceRoutingPolicy : CsOnlineVoiceRoutingPolicy-123456.teams.ipvoip.ch RegistrarPool : sippoolAM42E08.infra.lync.com EnterpriseVoiceEnabled : True SipAddress : sip:user3@myoffice.onmicrosoft.com OnPremLineURI : tel:+41215660013 OnlineVoiceRoutingPolicy : CsOnlineVoiceRoutingPolicy-123456.teams.ipvoip.ch RegistrarPool : sippoolAM42E08.infra.lync.com # Logout Get-PSSession | Remove-PSSession
Verify User setup using Teams Admin Web Interface[edit | edit source]
- Verify user licenses
- Connect to https://admin.microsoft.com/AdminPortal/Home#/users and verify that your user does have a "Microsoft Teams" license and a "Microsoft 365 Phone System" license
- Verify in https://admin.microsoft.com/AdminPortal/Home#/teamsprovisioning that your user Teams license provisioning is finished ( it can take several hours )
- Verify user number
- Connect to https://admin.teams.microsoft.com/users and verify that "Phone Number" has been correctly setup via powershell
- Verify user routing rules
- Connect to https://admin.teams.microsoft.com/user and select your user
- Go in the Policies tab section and look at the last entry "Voice routing policy", is should be CsOnlineVoiceRoutingPolicy-<service_number>.teams.ipvoip.ch
Verify number provisioning in MS Teams app[edit | edit source]
It might take some hours ( up to 4h in our tests) to be able to see your number in the Teams app even if you see the number in Teams Admin web interface. You can try to restart the app to speed it up |
- Verify the number on the MS Teams app
- Open the MS Teams app
- Go in the Calls section ( if you do not see it, then the "Phone System" license is not correctly set )
- (Mobile) You might get a popup informing that you have a new license and that app needs to be restarted
- (PC) Restart is not supposed to be needed, if you have waited a long time, please try to exit the app and start it back
- Verify that you can see the phone number in the Call section and that you can pass incoming and outgoing calls