Horrible Music on Hold Quality (Snap, Crackle, Pop)

I am currently putting together a Asterisk server from scratch and am having a new problem with the music on hold. The same hardware worked great with Asterisk@Home but now that I compile/install from scratch, the quality of the music is very poor. This happens regardless of whether I use the default Mp3 files that come with the install or my own.

Specifically, the music will play; however, there are frequent (and loud) crackling, popping, and skipping. I am unable to see anything in the logs indicating an error and the problem occurs on multiple different phones. The voice quality is great, the problem only appears when the music on hold is playing.

Does anyone know what could be causing this? More importantly, can anyone help me fix it?

PS. The mpg123 version was installed during Asterisk install using the “make mpg123” compile command.

What else are you running on that system? Have you got xwindow running?

Try following Step 2 located here: orderlyq.com/asteriskqueues.html

It’ll take mp3 decompression out of the equation and just stream raw audio.

The server is only running Asterisk, dhcpd, and named. I have intentionally not installed anything else on the system. Also, when the music is playing, it is only using ~1.3% of the processor.

I would like to leave a raw audio format as the last option as I want to stream off of Shoutcast. At first I thought it was Shoutcast but it happens with the Mp3 files that come with the default install to.

Any more advise on this one?

The system is working great except for just the music on hold.

I remember reading that you should only be using the version of mpg123 that comes with Asterisk. Is it possible this is a bug in the version and a new one would fix this? The skipping and interfearence in the music is unacceptable for me to impliment the system in production.

According to the O’Reilly book, Asterisk only works with mpg123 v0.59r. Newer versions will not work. Need to make sure you have the right version.

Are you using a Sangoma card in your system? I have three near-identical systems here, the older one with a Digium card, and two newer ones with Sangoma cards. The system with the Digium has great MOH. On both Sangoma-based systems, the MOH is full of cracks, pops, and silence.

Just to verify, I swapped cards between two of the Systems. One of the system that had problems (and the Sangoma card) before, is now working great with the Digium card. And vice-versa.

In short, I blame Sangoma. I hope to start taking this up with their Tech support tomorrow.

The systems are all running FC4 or RHEL4, Asterisk 1.2.7.1, Zaptel-1.2.5, and Wanpipe 2.3.3-3.

I can only repeat all time:

Use raw format and dont bother with the mpeg123 stuff, its a hassle…

See the *-documentation/moh.conf for using rawformat.

Its 16bit signed, 8KHz mono.

FWIW, richard is right…i just switched our boxes to use slin (signed linear) MOH instead of MP3, and average CPU usage dropped by about half…not only that, but it sounds exactly the same.

keep in mind that most of the testing was on a test box, but the results still apply…i just remixed our mp3s to slin and restarted asterisk.

if you can’t/won’t do that, at least make sure you’re running MOH through asterisk and not mpg123 - the built in MOH player mode worked quite well for us as well…switching to raw mode was just another way to optimize.

I agree with the suggestions for using Raw format over MP3. Sadly, even with Raw format I am getting pops and clicks when using Sangoma cards. For the curious, my configs are:

Dual PIII-733
FC4 and RHEL4 (two systems, both having problems)
Asterisk 1.2.7-1
Zaptel 1.2.5
Wanpipe 2.3.3-3 (sangoma drivers)

Ok, that is indicating an IRQ/DMA problem.

Means, whenever something else is accessing the eg. harddisc, you get dropouts.

Recheck this please by copying a file while you listen to music.
Is the quality MUCH worser now ?