[SOLVED] Yuck! Error in buffer handling...:


I get the following message when shutting down astrisk:

Beginning asterisk shutdown…
Executing last minute cleanups
Destroying musiconhold processes
Yuck! Error in buffer handling…: Broken pipe
Asterisk cleanly ending (0).

Is this a mpg123 problem?
I am using mpg123-0.59r-4


I would recommend not using mpg123 unless you really have to. It is old and has security problems. In addition it causes the error you mentioned.

But, if you do use it you’ll want to check that the mpg123 process is actually being terminated when you exit Asterisk, some people have reported that this doesn’t always happen.



What would you recommend as a good replacement for mpg123?


Exactly how you hande this depends on what you are trying to do.

If you are doing standard things like music on hold, the easiest way is to just not use MP3. You can convert your MP3 files to wav or raw format ahead of time, and Asterisk will use those files instead. This is nice because Asterisk doesn’t have to decode the MP3 each time, which save processor cycles, and you don’t need mpg123 installed.

This works for most cases, but if it doesn’t work for you describe what your trying to do more and we can come up with a solution.


Thanks! That worked great, it now terminates cleanly, and music on hold sounds better too! I originally followed the instructions at voip-info.org/wiki-Asterisk+ … nhold.conf , but missed the mode=files part, and assumed they needed to be mp3!

Anyway, just incase there is someone else that missed it too, here is what I did to change to wav.

I converted the mp3 music files to wav format and stored them in a new created directory called /var/lib/asterisk/mohwav.

mpg123 -s --rate 44100 --mono /src/mp3/fpm-calm-river.mp3 > fpm-calm-river.raw

sox -r 44100 -w -s -c 1 fpm-calm-river.raw -r 8000 -c 1 fpm-calm-river.wav

I then updated /etc/asterisk/musiconhold.conf as follows.