Test-CsTrunkConfiguration

 

Topic Last Modified: 2012-03-27

Validates a trunk configuration against a phone number.

Syntax

Test-CsTrunkConfiguration -DialedNumber <PhoneNumber> -TrunkConfiguration <TrunkConfiguration>

Detailed Description

Use this cmdlet to verify that a trunking configuration performs as expected against a dialed phone number. Each configuration contains specific settings defining the relationship and capabilities between the Mediation Server and the public switched telephone network (PSTN) gateway, IP-public branch exchange (PBX), or Session Border Controller (SBC) at the service provider. These settings configure such things as whether media bypass is enabled on this trunk, whether real-time transport control protocol (RTCP) packets are sent under certain conditions, and whether to require secure real-time protocol (SRTP) encryption.

Who can run this cmdlet: By default, members of the following groups are authorized to run the Test-CsTrunkConfiguration cmdlet locally: RTCUniversalServerAdmins. To return a list of all the role-based access control (RBAC) roles this cmdlet has been assigned to (including any custom RBAC roles you have created yourself), run the following command from the Windows PowerShell prompt:

Get-CsAdminRole | Where-Object {$_.Cmdlets –match "Test-CsTrunkConfiguration"}

Parameters

Parameter Required Type Description

DialedNumber

Required

PhoneNumber

The phone number against which to test the configuration.

TrunkConfiguration

Required

TrunkConfiguration

A reference to a trunk configuration object against which to run the test. Trunk configuration objects can be retrieved by calling the Get-CsTrunkConfiguration cmdlet.

Input Types

Microsoft.Rtc.Management.WritableConfig.Settings.TrunkConfiguration.TrunkConfiguration object. Accepts pipelined input of a trunk configuration object.

Return Types

Returns a value of type Microsoft.Rtc.Management.Voice.TrunkConfigurationTestResult.

Example

-------------------------- Example 1 --------------------------

$tc = Get-CsTrunkConfiguration -Identity Site:Redmond
Test-CsTrunkConfiguration -DialedNumber 4255551212 -TrunkConfiguration $tc

This example runs a test against the trunk configuration defined for the Redmond site. The first line in this example calls the Get-CsTrunkConfiguration cmdlet to retrieve the configuration for the Redmond site (the configuration with the Identity site:Redmond). The trunk configuration object retrieved is assigned to the variable $tc.

In line 2 we call Test-CsTrunkConfiguration, passing the phone number to test to the DialedNumber parameter, and the trunk configuration we retrieved in line 1 (stored in $tc) to the TrunkConfiguration parameter.