<span>thx a lot russel...your hack actually works!! :)<br><br>Meanwhile I've found something about the musiconhold-conf-option "cachertclasses", which might help in starting a separate instance for every caller. however, that didn't really work for me... probably this option only works for mode=files?!
<br><br></span><span><a href="http://www.asterisk.org/doxygen/trunk/Config_moh.html">http://www.asterisk.org/doxygen/trunk/Config_moh.html</a><br><a href="http://lists.digium.com/pipermail/asterisk-commits/2007-November/017911.html">
http://lists.digium.com/pipermail/asterisk-commits/2007-November/017911.html</a><br><br></span><span>anyway, thx a lot for your suggestions :)<br><br>regards, <br>michael<br><br><br></span><div class="gmail_quote">On Jan 17, 2008 9:52 PM, Russell Bryant <
<a href="mailto:russell@digium.com">russell@digium.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">
Michael Kamleitner wrote:<br>> 10:00 I'm calling the pbx, musiconhold starts correctly to play the<br>> live-stream (almost live, with very small delay) - that's OK.<br>> 10:01 I hangup.<br>><br>> -- than I pause for 20 min --
<br>><br>> 10:20 I'm calling a second time. However moh now doesn't stream live, but<br>> starts to continue playing the stream from 10:01. This goes on for about<br>> 30secs, then the replay stops for a second and continues at the correct
<br>> position (once again, rather "live"). along I get this message at the<br>> console:<br><br></div><snip><br><div class="Ih2E3d"><br>> musiconhold.conf:<br>><br>> [default]<br>> mode=custom
<br>> application=/etc/asterisk/mohstream.sh<br>><br>> mohstream.sh<br>><br>> #!/bin/bash<br>> /usr/bin/wget -q -O - <a href="http://my.stream.com:8000" target="_blank">http://my.stream.com:8000</a> | /usr/bin/madplay -Q -z -o
<br>> raw:- --mono -R 8000 -a -12 -<br><br></div>Most players don't work quite correctly with Asterisk MOH. For it to work the<br>way you expect, the player you are using must throw away the audio when Asterisk<br>
isn't currently reading from the stream. There was a magic version of mpg123<br>(0.59r IIRC) that did that, and that is why it was the recommended version.<br><br>If you're reading from a raw TCP stream, then you can use the small streamplayer
<br>utility included with Asterisk. Otherwise, I don't really have a good<br>suggestion for you right now. I suppose that you could use some sort of hack to<br>ensure that music on hold is always playing so that the stream is being serviced.
<br><br>extensions.conf:<br><br>[moh_hack]<br><br>exten => hack,1,Answer<br>exten => hack,n,StartMusicOnHold(default)<br>exten => hack,n,While(1)<br>exten => hack,n,Wait(300)<br>exten => hack,n,EndWhile()<br>
<br>*CLI> originate Local/hack@moh_hack application Echo<br><br>--<br>Russell Bryant<br>Senior Software Engineer<br>Open Source Team Lead<br>Digium, Inc.<br><br>_______________________________________________<br>-- Bandwidth and Colocation Provided by
<a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br><br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">
http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br><br clear="all"><br>-- <br>Mag. Michael Kamleitner<br>- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
<br>E-Mail: <a href="mailto:michael.kamleitner@gmail.com">michael.kamleitner@gmail.com</a><br>Xing: <a href="https://www.xing.com/profile/Michael_Kamleitner">https://www.xing.com/profile/Michael_Kamleitner</a><br>- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
<br>Phone: +43 699 116 07 923<br>- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<br>Web: <a href="http://www.kamleitner.com">http://www.kamleitner.com</a>