HowTo: Stream Music on Hold in FreePBX

The Music on Hold that comes with FreePBX isn’t spectacular.  If you would like to instead stream music on hold in FreePBX, this is very simple and easy to set up!

Find your Streaming Source

First, go to a website such as and find a stream that you like.  In Shoutcast, you need to click the ‘download’ link to download a .PLS file that contains the streaming audio URL.


Save that file to your computer and then open it in a text editor.  Copy the streaming URL out of the .PLS file and copy it to your clipboard.


Add Streaming Source to FreePBX

Next, open the FreePBX admin interface and choose Settings –> Music on Hold.  In the upper right-hand menu, choose ‘Add streaming category.’


Enter anything you want in the description box.  For ‘Application,’ you will want to use the following string (and paste your streaming URL to the end):

/usr/bin/mpg123 -q -r 8000 -f 8192 --mono -s [streaming URL]

For instance, if your streaming URL is, your string would look like this:

/usr/bin/mpg123 -q -r 8000 -f 8192 --mono -s

Click ‘Submit Changes’ followed by ‘Apply Config’ to continue.


*** Note that this Application string requires the mpg123 application to be installed in Linux.  FreePBX distros have this installed by default, but if you have built Asterisk or FreePBX from source, it may not be installed.

Use Your New Streaming Hold Music!

Finally, you can set your new streaming hold music source anywhere you can set hold music, such as an Inbound Route or Queue.  To add it to an Inbound Route, select Connectivity –> Inbound Routes and pick your desired Inbound Route.  For Music on Hold, drop down the box and choose your new streaming source.


Click ‘Submit’ followed by ‘Apply Config’ and you can now stream music on hold to the callers that come in on your Inbound Route!