Problems with Music On Hold

hi

on a server i’ve installed slackware 10.2 and

Asterisk Version 1.2.4
Zaptel Version 1.2.4
Libpri Version 1.2.2

I’m experiencing problem with moh, the music is correctly started:

Started music on hold, class ‘default’, on channel ‘Zap/1-1’

but i don’t hear anything… i heard something like a "fiiiiiiiiiiiii"
very very low

the server is without a sound card, it this the problem?

i’ve installed mpg123, the last version

Version 0.59r

this is my mysiconhold.conf

[default]

mode=quietmp3
directory=/var/lib/asterisk/mohmp3
application=/usr/local/bin/mpg123 -q -r 8000 -f 8192 -b 2048 --mono -s

the directory /var/lib/asterisk/mohmp3 is readable by all…

Hi,

I have a problem with my MoH too.

I get sound from the MP3s but it’s alway crackles & pops. Not very good quality at all.

The * box is a P4 3GHz, and CPU load is never very much even with a few incoming PRI calls to SIP phones and a few more SIP 2 SIP with MoH playing.

musiconhold.conf

[quote][default]
mode=quietmp3
directory=/var/lib/asterisk/mohmp3[/quote]

Any ideas?

Thanks,liam

Hi,

The mp3’s that you are playing are they the default mp3’s or do you have our own mp3’s in there?

Provide me with this info and I might be able to help

Hi,

I have no idea actually. The asterisk server that we run was a colaboration between myself and some other people in my company. I don’t know if they changed the MP3s But the files in /var/lib/asterisk/mohmp3 are:
fpm-calm-river.mp3, fpm-world-mix.mp3 & fpm-sunshine.mp3

When we first configured our * box - we were only using 2 SIP hard phones and 1 SIP soft phone connection. I don’t remember any problems with MoH. I am now using a Sangoma ISDN A102 PRI card and have since noticed this issue.

I don’t know whether the ISDN card would cause this sort of problem?

,liam

Understood.

Add this to your extensions.conf under you internal context so you can test it internally.

exten => 6000,1,Answer ;testing music on hold
exten => 6000,2,MusicOnHold()

Reload and dial 6000 from you phone.

hello
i want to make musiconhold but i can’t hear anything.
i add the entry in extension.conf as u have given like

exten => 6000,1,Answer ;testing music on hold
exten => 6000,2,MusicOnHold()

and in musionhold.conf fille there is code like
[default]
mode=quietmp3
directory=/var/lib/asterisk/mohmp3

and in /var/lib/asterisk/mohmp3 i have file like
fpm-calm-river.mp3 fpm-sunshine.mp3 fpm-world-mix.mp3

  it is enough to test the musiconhold .if so i don't get sound when i dial 6000 .

so please help me to get this answer.

regards
anita

quote=“IAX Man”]Understood.
Add this to your extensions.conf under you internal context so you can test it internally.

exten => 6000,1,Answer ;testing music on hold
exten => 6000,2,MusicOnHold()

Reload and dial 6000 from you phone.[/quote]

If you are using Asterisk 1.0.X you probably need to reinstall mpg123. I had some problems until I did a manual installation of mpg123 as described in http://www.voip-info.org/wiki/index.php?page=Asterisk+config+musiconhold.conf

What I don’t understand is all the talk about built in moh. The default configuration in a fresh install does not work. I’ve seen many questions on the boards about this and no answers. All of them say to install madplay or mpg123 which means you have to modify the config in musiconhold.conf back to the old way. So what’s new? A default install comes with three .mp3 files and still the system says “… not found” or some such error.

Hi,

To those who don’t get sound. If you add the extension 6000 as above. Start * CLI in verbose mode “asterisk -rvvvvvv”.

What appears on the CLI when you dial 6000 from an extension?

Also what happens if you type “mpg123” at a system prompt?

RE: my sound quality problem …

I have setup this 6000 extension, no problem, can hear MoH … but for a few minutes I get crystal clear clear MoH then for a few minutes I get random clicking and popping. It keeps happening. I will try to work out how to record this … any instructions on how to do this gratefully rxd?

I have done a ps aux | grep mpg123 and this is what I get.

[root@asterisk ~]# ps aux | grep mpg123 root 2176 0.0 0.2 5768 4580 ? S Mar01 0:01 mpg123 -q -s --mono -r 8000 -b 2048 -f 4096 fpm-sunshine.mp3 fpm-calm-river.mp3 fpm-world-mix.mp3 root 6101 1.7 0.2 5768 4580 ? S 14:58 0:03 mpg123 -q -s --mono -r 8000 -b 2048 -f 4096 fpm-sunshine.mp3 fpm-calm-river.mp3 fpm-world-mix.mp3 root 6102 0.0 0.1 3872 2632 ? S 14:58 0:00 mpg123 -q -s --mono -r 8000 -b 2048 -f 4096 fpm-sunshine.mp3 fpm-calm-river.mp3 fpm-world-mix.mp3 root 6156 0.0 0.0 3756 728 pts/0 S+ 15:01 0:00 grep mpg123 [root@asterisk ~]#

I don’t know why I have 3 instances of mpg123 running?
We’ve downloaded the MP3s and played them on a PC and they all play fine.

Look forward to some more ideas…

Thanks, liam

Hi,

As a follow up to this:
I’ve had 4 internal SIP handsets with an external call (mobile) listening to the MoH and it goes between good quality and bad quality every few mins. All the music is in sync across all the calls and all the bad sounds happen across all the calls. The sounds are identical across all the phones at once, therefore, it must be an issue with the mp3 player/source.

One of my colleagues is a developer for some linux media player and he said the distortion doesn’t sounds like usual MP3 distortion i.e. it doesn’t sound like buffer problems.

I’ve disabled everything on the * box’s motherboard i.e. USB, COM, LPT etc. that may be causing interupt problems. I’ve tried assigning my Sangoma card it’s own IRQ etc. Still we get the same intermittant bad quality.

The * box is powered from an APC 2200VA UPS which is powered by a clean-earth spur directly from the incoming power feed. The PSU is an Enermax 480.

,liam

I seem to have a strange problem with musiconhold as well.

Here is the conf:

[default]
mode=mp3
directory=/var/lib/asterisk/mohmp3
application=/usr/local/bin/mpg123 -q -r 8000 -f 8192 -b 2048 --mono -s

If I type mpg123 at a command prompt I get a response from the program. Program permissions are set to 755.

If I start asterisk I get this error:

/usr/local/bin/mpg123 -q -r 8000 -f 8192 -b 2048 --mono -s: No such file or directory

No matter how I modify the musiconhold.conf asterisk will not find the file. I have tried symlinking the mpg123 file to different directories, put it into the path, etc.

I have tried modifying the line to read as follows:

application = /usr/local/bin/mpg123 -q -r 8000 -f 8192 -b 2048 --mono -s
application => /usr/local/bin/mpg123 -q -r 8000 -f 8192 -b 2048 --mono -s

but this does not change anything.

No music is played (obviously) and the version is 1.2.25

You might want to see the following thread; forums.digium.com/viewtopic.php? … usiconhold