Just last week I blogged that this was coming on the roadmap, now here it is:
https://docs.microsoft.com/en-us/microsoftteams/sip-tester-powershell-script
“SIP Tester” is a sample PowerShell script from Microsoft that you can use to test Direct Routing Session Border Controller (SBC) connections in Microsoft Teams. This script tests the basic functionality of a customer-paired Session Initiation Protocol (SIP) trunk with Direct Routing.
The script submits a SIP test to the test runner (a Microsoft Service, https://calltester.pstnhub.microsoft.com), waits for the result, and then presents it in a human-readable format.
You can use this script to test the following 4 scenarios:
Outbound and inbound calls
This test scenario validates that outbound and inbound calls work and that media can travel all the way through in both directions between two participants. This scenario helps to identify possible configuration issues.
Use two Teams users in different tenants. This is the preferred approach as it doesn’t require any manipulation on the SBC being tested, and therefore, verifies call setup and media in conditions that are close to production. Different tenants are required as this approach removes the possibility of short-circuiting the call on the Teams backend infrastructure and forces the signalling to go to the external PSTN partner.
Simultaneous ring
This test scenario validates the Teams functionality of ringing multiple endpoints (for example, various devices with call forwarding enabled) for incoming calls.
Media escalation
This test scenario validates the situation when more participants are added to the initial 1:1 call, which makes it an ad-hoc meeting with a mixer being introduced to mix the multi-party audio.
Consultative transfer
This test scenario validates the Teams functionality to transfer the call as soon as a 1:1 call is established. This functionality allows one participant to initiate a transfer (basic or consultative), transferring the call to another test user. In a consultative transfer, the party who initiates the transfer establishes a new call with the transfer target (the new party that’s introduced into the call) for consultation before the transfer actually takes place.
Test setup
Download the SipTesterClient.ps script. Execute the script in PowerShell in administrator mode.
The script needs the Adal.ps package for execution. If it’s not present, the script will try to install it automatically. For this, run the script in administrator mode (first execution-only).
You must disable MFA (Multi Factor Authentication) for test users, otherwise, an error message will be returned.
Input Parameters
- TeamsOutUsername – Username of the caller in Teams (used to make an outbound call)
- TeamsOutPassword – Password of the caller in Teams (used to make an outbound call)
- TeamsInUsername – User principal name of the recipient of the call in Teams (used to receive an inbound call).
- TeamsInPassword – Password of the recipient of the call in Teams (used to receive inbound call)
- DestinationNumber – PSTN number that is routed to TeamsIn user
- TeamsOutDataCenter – (Optional) Preferred location of Teams client (used to make outbound call), valid values: [APAC-SG, APAC-HK, EMEA-DB, EMEA-AM, NOAM-BL, NOAM-DM]
- TeamsInDataCenter – (Optional) Preferred location of Teams client (used to receive inbound call), valid values: [APAC-SG, APAC-HK, EMEA-DB, EMEA-AM, NOAM-BL, NOAM-DM]
- TeamsInEscalationUsername – (Optional) User principal name of the escalation target in Teams (used to escalate call)
- TeamsInEscalationPassword – (Optional) Password of the escalation target in Teams (used to escalate call)
- TeamsInEscalationIncomingNumber – (Optional) PSTN number that is routed to TeamsInEscalation user
- TeamsInEscalationDataCenter – (Optional) Preferred location of Teams client (used to escalate call), valid values: [APAC-SG, APAC-HK, EMEA-DB, EMEA-AM, NOAM-BL, NOAM-DM]
- TeamsInTransferTargetUsername – (Optional) User principal name of the transfer target in Teams (used to transfer call)
- TeamsInTransferTargetPassword – (Optional) Password of the transfer target in Teams (used to tranfer call)
- TeamsInTransferTargetIncomingNumber – (Optional) PSTN number that is routed to TeamsInTransferTarget user
- TeamsInTransferTargetDataCenter – (Optional) Preferred location of Teams client (used to transfer call), valid values: [APAC-SG, APAC-HK, EMEA-DB, EMEA-AM, NOAM-BL, NOAM-DM]
- TeamsInSimulringUsername – (Optional) User principal name of the simultaneous ring target Teams (used for simultaneous ring)
- TeamsInSimulringPassword – (Optional) Password of the simultaneous ring target Teams (used for simultaneous ring)
- TeamsInSimulringIncomingNumber – (Optional) PSTN number that is routed to TeamsInSimulring user
- TeamsInSimulringDataCenter – (Optional) Preferred location of Teams client (used for simultaneous call), valid values: [APAC-SG, APAC-HK, EMEA-DB, EMEA-AM, NOAM-BL, NOAM-DM]
- CertificateContent – Base64 Certificate content for authentication
- ProviderId – (Optional) Used to verify call records for BV users
- CallDurationMinutes – Duration of the call in minutes
- MediaValidationFrequencyMinutes – Frequency of media validation during call in minutes
- HideTable – (Optional) Won’t print out table of test results.
- UseUserCredentials – (Optional) Uses TeamsOut credentials for authentication.
Output Parameters
- Flow – Call direction relative to Teams backend, outbound or inbound
- SipCallId – SIP call ID of SBC being tested
- Code – Call result code, 0 for success, non-0 for failure (internal to Teams backend)
- TrunkFqdn – The actual SBC used for the test
- ChainId – The internal Teams call ID
- State – General test result (succeeded or failed)
- Phrase – Arbitrary phrase indicating the reason for failure if any
[…] https://tomtalks.blog/2019/10/microsoft-teams-direct-routing-sip-tester-powershell-script/ […]
[…] Microsoft Teams Direct Routing SIP Tester PowerShell Script […]
Hi Tom, Trying to run this and all i’m getting is:
C:\SipTesterClient.ps1 : Parameter set cannot be resolved using the specified named parameters.
At line:1 char:1
+ .\SipTesterClient.ps1 -TeamsOutUsername testuser4@domain.com -Te …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [SipTesterClient.ps1], ParameterBindingException
+ FullyQualifiedErrorId : AmbiguousParameterSet,SipTesterClient.ps1
I may be being daft but I cant get it to work!
I haven’t had success either.
Tom Arbuthnot I was able to get this working, but my plan is to schedule this script every hour using task scheduler.. Which I can do it,but problem with this script is it asks for azure popup for credentials all the time I run this script and had to enter credentials manually. I am not sure if other also are facing the same issue. Script should be able to authenticate silently the azure credentials popup. I tried doing some research on this but no luck, so have raised a case with MS and also reported in Github community. If this is fixed script would be just awesome one..
Hi, tried to run this but getting error as:
SipTesterClient.ps1: Parameter set cannot be resolved using the specified named parameters. One or more parameters issued cannot be used together or an insufficient number of parameters were provided.
I was able to get the script working by adding this to the first line:
function siptesterclient {
and this to the last line
}
and then run it like:
siptesterclient -TeamsOutUsername user1 -TeamsOutPassword pass1 -TeamsInUsername user2 -TeamsInPassword pass2 -DestinationNumber +12345
Thanks for sharing Mike!
Does any know if there is an update planned to that SIP Tester script as its using adal which will be retired end of 2022? Or is there a version which uses msal for authentication?