Michael Kamleitner wrote:
> 10:00 I'm calling the pbx, musiconhold starts correctly to play the
> live-stream (almost live, with very small delay) - that's OK.
> 10:01 I hangup.
> 
> -- than I pause for 20 min --
> 
> 10:20 I'm calling a second time. However moh now doesn't stream live, but
> starts to continue playing the stream from 10:01. This goes on for about
> 30secs, then the replay stops for a second and continues at the correct
> position (once again, rather "live"). along I get this message at the
> console:

<snip>

> musiconhold.conf:
> 
> [default]
> mode=custom
> application=/etc/asterisk/mohstream.sh
> 
> mohstream.sh
> 
> #!/bin/bash
> /usr/bin/wget -q -O - http://my.stream.com:8000 | /usr/bin/madplay -Q -z -o
> raw:- --mono -R 8000 -a -12 -

Most players don't work quite correctly with Asterisk MOH.  For it to work the 
way you expect, the player you are using must throw away the audio when 
Asterisk 
isn't currently reading from the stream.  There was a magic version of mpg123 
(0.59r IIRC) that did that, and that is why it was the recommended version.

If you're reading from a raw TCP stream, then you can use the small 
streamplayer 
utility included with Asterisk.  Otherwise, I don't really have a good 
suggestion for you right now.  I suppose that you could use some sort of hack 
to 
ensure that music on hold is always playing so that the stream is being 
serviced.

extensions.conf:

[moh_hack]

exten => hack,1,Answer
exten => hack,n,StartMusicOnHold(default)
exten => hack,n,While(1)
exten => hack,n,Wait(300)
exten => hack,n,EndWhile()

*CLI> originate Local/[EMAIL PROTECTED] application Echo

-- 
Russell Bryant
Senior Software Engineer
Open Source Team Lead
Digium, Inc.

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to