[This is preliminary documentation and is subject to change. Blank topics are included as placeholders.]

Changes the audio file that will be played to callers who are on hold in a parked call.

Syntax

Set-CsCallParkServiceMusicOnHoldFile -Service <String> -Content <Byte[]> [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Service

Required

ServiceId

The ID of the service where the Call Park application resides.

Content

Required

Byte[]

The contents of the audio file in byte format.

Use the Get-Content cmdlet to retrieve the contents of the audio file in byte format. (See the example in this topic.)

Confirm

Optional

SwitchParameter

Prompts you for confirmation before executing the command.

Force

Optional

SwitchParameter

Suppresses any confirmation prompts that would otherwise be displayed before making changes.

WhatIf

Optional

SwitchParameter

Describes what would happen if you executed the command without actually executing the command.

Detailed Description

Call parking is a service that allows a user to park an incoming phone call. Parking a call transfers it to a number in a specified range and immediately places it on hold. Based on configuration settings for the Call Park application, music on hold can be played to the caller while the call is parked. Use this cmdlet to change the audio file (music on hold) that is played to a parked caller who is on hold.

Music on hold is played only if the EnableMusicOnHold property of the Call Park application has been set to True. You can check this property by calling Get-CsCpsConfiguration. You can set the property either when the Call Park configuration is created with New-CsCpsConfiguration or after the Call Park configuration exists by calling Set-CsCpsConfiguration. This property is True by default.

Microsoft Communications Server 2010 ships with a default Call Park application file for music on hold. If you don’t assign an audio file, the default file will be used.

Audio files must be in the following format: Windows Media Audio 9, 44 kHz, 16 bits, Mono, CBR, or 32 kbps.

Return Types

This cmdlet does not return a value.

Examples

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

Copy Code
$a = Get-Content -ReadCount 0 -Encoding byte "C:\MoHFiles\soothingmusic.wma"
Set-CsCallParkServiceMusicOnHoldFile -Service ApplicationServer:pool0.litwareinc.com -Content $a

This example sets the file SoothingMusic.wma to be the audio file that is played to callers whose calls are parked. The first line of this example is a call to the built-in Windows PowerShell cmdlet Get-Content. This cmdlet simply reads the contents of a file and assigns them, in this case, to the variable $a. We pass a value of 0 to the ReadCount parameter so Get-Content will read the entire file at once (rather than try to read it line by line, which doesn’t apply to an audio file). We set the Encoding parameter to byte. This tells Get-Content that the content we want to read into variable $a is a byte array rather than the audio file in .wma format.

Line 2 in this example is where we actually assign the audio file. We call Set-CsCallParkServiceMusicOnHoldFile and specify the service ID where the Call Park application is running. We then pass the audio file contents that we read into variable $a to the Content parameter. (Note that these contents must be in byte format.)