Music on Hold

An important aspect of a PBX system is to be able to control the Music on Hold. This allows us to have a personalized experience for our callers, and give a more professional look to our business. To configure our music on hold, we must go to Settings > Voice Prompts > Music on Hold.

In this module, we create a Music on Hold Classes. A class is a playlist of sound files that will play when Music on Hold is used. Music on Hold is usually abbreviated as MOH.

First, you must enter a Name to identify this Music on Hold Class. Then, we select the Mode for this MOH, which can be either Files or Custom. Files will allow you to upload WAV files that can play based on the Sort option you select. You can sort in a Linear fashion, so the Sound Files play in the order they are uploaded, or in a Shuffle fashion and playback in a random order.

The first file is uploaded when you click on Save. To upload more files, you must go back to the MOH Class, select a new sound file, and click on Update. You will see the list of sound files at the bottom of your MOH class. You can playback the sound files or delete them if necessary.


Additionally, you can set the MOH class as the Default MOH class. When you enable this option, every module that uses a MOH class will use this MOH class instead of the default music on hold that comes with VitalPBX. If you set a new MOH class as default, this will disable the option for any other MOH class that had this enabled. You cannot have two default MOH classes at once.

Once you have all your sound files uploaded, you can then Apply Changes.

The other mode available is Custom. This is an extended feature for the MOH module, where you can use a streaming URL to playback instead of predetermined sound files.

To create a custom MOH class, you must enter a Name to identify it and select the Custom mode. Then, you have the Application field. Here, you can select the application to playback the streaming MOH. By default, we use the mpg123 application to playback the music, but you can use any other and enter the parameters here. You can leave this field blank to use the default values.

Next, we have the Streaming URL. This is the URL that has the music stream to playback. This can come from a streaming server or a streaming service that provides this URL.

Make sure that the streaming URL you use does not use HTTPS. This is due to Asterisk not
being able to process HTTPS URLs.

The Format field specifies the format option that the application will provide to Asterisk. The
options you can enter here are the formats that Asterisk can accept, like ulaw, alaw, wav, and
mp3. You can leave this field blank.

You can then Save and Apply Changes.

Note: With Debian 11, there is currently a bug (as of October 2023) with the
FFMPEG libraries that may playback static noise. This may be fixed in a future
version of Debian 11 or Debian 12.

When using a streaming service, make sure that you take into account Copyright based on your local copyright laws, as well as the quality, reliability, and content of the streaming music. Remember that any caller will be able to listen to this stream when reaching your VitalPBX.

What are your feelings
Updated on December 16, 2023