MoH dont play mp3 sound if is in the hold

Hi all, we got some problems with moh.
We have uploaded a .mp3 file, in the dashboard on freepbx.
The file named “orig_01_Test_Sound.mp3” and located in /var/lib/asterisk/moh/slowmc/
We have the Asterisk appliance.
If someone calls and we take the caller at the “hold modus”, then we got this error messages:

 [2014-06-24 16:57:44] WARNING[756][C-0000023a]: file.c:701 ast_openstream_full: File /var/lib/asterisk/moh/slowmc//orig_01 Test Sound does not exist in any format
[2014-06-24 16:57:44] WARNING[756][C-0000023a]: res_musiconhold.c:343 ast_moh_files_next: Unable to open file '/var/lib/asterisk/moh/slowmc//orig_01 Test Sound': No such file or directory

IMO, there are too many problems with MP3 files. Even if you get them to work, it’s a waste of CPU horsepower for Asterisk to decode them each time played, and quality won’t be the best.


If you really care about MOH quality, use an audio editor instead, so you can set the volume, and depending on the music, reduce dynamic range, filter frequencies the phone won’t reproduce, and adjust equalization for best sound.

Does converting them also solve the path problem bleikrone is seeing ?
(And we too)

rig_01 Test Sound



You’re right jfinstrom, i had the file name incorrectly written off. But it does not change the problem.
I also tried, to write the word together e.g. “orig_01_Test_Sound.mp3”.
But in the log it cut of the .mp3, all time. Would that mean, that Asterisk can not interpret the .mp3 format?
@Stewart1 CPU Performance, we have enough of it.

I doubt that the problem is filename parsing related. Asterisk looks for various formats with corresponding extensions, e.g. foo.wav, foo.gsm, foo.sln and is only reporting the base name in the error message. If you still believe that this is an issue, try a short simple name such as test.mp3 .

FreePBX does not support MP3 files by default. If you really want to fix that, Google “asterisk mp3 moh” and you’ll find various solutions.

However, IMO that is the wrong approach. MP3 is not a telephony-related format. If you are having hold music professionally produced with marketing messages, customer help, store opening hours, etc., there is no reason to use MP3 at any stage of the production process.

If you have existing MP3 files, e.g. public domain or purchased music, chances are it won’t sound good over the phone, especially if the caller is using a mobile or is international. Phones have limited dynamic range and frequency response. You also need to get the volume right, so doing some editing will make your hold music less annoying to the customer (he is already plenty annoyed by being on hold).

If you don’t give a hoot about how your hold music sounds, just convert it to a .wav file (mono, 8 kHz sample rate), upload it to your system and call it a day.

I’m really very little concerned about the sound or volume, I really just want the mp3 to be played !
And I do have the same as bleikrone says:
THe path is showing wrong !
Do I have the same problem in my setup, or is it a bug in Asterisk/freepbx ?

I believe that the path is “showing wrong” because Asterisk is looking for various formats (with different file name extensions) and the error message just shows the base name. The real problem is that Asterisk does not support MP3 by default.

The simple solution is to convert your music file(s) to a format Asterisk natively supports. If you really need MP3 support (you are streaming from an MP3 source, you upload new music every week, etc.) see

I’ve the same issue with WAV. But this time I called the filename shorter, to exclude the “space problem”. The problem still exists.
Have you maybe a “test-file” for me to exclude errors?

I don’t understand what’s wrong. Confirm that your .wav file is mono, 8 kHz sample rate, 16-bit samples. If that’s not the problem:

Confirm that your PBX will play an existing MOH file. Temporarily rename it, and confirm that it no longer plays, so you’re sure that you have the right file. Put your file in the same place with the same name as the original had. Test.