MOH as internet stream? Constantly streaming when not in use?

I have setup FreePBX to use an internet stream and everything works ok, only problem is that the internet stream appears to be live 24/7. Is there any way to stop the stream when not in use (ie 99% of the time).

Also, it appears that for every call on hold it opens a new stream.

How do I stop the internet stream when not in use?


Any ideas?
How do I stop the internet stream when not in use?

Not easily I think :slight_smile:

Here is some info on streaming.

Streaming MoH really is an Asterisk function so FreePBX does not have much control of the process. If the stream was not constant when you put a call on hold the system would have to start each time you needed it which would cause a delay in starting the audio.

Streaming MOH Radio station using ffmpeg with PREMIUM QUALITY
This works with Centos 7 and latest Asterisk 13 and Freepbx 13

  1. install ffmpeg: > yum install ffmpeg

  2. file: /scritps/


#change to yes enable debugging output

if [ “$DEBUG” = “yes” ] ; then
exec 2>/dev/null
exec $PLAYER -i “$1” -ar 8000 -ac 1 -acodec pcm_s16le -f s16le -af “volume=0.5” pipe:1

  1. script executable -> chmod +x /scritps/

  2. In the freepbx gui -> Settings -> Music On Hold

Type: Custom Application
Application: /scripts/
Optional Format: slin