Topic Last Modified: 2010-10-01
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 service resides; for example, ApplicationServer:pool0.litwareinc.com. |
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. (For details, see the Examples section in this topic.) |
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. |
Confirm |
Optional |
SwitchParameter |
Prompts you for confirmation before 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 service, 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 service 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 Lync Server 2010 ships with a default Call Park service music on hold file. 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.
Who can run this cmdlet: By default, members of the following groups are authorized to run the Set-CsCallParkServiceMusicOnHoldFile 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 "Set-CsCallParkServiceMusicOnHoldFile"}
Input Types
Byte[]. Accepts pipelined input of a byte array containing the music on hold file.
Return Types
This cmdlet does not return a value.
Example
-------------------------- 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 service is running. We then pass the audio file contents that we read into variable $a to the Content parameter. (Remember that these contents must be in byte format.)