Music On Hold - Nightmare


Firstly, I need to say that I’m far from an Asterisk and/or Linux pro.

I’m running Asterisk 1.4.30 with FreePBX on a CentOS box, with a mixture of Linksys SPA962s and SPA922s. Calls come in (and go out) via a couple of SIP accounts as well as Skype for Asterisk, and all is good…

…apart from Music On Hold. I can’t get it to work for the life of me. I’ve spent many, many hours searching a variety of forums, and trying all sorts of things, but I’m still greeted by silence when an extension puts a call on hold.

The following is an extract from the Asterisk Log file at the time of calling ext 101 from ext 201, then ext 101 immediately placing the call on hold:

[Mar 17 18:36:22] VERBOSE[4121] logger.c: – Executing [s@macro-dial:7] Dial(“SIP/201-0000000f”, “SIP/101|10|tr”) in new stack
[Mar 17 18:36:22] VERBOSE[3270] logger.c: Extension Changed 101[ext-local] new state Ringing for Notify User 201
[Mar 17 18:36:22] VERBOSE[4121] logger.c: – Called 101
[Mar 17 18:36:22] VERBOSE[4121] logger.c: – SIP/101-00000010 is ringing
[Mar 17 18:36:25] VERBOSE[4121] logger.c: – SIP/101-00000010 answered SIP/201-0000000f
[Mar 17 18:36:25] VERBOSE[3270] logger.c: Extension Changed 101[ext-local] new state InUse for Notify User 201
[Mar 17 18:36:26] VERBOSE[3270] logger.c: Extension Changed 101[ext-local] new state Hold for Notify User 201
[Mar 17 18:36:26] VERBOSE[4121] logger.c: – Music class default requested but no musiconhold loaded.

I had previously uploaded an mp3 file (OnHold.mp3) via the “On Hold Music” screen in FreePBX, and it appeared as “wav_OnHold.wav” after being converted. The file is located at /var/lib/asterisk/mohmp3/

The musiconhold.conf file (/etc/asterisk/musiconhold.conf) reads as follows:

; Music on hold class definitions
; This is using the new 1.2 config file format, and will not work with 1.0
; based Asterisk systems
default => /var/lib/asterisk/mohmp3,r
#include musiconhold_custom.conf
#include musiconhold_additional.conf


The musiconhold_additional.conf file (/etc/asterisk/musiconhold_additional.conf) reads as follows:



The musiconhold_custom.conf file (/etc/asterisk/musiconhold_custom.conf) is blank.

I would be really grateful if anyone could come up with any suggestions, please.

With thanks in anticipation,


extra ‘/’ looks like it does not belong:


should be:


Thanks for the response mudslide567.

I think that “musiconhold_additional.conf” is controlled by FreePBX(?), so when I edit the file to replace the double slashes with a single slash, then reboot, it changes back to a double slash!

Any other suggestions gratefully received.

Many thanks,


[quote=“mudslide567”]extra ‘/’ looks like it does not belong:


should be:

In Linux/Unix, that doesn’t matter how many ‘/’ are used. I suppose so does Asterisk on a Linux system.

Isn’t there a way to upload the file without having it converted to a wav file. Maybe its looking for the .mp3


Thanks for the suggestion, Michael,

I’ve placed mp3 files and wav files straight into the directory (var/lib/asterisk/mohmp3/), and they appear in the “On Hold Music” page in FreePBX, but still I get the same line in the Asterisk Log:

Music class default requested but no musiconhold loaded.

I feel like it’s something to do with the contents of the musiconhold.conf , musiconhold_additional.conf and musiconhold_custom.conf files - I don’t really understand what should be present in each file, and I’m embarrassed to say, I don’t entirely understand what each of them does!


Hi there

Did you get this resolved ? I cant even upload wav files , it says the file is uploaded but its not. The default path is there but the folder is empty. I installed asterisk-addons so I could use mp3 files but when I attempt to upload an mp3 i am informed the format needs to be wav, u-law , gsm etc.

Is there anything specific needed to be done after installing asterisk addons to enable mp3 playback ? I installed both asterisk and the addons using yum and I am managing asterisk using asterisk gui 2.0

Thanks in advance

MOH is a nightmare!!! What are these developers doing? It seems that there is a conspicuous vacuum of response on this subject. Even on IRC via freePBX (Online support in 1st menu dropdown) no one would even respond in both the centOS channel and the freePBX channel. There is a real lack of coorelation to what version has what bugs and what version (of freePBX) has what fixes in this area of MOH (and, actually) in most areas. I have found the linux community to be very helpful in some areas, but there is always that inevitable question, what version are you running?? It seems to all too often be a jumping board from which the inevitable gloating about how some other particular distro is obviously better (I haven’t had that problem…) and, well, my distro never has problems. Intellectuals hiding behind… I really appreciate the real help that I have gotten (it seems with always an undercurrent of unspoken humility is required), Geesh, this stuff is difficult, can’t that be enough, without all the ego pumping required. Anywhat, it is wierd how there is a Bermuda triangle around this topic.

robinhood: Could you please explain your relationship to the other posters in the thread, and give the history of your particular problem. (At first I thought this was a precis posting, often used by link spammers, but it seems to contain more than just repeats.)

The sorts of reason that you might not be getting responses are:

  1. For the vast majority of people, music on hold is not a problem (it is much easier for people to respond when they have experienced the problem themselves);
  2. The problem in this thread is FreePBX related, and knowledge of FreePBX is limited on this forum.
  3. Users of Asterisk GUIs usually do so because they want an easy solution and, tend not to contribute with answers on peer support forums.

Taking the thread as a whole, I would want to check the contents of the directory listed in the files section of the definition for the default music on hold.

I would also want an explanation of the “default => …” line. It is not a documented configuration file line. I guess it might be private data for FreePBX.

The output of the command “moh show files” would also be useful.

I would also consider pre-converting MP3 files to telephone quality, as MP3 is totally overkill for the application. I’m actually surprised that audio licensed for this application is available in MP3 format.

Complaining about responders or even lack of responses doesn’t actually put people into a good mood to respond. If you think that responses here are bad, you should start answering questions here yourself. If you can’t because you don’t know enough, accept that Asterisk is complicated. If you can’t because you don’t have the time, accept that people are not going to spend a lot of time giving unpaid consultancy.

I agree with david55 on the music format. I have found that converting files to WAVs (mono, 16bit, 8000 Hz) solved the MOH problems I was having. Trying to work with other formats of WAV that did not meet the specification above produced strange errors.

Old post but make sure When uploading your files they are 16bit and 8000hz.