Skip to main content
Skip table of contents

Use the Barix Instreamer as an MoH Source on FreePBX

Introduction

FreePBX is a widely used, open-source SIP/VoIP Server, developed by Sangoma. To configure Music on Hold (MoH) on a FreePBX we need to provide the audio stream in a certain Format. For that, we need to configure the Instreamer first, and then add the Stream to the Server configuration.

For further Information about FreePBX, check the documentation on https://www.freepbx.org/

Instreamer Configuration

To stream to a FreePBX Server we need to configure the Instreamer as following! In the Audio settings put in the following:

  • Set the Input Source to "Line mono"
  • Set the Audio Format to "MPEG1 / 48 kHz (MP3)"
  • Set the MPEG Bitrate Mode to "CBR"
  • Set the MPEG Bitrate to "128 kbps"

On the Streaming Settings there is only 1 thing we need to configure:

  • Set the Radio Path to /moh or the value you would like to have as a stream path!

Audio Settings

The Audio Settings can be changed, as long as the Instreamer is providing an MP3 stream! When selecting the lowest mp3 codec, the stream will use less bandwidth when sent to the server.

The quality is not important since the Server will downsample the audio to 8khz anyway!


FreePBX Configuration

To receive the configured stream on the SIP Server, we need the Instreamer to be accessible from the Server and configure the Music on Hold like the following:

  1. Login to the FreePBX Server
  2. Navigate to Settings > Music on Hold
  3. Create a new Category or change the default Category
  4. Change the Type to Custom Application
  5. Enter the following in the Application field (change <instreamer-ip>, with the Instreamers IP address):
    /usr/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 1024 http://<instreamer-ip>/moh

ffmpeg

As an alternative to mpg123 you can also use ffmpeg as an application! The application should be preinstalled at /usr/bin/ffmpeg

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.