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'