Choppy on hold music

on hold music on my system is very choppy and most of the time does not even play at all.

Here is my MOH.conf

default => quietmp3:/var/lib/asterisk/mohmp3/

i tried to install asterisk add on’s and get this

[root@douglinux asterisk-addons-1.2.4]# make install

./mkdep -fPIC -I…/asterisk -D_GNU_SOURCE ls *.c
app_addon_sql_mysql.c:23:19: error: mysql.h: No such file or directory
cdr_addon_mysql.c:38:19: error: mysql.h: No such file or directory
cdr_addon_mysql.c:39:20: error: errmsg.h: No such file or directory
res_config_mysql.c:53:19: error: mysql.h: No such file or directory
res_config_mysql.c:54:27: error: mysql_version.h: No such file or directory
res_config_mysql.c:55:20: error: errmsg.h: No such file or directory
make -C format_mp3 all
make[1]: Entering directory /etc/asterisk/asterisk-addons-1.2.4/format_mp3' gcc -pipe -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o common.o common.c gcc -pipe -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o dct64_i386.o dct64_i386.c gcc -pipe -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o decode_ntom.o decode_ntom.c gcc -pipe -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o layer3.o layer3.c gcc -pipe -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o tabinit.o tabinit.c gcc -pipe -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o interface.o interface.c gcc -pipe -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o format_mp3.o format_mp3.c gcc -pipe -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -shared -Xlinker -x -o common.o dct64_i386.o decode_ntom.o layer3.o tabinit.o interface.o format_mp3.o make[1]: Leaving directory/etc/asterisk/asterisk-addons-1.2.4/format_mp3’
cc -fPIC -I…/asterisk -D_GNU_SOURCE -c -o app_saycountpl.o app_saycountpl.c
cc -shared -Xlinker -x -o app_saycountpl.o
for x in format_mp3/ ; do install -m 755 $x /usr/lib/asterisk/modules ; done
rm app_saycountpl.o
[root@douglinux asterisk-addons-1.2.4]#

i am running FC4 and the latest version of asterisk.

for MoH, write a statement in zapata.conf that is [color=blue]musiconhold=default[/color]
& make sure that you must have installed asterisk-sounds-1.. as well

i did that. it still does not work .

firstly, if you’re using mp123 for MoH then that may be causing you performance issues. what does ‘top’ show when you have MoH playing ?

secondly, you’ll be better off with Asterisk native MP3, disable/delete/rename mpg123 and change your musiconhold.conf to look something like[default] mode=files directory=/var/lib/asterisk/moh-native random=yes

in my experience it’s much better, but you can still get performance issues if the MP3 files are encoded with the wrong bitrate. check out the wiki, there are some examples of ways of converting your MP3 files so Asterisk plays them nicely, and without the processor sapping of mpg123.

thirdly … things are all-change again in 1.4 !! wavs rule.