Music on hold and streams

I have tried a number of combinations to get music on hold to work with streams, such as shoutcast. I have read quite a few entries on the wiki and other sources and it seems that there are many recommendations (all different) but none have worked for me.

Does anyone have a quick recipe for doing this? I’m running 1.4.19. Thanks.

Anyone have any help here? I’ve run out of ideas. I’m trying to implement MOH using streams from an online source such as shoutcast.

I realise that this post I’m replying to is a little old, but I thought having finally “cracked it”, I might as well post what I’ve done.

https://github.com/lardconcepts/asterisk-digitalocean-voipfone-config/blob/master/moh-switching.md

Can someone please take a quick look and see if there’s anything I could
have done better or more efficiently, or if anything stands out as
particularly horrific?

Basically, it uses an app called crudini to add sections to
musiconhold.conf, then does an moh reload.

When the user has finished listening and presses * then the remote
extension is dropped and the caller returns to the current menu.

The nice thing about this is that even if two callers call and listen to
the same moh stream, when one hangs up, even though it deletes the config
and reloads moh, Asterisk is nice to the other caller and they keep
listening.

The end result is what I wanted, which is to not have any extra CPU load or
network usage when no-one is listening. And if more than one person is
listening, it’s still only “using” one remote stream, as I’ve uncommented
the cachertclasses value.

[general]
cachertclasses=yes ; use 1 instance of moh class for all users who are using it

As a little bonus, I’ve put what I think is a clever little "menu maker"
in, which grabs and caches short audio files using the free plan from
voicerss.org.

If anyone wants to try it in practice, call UK +44 20 36 37 60 70 - this
number is working as of now and I’ll leave it up as long as I can, but if you’re reading this in a few weeks, don’t expect
it to work! (I’m allowed to use these streams before anyone panics!).