[resolved] music on hold polycom hold button

I’m trying to test my music on hold internally and am having some problems. Originaly mpg123 was unable to open /dev/dsp but I have fixed that problem so mpg123 can now play the mp3 files in /var/lib/asterisk/mohmp3. I’m using alsa. I’m using Polycom 300SIP phones and when I call one phone to another and place it on hold I hear nothing, silence. I’m fairly new to asterisk. Also, if I dail extension 600 which I’ve setup for Musiconhold it connects to it but I, again, hear nothing. There are some strange warnings and notices produced also, I’ve included them at the bottom of this post. Any help would be great. Thanks ahead of time. BTW I’m using gentoo. Here are some related config files.

/etc/asterisk/musiconhold.conf


; Music on hold class definitions
;
[classes]
default => quietmp3:/var/lib/asterisk/mohmp3
;loud => mp3:/var/lib/asterisk/mohmp3
;random => quietmp3:/var/lib/asterisk/mohmp3,-z
;unbuffered => mp3nb:/var/lib/asterisk/mohmp3
;quietunbuf => quietmp3nb:/var/lib/asterisk/mohmp3
; Note that the custom mode cannot handle escaped parameters (specifically embedded spaces)
;manual => custom:/var/lib/asterisk/mohmp3,/usr/bin/mpg123 -q -r 8000 -f 8192 -b 2048 --mono -s

/etc/asterisk/sip.conf


[general]
port=5060
bindaddr=192.168.0.7
context=default
musicclass=default

[tele1]
type=friend
secret=tele1
host=dynamic
defaultip=192.168.0.15
mailbox=2345,1234
dtmfmode=rfc2833               
allow=ulaw                     
progressinband=no             

[tele2]
type=friend
secret=tele2
host=dynamic
defaultip=192.168.0.16
mailbox=1234
dtmfmode=rfc2833       
allow=ulaw                   
progressinband=no              

/etc/asterisk/extensions.conf


[general]
static=yes
writeprotect=yes

[globals]



[default]
exten => 11,1,Dial(SIP/tele1,20)
exten => 11,2,Voicemail(1234)

exten => 12,1,Dial(SIP/tele2,20)
exten => 12,2,Voicemail(1235)

;exten => 600,1,WaitMusicOnHold(30)

exten => 600,1,Answer
exten => 600,2,MusicOnHold()

WARNINGS AND NOTICES I’VE RECEIVED

Jun 12 23:07:55 NOTICE[8208]: channel.c:1724 ast_set_read_format: Unable to find a path from g729 to ula w Jun 12 23:07:55 NOTICE[8208]: channel.c:1691 ast_set_write_format: Unable to find a path from ulaw to g7 29 Jun 12 23:07:55 WARNING[8208]: chan_sip.c:1829 sip_write: Asked to transmit frame type 256, while native formats is 4 (read/write = 4/4) Jun 12 23:07:55 WARNING[8208]: chan_sip.c:1829 sip_write: Asked to transmit frame type 256, while native formats is 4 (read/write = 4/4) Jun 12 23:07:55 WARNING[8208]: chan_sip.c:1829 sip_write: Asked to transmit frame type 256, while native formats is 4 (read/write = 4/4) Jun 12 23:07:55 WARNING[8208]: chan_sip.c:1829 sip_write: Asked to transmit frame type 256, while native formats is 4 (read/write = 4/4) -- Started music on hold, class 'default', on SIP/tele2-17d9 -- Stopped music on hold on SIP/tele2-17d9 == Spawn extension (default, 12, 1) exited non-zero on 'SIP/192.168.0.7-081715e0'

bump

“Bump”??? Smart move! :wink:

Are you using the real mpg123? or mpg321 acting as mpg123?

Asterisk will work with mpg123, but not with mpg321.

That might look like a joke, but it’s not! :wink:

I had a look at installing mpg123 to try and get MOH working, but it just wasn’t viable. I can’t remember the details now, but it was something like it was impossible (or, at least, too hard to bother) building mpg123 for fedora core 3.

I ended up using madplay, which i had to install, but which works.

Have a look at

voip-info.org/tiki-index.php?pag … nhold.conf

for more information.

okay, I have fixed my codec problem. I can hear all the voicemail and if I call ext. 600 for MOH I can hear the music playing. However if I press the HOLD button on my polycom 300sip phones I hear no music. Asterisk does not come up and say that it is play hold music at all when I press the hold button. Any help?

How did you fix your codec problem? I have the same problem.
I bought an installation CD from Signate and install everything and Asterisk is working just fine except I don’t hear any voicemail or menus or MOH for that matter.
I also have to add that I have installed it on a Dell PowerEdge 750 with a TE110P card that is supposed to be “partialy incompatible” - maybe that is the partial part of it ? :smile:

Are you guys using the correct version of mpg123? I remember reading on voip-info that you should use a specific version with *. I have moh working just fine, and I’ve never gotten my sound to work in linux. But then again, getting sound working in linux has been a very low priority.

woody, thx for the reply, yeah I’m using the correct version of mpg. I can hear the music just fine when I dial the 600 extension I’ve setup for music on hold. I just can’t hear the music when I press the hold button on my polycom 300sip phones. I think it’s gotta be something to do with the phones or a setting I need in asterisk for these specific phones…

gventer, I fixed my codecs by downgrading to asterisk 1.0.6 and adding these lines in my sip.conf

[general]
disallow=all
allow=all

[111]
dtmfmode=rfc2833
disallow=all
allow=gsm
allow=alaw
allow=ulaw

I added these lines under [111] for each extension I have setup.

Make sure that you have gone into the /usr/src/asterisk/mpg123-0.59r directory and ran

make linux; make install

Then I made sure that I could play a sound using mpg123 by using after making sure asterisk was stopped first.

/usr/src/asterisk/mpg123-0.59r/mpg123 /Beastieboyssong.mp3

It played fine. Then I restarted my entire system and started asterisk and picked up a phone and dialed ext. 600 which I have setup like this in extensions.conf

exten => 600,1,Answer()
exten => 600,2,MusicOnHold(mymusic)
exten => 600,3,Hangup

This is how my musiconhold.conf is setup:

[classes]
mymusic => custom:/var/lib/asterisk/mohmp3,/usr/bin/mpg123 -q -r 8000 -f 8192 -b 2048 --mono -s

Still need help on my hold button on the polycom soundpoint 300 phones though… please… :wink:

I have a similar problem with Music On Hold. I set up and extension that uses the musiconhold function. It works fine. But when I call another extension and put it on hold the server says it started the music but there is no music.

grr… bump

bumpbumpbump

I upgraded to the newest version of asterisk using

cvs checkout asterisk zaptel libpri asterisk-addons asterisk-sounds

and in doing so it fixed my hold button problem on my polycom soundpoint 300 phones.