[Asterisk-Users] Newbie MusicOnHold issues

James Bean james at hdcs.com.au
Sat Dec 11 07:54:22 MST 2004


Hi Everyone, Merry Christmas :-)....

My Asterisk Box doesn't have a sound card, it is running

Asterisk 1.02
Zaptel 1.02
Libpri 1.02
Mpg123 0.59r

All compiled from source with kernel 2.6.9-1.6 on Fedora Core 2

Any help would be very much appreciated.....

The error I am getting is

    -- Executing WaitMusicOnHold("SIP/snom-james-849d", "30") in new
stack
Dec 12 00:27:29 WARNING[409616]: res_musiconhold.c:366 moh1_exec: Unable
to start music on hold (class '30') on channel SIP/snom-james-849d
  == Spawn extension (sip, 098, 1) exited non-zero on
'SIP/snom-james-849d'

/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

I also tried doing a

default => custom:/var/lib/asterisk/mohmp3,/usr/bin/mpg123 -z -q -r 8000
-f 8192 -b 2048 --mono -s

/etc/asterisk/extensions.conf
[pstn]

exten => s,1,NoOp(Comment Only: Call from ${CALLERIDNUM}) ; Just put a
comment in the CLI for info.
exten => s,2,SetMusicOnHold(random)
exten => s,3,Dial(SIP/snom-james&SIP/bt-karen,45,t) 
exten => s,4,Hangup

[internal]

exten => i,1,Playback(invalid)
exten => i,2,Hangup
exten => t,1,Hangup

exten => 098,1,WaitMusicOnHold(5)
exten => 099,1,Echo     ;simple echo test when you dial 099 on your
phone

include => outgoing
include => sip

[outgoing]

exten => _9X.,1,Dial(Zap/g1/${EXTEN:1})
exten => _9X.,2,Congestion()
exten => _9X.,3,Hangup

[sip]

exten => 690,1,SetMusicOnHold(random)
exten => 690,2,Dial(SIP/snom-james,30,tr)
exten => 690,3,voicemail2,u690
exten => 690,102,voicemail2,b690

exten => 691,1,SetMusicOnHold(random)
exten => 691,2,Dial(SIP/bt-karen,30,tr)
exten => 691,3,voicemail2,u691
exten => 691,102,voicemail,b691

include => internal
include => outgoing

[from-sip]

include => internal

/etc/asterisk/sip.conf
[general]
port = 5060
bindaddr = 192.168.69.1
context = sip
disallow = gsm
allow = alaw
disallow = ulaw
nat=disable
srvlookup=no
localnet=192.168.69.0/255.255.255.0
subscribecontext = sip

[snom-james]
type=friend
secret=<apassword>
host=dynamic
callerid="James Bean" <690>
defaultip=192.168.69.250
dtmfmode=rfc2833
mailbox=690

[bt-karen]
type=friend
secret=<apassword>
host=dynamic
callerid="Karen Colomb" <691>
defaultip=192.168.69.251
dtmfmode=info
mailbox=691



More information about the asterisk-users mailing list