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?

Thanks

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.

http://wiki.freepbx.org/display/F2/Music+on+Hold+User+Guide#MusiconHoldUserGuide-AddingStreamingMusic

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/mohplayer.sh

#!/bin/sh

#change to yes enable debugging output

DEBUG=no
PLAYER=/usr/bin/ffmpeg
if [ “$DEBUG” = “yes” ] ; then
PLAYER="$PLAYER -vvv "
else
exec 2>/dev/null
fi
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/mohplayer.sh

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

Type: Custom Application
Application: /scripts/mohplayer.sh http://icecast.omroep.nl/radio2-bb-mp3
Optional Format: slin

Cheers
Geert

2 Likes