Configure Music on Hold in Microsoft Teams.
Microsoft has recently released a new feature in Teams which allows a Microsoft Teams user to place an incoming call form the Public Switched Telephone Network (PSTN) on hold, the PSTN caller can listen to selected music.
The hold music is ether the defaults music provided by Microsoft or custom music that you can upload and configure. As the tenant administrator you can configure whether the Music on hold is available by using the Teams Calling Policy and assigning the policy to the Teams User.
Configure Music on Hold
Open the Teams Admin Portal https://admin.teams.microsoft.com/dashboard
From the Admin Portal Navigate to Voice > Calling policies.
On the Manage policies tab, select an existing policy or create a new policy.
For the purpose of this post, I will select the Global policy. Scroll down until you see “Music on hold for PSTN callers” Click on the drop down and select “Enabled”. Once enabled click on Save at the bottom of the page.
Configure Music on Hold using Teams PowerShell
Music on hold can be configured using the Teams PowerShell module as well, to configure the Music on Hold we first need to connect to Teams PS Session.
1 |
Connect-MicrosoftTeams |
Next, lets list all the Teams Calling Policies by executing the following.
1 |
Get-CsTeamsCallingPolicy |Select Identity |
Let’s go ahead and set the “Music on Hold” to enabled for calling policy “Marketing”
1 |
Set-CsTeamsCallingPolicy -Identity "Marketing" -MusicOnHoldEnabledType Enabled |
Upload Custom Hold Music
The last part of the blog post will look at uploading a custom audio file for on hold Music. To upload a custom file, we need to use the Teams PowerShell Module. Once the file has been uploaded, we will then need to assign it to a Call on Hold Policy.
Run the following in PowerShell to import the file.
1 2 3 |
$Content = Get-Content "C:\Softlib\Teams\A-New-Life.mp3" -Encoding byte -ReadCount 0 $AudioFile = Import-CsOnlineAudioFile -FileName "A-New-Life.mp3" -Content $content $Audio |
Once the file has been successfully uploaded, we must create a new On Hold Policy and assign the uploaded file to it.
1 |
New-CsTeamsCallHoldPolicy -Identity "MarketingHold" -Description "Custom Music on Hold using A-New-Life.mp3" -AudioFileId $AudioFile.Id |
The last section is to Grant the custom Hold policy to the users by using the below example.
1 |
Grant-CsTeamsCallHoldPolicy -PolicyName "MarketingHold" -Identity John@thatlazyadmin.com |
To get information about the custom file which was uploaded, you can use the Get-CsOnlineAudioFile Cmdlet.
1 |
Get-CsOnlineAudioFile |
Microsoft has also published the following list of Restrictions for Music on Hold, see below.
Restrictions
- Music On Hold is only available in commercial cloud.
- Music On Hold is only available when the user is in Teams Only mode.
- Music On Hold is not available when the Teams user does consultative transfer.
- If the called Teams user is enabled for Location-Based Routing, Music On Hold cannot be played to the caller.
- Music On Hold is only available when the Teams user called is using one of the following versions of the Teams client:
- Microsoft Teams for Windows
- Microsoft Teams for Mac
- Microsoft Teams on the web
- Microsoft Teams for iOS
- Microsoft Teams for Android
- You can’t export the audio file after it has been uploaded; you can only remove it.
- Custom Music On Hold is not available for users configured for Shared Line Appearance (delegation) and when Call Park is used. The standard Music On Hold will be played.
- In some scenarios, a Direct Routing media bypass call will be converted to non-media bypass for playing Music on Hold and the call will stay as non-media bypass until the call is terminated.
Thank you indeed for sharing ..