[Asterisk-Users] (Yet another) Music on hold problem and another...

Neil A. Hillard asterisk at dana.org.uk
Tue Mar 15 13:20:09 MST 2005


Hi,

         I've recently installed Asterisk and have got the majority of it
configured (what an excellent piece of software it is, too), but I'm
having a couple of problems.

         The first one is with music on hold!  I've downloaded and
installed mpg123 as specified:

># whereis mpg123
>mpg123: /usr/local/bin/mpg123

It's the correct version:

># /usr/local/bin/mpg123 --longhelp
>High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2 and 3.
>Version 0.59r (1999/Jun/15). Written and copyrights by Michael Hipp.
>Uses code from various people. See 'README' for more!
>THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!

I start asterisk with this configured in musiconhold.conf:

>;
>; Music on hold class definitions
>;
>[classes]
>default => mp3:/usr/local/asterisk/var/lib/asterisk/mohmp3

and I have the supplied sample MP3s in the directory:

># ls /usr/local/asterisk/var/lib/asterisk/mohmp3
>fpm-calm-river.mp3  fpm-sunshine.mp3  fpm-world-mix.mp3

Asterisk seems to starts mpg123 (and its fork):

># ps ax | grep mpg
> 5846 pts/0    S+     0:02 mpg123 -q -s --mono -r 8000 -b 2048 -f 8192
>fpm-world-mix.mp3 fpm-sunshine.mp3 fpm-calm-river.mp3
> 5847 pts/0    S+     0:00 mpg123 -q -s --mono -r 8000 -b 2048 -f 8192
>fpm-world-mix.mp3 fpm-sunshine.mp3 fpm-calm-river.mp3


The odd thing that happens is that I've got the following in
extensions.conf for testing purposes:

>exten => 400,1,Ringing
>exten => 400,2,Wait,2
>exten => 400,3,Answer
>exten => 400,4,MusicOnHold()

Using X-Lite to dial extension 400, I hear it ring and then get answered
and I hear about 0.1 of a second of the on hold music and then silence.
If I use the 'line 1' button to put the call on hold and then take it
off again I hear another 0.1 of a second of the music.  This happens
every time.

Thinking that it might have been mpg123, I compiled up madplay 0.15.2b
and this exhibits the exact same problem.

I can see that mpg123 (or madplay) are producing output whilst there is
a call requiring music:

># strace -p 5847
>Process 5847 attached - interrupt to quit
>write(1, "\323\375\217\376\265\377\364\376h\377\33\376\273\375\362"...,
>32768) = 32768
>write(1, "\236\10\1\10\224\5\350\1\6\1\344\2\312\3773\0\355\2P\0"...,
>32768) = 32768
>write(1, "\'\375\355\373B\373\355\373\230\374+\377\10\0W\1\265\1"...,
>32768) = 32768

But I can only hear 0.1s at a time !!!

Does anyone have any ideas ???  I'm currently running Asterisk 1.0.6 on
a bog standard Fedora Core 3 (updates are downloading as I type).

My other problem is with DTMF tones - I seem to be unable to use DTMF
tones when receiving a call through sipgate.  Asterisk is receiving
voice as I can leave a voicemail.  Whilst recording a voicemail and
pressing the telephone keys, I hear about the first 0.1s of the DTMF
tone and then it mutes.  It's as if something is detecting the tone and
muting the voice path.

I have tried with both dtmfmode = info and dtmfmode = inband in sip.conf
(as recommended by sipgate) but the same happens !!!  This means that
I'm unable to navigate through my menus !!!

Any advice would be seriously appreciated.

Many thanks in advance,


                                 Neil.

-- 
Neil A. Hillard                E-Mail:   asterisk at dana.org.uk



More information about the asterisk-users mailing list