If you have in musiconhold.conf cachertclasses=yes then it will only pull one stream. Below is what you can try:
musiconhold.conf [general] cachertclasses=yes ; use 1 instance of moh class for all users who are using it, preferchannelclass=no ; Needed so that we use what's set in MusicOnHold() and not the channel default [default] mode=files directory=moh [my_station] mode=custom application=/etc/asterisk/my_station.sh my_station.sh #!/bin/bash /usr/bin/ffmpeg -i '<STREAM_URL_HERE>' -vn -ar 8000 -ac 1 -f s16le - echo "[$(date +%F) $(date +%T)] $0" >> /tmp/streams_down #Log downed streams. sleep $(( ( RANDOM % 60 ) )) #This is extremely important as if it's not here the repeat will lockup a core on the box On Wed, May 16, 2018 at 5:34 PM, Glenn Geller (VDOPh) <[email protected]> wrote: > Hi Mike, > > Technically, it's possible. It takes a bit of work to extract the right > stream links from the playlist file, and some services hide this from > sight, best they can. > > We tried to do a similar thing, streaming smoothjazz.com radio through > Askerisk, as MOH. > > What we found was that the way Asterisk works (or worked originally, when > we tested), it tries to open a new socket for each MOH "session", and > they'd see multiple sessions from our IP address, and eventually block the > IP. > > What we did to alleviate this, was install a locally controlled Icecast > server used as a "relay", which pulls 1 stream from them, and allows us to > pull multiple streams (relays) from the server... never been blocked since. > > As far as the legality is concerned, technically ANY music for "public > consumption" requires a performance license of some kind. However, as long > as they'e not a huge company, and just using for hold music, or internal > office music... should be fine. > > Good luck! > > > > *Glenn Geller* > > *VDO-Ph International* > > On Wed, May 16, 2018 at 8:02 AM Mike Diehl <[email protected]> wrote: > >> Hi all, >> >> I have a user who would like to stream their favorite radio station from >> iHeart radio for their music on hold. >> >> It this TECHNICALLY possible? If so, any pointers would be appreciated. >> >> Is this LEGAL in the US? >> >> Thanks in advance, >> >> Mike. >> -- >> _____________________________________________________________________ >> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- >> >> Check out the new Asterisk community forum at: >> https://community.asterisk.org/ >> >> New to Asterisk? Start here: >> https://wiki.asterisk.org/wiki/display/AST/Getting+Started >> >> asterisk-users mailing list >> To UNSUBSCRIBE or update options visit: >> http://lists.digium.com/mailman/listinfo/asterisk-users > > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Check out the new Asterisk community forum at: https://community.asterisk. > org/ > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
