Chet W. Stevens
2013-Jan-18  15:22 UTC
[asterisk-users] Only silence trying to play streaming MOH
I am having trouble getting streaming MOH to work. As far as I can tell I have
everything configured properly but there is only silence. Your help is
appreciated. I am running Asterisk 1.8.11-cert10 with mpg123 1.12.1 to play the
stream (I have tried
madplay, and mpg321, and I compiled streamplayer as well with the same results).
I started by finding a working stream and tested this from the shell (and Winamp
just to be sure):
/usr/bin/mpg123 -q -r 8000 -f 8192 --mono -s http://208.77.21.15:11510
It begins dumping the stream to the screen so I feel pretty confident this is
working.
In musiconhold.conf I have:
[default]
mode=files
directory=moh
sort=random
[test]
mode=custom
; Note that with mode=custom, a directory is not required, such as when reading
; from a stream.
;directory=/var/lib/asterisk/mohmp3
application=/usr/bin/mpg123 -q -r 8000 -f 8192 --mono -s
http://208.77.21.15:11510
CLI> moh reload
CLI> moh show classes
Class: default
        Mode: files
        Directory: moh
Class: test
        Mode: custom
        Directory: nodir
        Application: /usr/bin/mpg123 -q -r 8000 -f 8192 --mono -s
http://208.77.21.15:11510
        Format: slin
After the moh reload I see the mpg123 process running:
ps aux | grep mpg
myuser  10183  0.0  0.0  14184  1020 ?        S    07:07   0:00 /usr/bin mpg123
-q -r 8000 -f 8192 --mono -s http://208.77.21.15:11510
Then in extensions.conf I added:
exten => 1234,1,NoOp()
same => n,Answer()
same => n,MusicOnHold(test)
same => n,Hangup()
CLI> dialplan reload
Then I dial:
  == Using SIP RTP CoS mark 5
  == Using UDPTL CoS mark 5
    -- Executing [1234 at features:1] NoOp("SIP/mysip_4405-0000001f",
"") in new stack
    -- Executing [1234 at features:2] Answer("SIP/mysip-0000001f",
"") in new stack
    -- Executing [1234 at features:3]
MusicOnHold("SIP/mysip-0000001f", "test") in new stack
    -- Started music on hold, class 'test', on channel
'SIP/mysip-0000001f'
I hear just dead air. I have tried different settings for buffering the stream,
other stream sources, other players, defining a directory with a 0 byte file as
some tutorials suggest, streaming to a file, etc but always with the same
results. Dead
silence. Thank you for your help.
Chet Stevens
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.digium.com/pipermail/asterisk-users/attachments/20130118/e93f67cd/attachment.htm>
