Using music on hold, Asterisk enables us to stream MP3 or WAV files to any handset or line. These streams are commonly used for music on hold and for the music played while people are waiting in a queue. Each stream is configured in /etc/asterisk/musiconhold.conf
.
Asterisk gives us the flexibility of defining multiple instances of MOH, referred to as classes. Each class can use a different directory of audio files and a different mode. For our purposes, we will only be using the mode called files. This mode allows us to use Asterisk's native players to stream music on hold.
Using Asterisk's native player also allows us to have our music on hold in various formats that Asterisk supports. Our PBX will determine the best format to play. Therefore, transcoding may be avoided if we create our music-on-hold files in the format our channels are in.
There are two main directives we need to be aware of:
Mode: This refers to the mode we previously discussed. We will be using files...