<div dir="auto">Hi Jonathan,<div dir="auto"><br></div><div dir="auto">I'd probably go down the external media route in the ARI now - you make your own RTP server and provide your own RTP back to asterisk </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 3 May 2020, 13:07 Jonathan H, <<a href="mailto:lardconcepts@gmail.com">lardconcepts@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Way back in 2016 the only way to allow callers to listen in to a stream "at will" was to do the following:<div><br></div><div>moh.conf<br><br><font face="monospace">[radio]<br>mode=custom<br>application=/usr/bin/mplayer <a href="https://example.com/stream.mp3" target="_blank" rel="noreferrer">https://example.com/stream.mp3</a> -quiet -ao pcm:file=/dev/stdout -af volume=5,resample=8000,channels=1,format=alaw</font><br><br>extensions.conf<br><br><font face="monospace">exten => radio,1,Verbose(1, Entered radio context)<br> same => n,Set(VOLUME(TX)=1)<br> same => n,WaitExten(27006,m(radio))<br> same => n,Goto(#,1)</font><br></div><div><font face="monospace"><br></font></div><div><font face="arial, sans-serif">It kind of works, but two problems here:</font></div><div><font face="arial, sans-serif">It's pulling data 24x7, giving the radio host artificial stats - all rather needless as maybe one or two people might listen for 10 mins each in a day.</font></div><div>And even though mplayer seems to stay up and running all the time, sometimes Asterisk will stop listening on that pipe and everything needs a restart (random, less than once a week).</div><div><br></div><div>Is there a more modern/sensible way of achieving the same, just ensuring that stream plays if someone listens, isn't playing when no-one is listening, and listening can be exited with a specified key?</div><div><br></div><div>Thanks!</div></div>
-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" rel="noreferrer noreferrer" target="_blank">https://community.asterisk.org/</a><br>
<br>
New to Asterisk? Start here:<br>
<a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer noreferrer" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Getting+Started</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" rel="noreferrer noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a></blockquote></div>