User Tools

Site Tools


Sidebar

Welcome

General Policies

Knowledge Base

Provisioning Guides

Firmware Updates

FAQ's

Engineering Docs

kb:audio-services

Audio Services Setup

So you want to host an audio service on the HH network? HHOPS does not care about the content so long as it is appropriate for minors who may dial it. Anything found to be to the contrary will be investigated by HHOPS and the audio service number reclaimed.

What do I need to host?

To host an audio stream, you will require the following:

  • An Asterisk-based PBX (sorry no 3CX)
  • UDP port 4569 forwarded inbound to your PBX on your firewall
  • A public DNS hostname for your PBX (sorry we will NOT accept an IP address)
  • An audio source (usually a MOH class) defined in your MOH config
  • A call queue to host the MOH class audio within
  • An inbound route for the assigned 7xxx audio services number you receive from HHOPS
  • Open an HHOPS ticket to properly request a 7XXX assignment for your audio

I have an audio stream, How to set it up on my PBX as a MOH class?

To setup an existing audio stream within the MOH (Music on Hold) facility on your PBX, do the following (within FreePBX):

Go to “SETTINGS”, then “Music On Hold”, then “Add Category”, give it a name, then change “Type” from “Files” to “Application”. In “Category Name” give it a short name, then save it.

Once saved, go back and click on it, and in the “Application” field, put the following:

/usr/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 1024 http://mywebstream:8000/mountpoint

In the above example, you would use your own stream URL. Once entered, leave “Optional Format” clear and click SAVE. Now go create your call queue, set the new MOH class you just defined, and then create an INBOUND route to send matched calls from your 7xxx number to go straight to your new queue.

At this point, your audio feed is ready to be live on HH as soon as HHOPS assigns your 7xxx number.

Periodic Audio Reboot Cron

Some users have reported that from time-to-time their audio stream suddenly stops streaming for an unknown reason and the only way to get it to start again is to either reload the fwconsole or reboot their PBX.

Users who experience this phenomenon can easily install a cron job to reload the fwconsole automatically on a timed basis.

The procedure is to create a shell script called reload.sh

Save this file in the /root directory.

Place the following code into the shell script file.

#!/bin/bash

export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin"

fwconsole reload

Now add a cron job schedule that will run however often you want the fwconsole to reload. For example, if you want to reload the fwconsole every morning at 2:30am on your PBX, then you would add the following to your cron job schedule:

30  2  *  *  *  /root/reload.sh  >/dev/null 2>&1

That will call up the script every day at 2:30 am on your PBX and cause the fwconsole to reload and restart any audio stream that might have stopped.

The last part of the cron command: >/dev/null 2>&1 tells linux to suppress any output to the screen or email system so you don't get notices every day that the script ran. If you do want those notices, then leave that last part off of your cron job.

kb/audio-services.txt · Last modified: 2022/07/08 14:51 by kg6baj