Get free shipping within Australia on any order over $1000.

Creating a music-on-hold appliance

Replacing an unreliable CD-changer with an easy-to-use media server

Listening to music on hold

Music-on-hold that’s easy to manage and very reliable!

by Shane Pearson

The company I work for was using an old CD changer for their Music-on-Hold system.

Some issues with this were:

  • Music was limited to 5 CD’s
  • To exclude/include songs, compilations would need to be burned
  • Unit did not always play well with compilations on CDR’s
  • Staff required physical access to our main computer room to change music
  • Could not be maintained out of hours without attending site
  • Difference in volume between CD’s would need normalisation performed and output to a CDR
  • The high dynamic range of CD audio meant music would often be too soft or too loud over the phone
  • Non-solid state CD changer eventually became unreliable, being unable to change or play CD’s

I was asked to find a cheap MP3 player, which could reliably play indefinitely and from an external power source.

I did not like this option, as it would mean that the Music-on-Hold service would need to stop when the music is periodically changed, in order to get access to the device to remove the old music and add new music. With some devices, docking for permanent power meant that access via USB for management was not possible. Also, managing via USB meant that music playback would stop.

Looking through PBX forums I found only one MP3 player being recommended as being able to play in a constant loop and from external power, but that particular player is no longer being made and has long term reliability issues. Apparently many players crash after a long while, which I guess typically does not get noticed by users because most people don’t tend to listen to their MP3 players looping for weeks or months on end.

We tried a Windows XP desktop, just looping through music, but eventually it would just stop playing and require a reboot. It was also power hungry with a full user desktop and monitor, as compared with the 3-5 Watts of a little ALIX 3.

I looked at commercially available solid state Music-on-Hold systems, but they were expensive in their thousands and did not look to be providing anything I could not whip up with an audio capable ALIX 3, which is about ten times cheaper.

ALIX 3 with VGA for music on hold

An ALIX 3 unit with VGA plus audio in & audio-out

So I chose an ALIX 3 with VGA, since the unit with VGA comes with audio in and out.

I’m using the ALIX 3 as follows:

  • Running OpenBSD for OS
  • Using mpg123 for audio playback
  • Using Samba for music management via the network
  • Added a little scripting to play music found in a network accessible MoH directory
  • Music looped endlessly

Removing old music and replacing with new does of course allow for playing the new music once the old has finished playing from the mpg123 buffer. OpenBSD’s aucat audio server is used to eliminate audio clicking which can be heard between songs without aucat, when it seems the audio device is disabled then enabled each time.

With aucat the audio device is constantly used and therefore no clicking is heard. Under OpenBSD’s audio mixer control (mixerctl), the audio output for the ALIX 3 is “outputs.hp” (head phones). The output and volume of which can be unmuted and set at boot time within /etc/mixerctl.conf.

I pre-built some classical music MP3’s, limiting their dynamic range to improve audio quality through telephones and converting them to mono to save disk space, through SoX. I performed this externally on a Linux desktop, but I plan to incorporate this into the ALIX, with “Pre-Processed” and “Post-Processed” directories, so that all anyone need do is paste regular MP3’s into the “Pre-” directory to have the ALIX process what it finds there into files to the “Post-” directory, converting to mono, compressing dynamic range and normalising volume, to be more appropriate for playing within the limitations of telephone systems.

What’s great about this solution:

  • Much cheaper than buying a ready made unit
  • Has proven to be reliable, playing for more than a year now
  • Audio quality is great, volume just needs to be set to not over-drive the audio input of our phone system
  • Can be managed without requiring physical access to our main computer room
  • Can be managed remotely out of hours if need be, or for our Perth and Melbourne office units, if and when we decide to deploy this for them
  • Was fun to put together!

In the future, I’d like use a Soekris net6501 to build a remote site sniffing box, so that I can sniff the networks of our remote sites for troubleshooting, at full Gigabit speed, with analysis performed either remotely on the net6501, or by downloading the sniffed .pcap files out of hours across our much slower MPLS links, which I would not want to otherwise saturate during business hours.

– Shane Pearson, Sydney NSW

Want more great articles like this?

Sign up for email updates and get them delivered straight to your inbox.

We'll also donate $5 to Voyage Linux, to support the ongoing development of this fantastic software.