[asterisk-users] Better way of streaming radio than "musiconhold" for Asterisk 17.4 ?
lardconcepts at gmail.com
Sun May 3 06:46:23 CDT 2020
Way back in 2016 the only way to allow callers to listen in to a stream "at
will" was to do the following:
application=/usr/bin/mplayer https://example.com/stream.mp3 -quiet -ao
pcm:file=/dev/stdout -af volume=5,resample=8000,channels=1,format=alaw
exten => radio,1,Verbose(1, Entered radio context)
same => n,Set(VOLUME(TX)=1)
same => n,WaitExten(27006,m(radio))
same => n,Goto(#,1)
It kind of works, but two problems here:
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.
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).
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?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the asterisk-users