<span>thx a lot russel...your hack actually works!! :)<br><br>Meanwhile I&#39;ve found something about the musiconhold-conf-option &quot;cachertclasses&quot;, which might help in starting a separate instance for every caller. however, that didn&#39;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 &lt;
<a href="mailto:russell@digium.com">russell@digium.com</a>&gt; 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>&gt; 10:00 I&#39;m calling the pbx, musiconhold starts correctly to play the<br>&gt; live-stream (almost live, with very small delay) - that&#39;s OK.<br>&gt; 10:01 I hangup.<br>&gt;<br>&gt; -- than I pause for 20 min --
<br>&gt;<br>&gt; 10:20 I&#39;m calling a second time. However moh now doesn&#39;t stream live, but<br>&gt; starts to continue playing the stream from 10:01. This goes on for about<br>&gt; 30secs, then the replay stops for a second and continues at the correct
<br>&gt; position (once again, rather &quot;live&quot;). along I get this message at the<br>&gt; console:<br><br></div>&lt;snip&gt;<br><div class="Ih2E3d"><br>&gt; musiconhold.conf:<br>&gt;<br>&gt; [default]<br>&gt; mode=custom
<br>&gt; application=/etc/asterisk/mohstream.sh<br>&gt;<br>&gt; mohstream.sh<br>&gt;<br>&gt; #!/bin/bash<br>&gt; /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>&gt; raw:- --mono -R 8000 -a -12 -<br><br></div>Most players don&#39;t work quite correctly with Asterisk MOH. &nbsp;For it to work the<br>way you expect, the player you are using must throw away the audio when Asterisk<br>
isn&#39;t currently reading from the stream. &nbsp;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&#39;re reading from a raw TCP stream, then you can use the small streamplayer
<br>utility included with Asterisk. &nbsp;Otherwise, I don&#39;t really have a good<br>suggestion for you right now. &nbsp;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 =&gt; hack,1,Answer<br>exten =&gt; hack,n,StartMusicOnHold(default)<br>exten =&gt; hack,n,While(1)<br>exten =&gt; hack,n,Wait(300)<br>exten =&gt; hack,n,EndWhile()<br>
<br>*CLI&gt; 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> &nbsp; <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>