Bearbeiten

Freigeben über


Set-CsCallParkServiceMusicOnHoldFile

Changes the audio file that will be played to callers who are on hold in a parked call. This cmdlet was introduced in Lync Server 2010.

Syntax

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

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 the Get-CsCpsConfiguration cmdlet. You can set the property either when the Call Park configuration is created with the New-CsCpsConfiguration cmdlet or after the Call Park configuration exists by calling the Set-CsCpsConfiguration cmdlet. This property is True by default.

Skype for Business Server 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.

Examples

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

$a = [System.IO.File]::ReadAllBytes('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 uses the [System.IO.File]::ReadAllBytes command to read the contents of a file in byte format and assign them, in this case, to the variable $a.

Line 2 in this example is where we actually assign the audio file. We call the Set-CsCallParkServiceMusicOnHoldFile cmdlet 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.)

Parameters

-Confirm

Prompts you for confirmation before executing the command.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-Content

The contents of the audio file in byte format.

A valid value for this parameter requires you to read the file to a byte-encoded object using the following syntax: ([System.IO.File]::ReadAllBytes('<Path>\<FileName>')). You can use this command as the parameter value, or you can write the output to a variable ($data = [System.IO.File]::ReadAllBytes('<Path>\<FileName>')) and use the variable as the parameter value ($data).

Type:Byte[]
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-Force

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

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-Service

The ID of the service where the Call Park service resides; for example, ApplicationServer:pool0.litwareinc.com.

Type:String
Position:2
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Inputs

Byte[]. Accepts pipelined input of a byte array containing the music on hold file.

Outputs

This cmdlet does not return a value.