Hi everybody!
I’m trying to enable music on hold feature and using the following extension:
exten => _[1-2],1,NoOp()
same => n,Dial(SIP/${EXTEN},30,m)
same => n,Playback(vm-nobodyavail)
same => n,Hangup()
But the music doesn’t play! At the same time when I use the MusicOnHold() Application it works:
exten => 3,1,NoOp()
same => n,Answer()
same => n,MusicOnHold()
same => n,Hangup()
MusicOnHold.conf content is:
[default]
mode=files
directory=/var/lib/asterisk/moh/1
Here’s the log (when calling from ext. 1 to ext. 2):
== Using SIP RTP CoS mark 5
– Executing [1@LocalContext:1] NoOp(“SIP/2-0000001e”, “”) in new stack
– Executing [1@LocalContext:2] Dial(“SIP/2-0000001e”, “SIP/1,30,m”) in new stack
== Using SIP RTP CoS mark 5
– Called SIP/1
– Started music on hold, class ‘default’, on channel ‘SIP/2-0000001e’
– SIP/1-0000001f is ringing
– Nobody picked up in 30000 ms
– Stopped music on hold on SIP/2-0000001e
– Executing [1@LocalContext:3] Playback(“SIP/2-0000001e”, “vm-nobodyavail”) in new stack
> 0x7f9190010bd0 – Probation passed - setting RTP source address to 172.25.115.109:8000
– <SIP/2-0000001e> Playing ‘vm-nobodyavail.alaw’ (language ‘ru_RU’)
> 0x7f9190010bd0 – Probation passed - setting RTP source address to 172.25.115.109:8000
– Executing [1@LocalContext:4] Hangup(“SIP/2-0000001e”, “”) in new stack
== Spawn extension (LocalContext, 1, 4) exited non-zero on ‘SIP/2-0000001e’
– Executing [h@LocalContext:1] Hangup(“SIP/2-0000001e”, “”) in new stack
== Spawn extension (LocalContext, h, 1) exited non-zero on ‘SIP/2-0000001e’
So it looks like music on hold work but in fact I can hear only regular dial tones
Could someone help me with this problem?