Streaming Your Allstar Node to Broadcastify
- A working Allstar node running the latest HamVoIP release on a Raspberry Pi 2 or 3.
- You have applied and have been granted a feed at Broadcastify.com.
Note: This method is only for streaming your node’s audio (transmit and receive) to Broadcastify. This is NOT for using the Pi to broadcast another audio source.
Before beginning be sure to backup your Allstar installation (or clone the entire SD card) so you can easily restore your node if you screw it up.
You will need the following package installed to proceed:
- lame ( should already be installed, but do it again anyway)
This has recently been simplified into one self-installing package. At the linux shell prompt type:
pacman -Syu hamvoip-ezstream
Create (preferably using WinSCP) the file /etc/ezstream.xml and copy and paste the following text:
Then edit the ####### entries above with your audio server URL, mountpoint, password, feed name and description as defined by the Technicals tab in your Broadcastify account. Make sure there is a line feed after the </ezstream> at the end.
Next, edit your /etc/asterisk/rpt.conf file and add the following line within the node stanza of the node you wish to broadcast. Note: This must be all on a single line:
outstreamcmd=/bin/sh,-c,/usr/bin/lame --preset cbr 16 -r -m m -s 8 - - 2> /tmp/stream.status | /usr/local/bin/ezstream -qvc /etc/ezstream.xml
Restart Asterisk and the feed should go live. At the shell prompt you can run
ps ax to check the running processes.
Sometimes the Ezstream process dies and causes the CPU usage to skyrocket. To restart Ezstream do
kill -9 `pidof ezstream`
Because ezstream is tied into Allstar and running as a child program to it through lame you need to shut things down in a proper way when you restart Asterisk. What you are seeing is exactly what happens when you don’t shut things down properly when running ezstream. I run ezstream here on a separate Pi by itself for that reason. That is a little overkill but I run heavily used hubs here and I don’t want ezstream interfering with their operation. Running it on a separate server also allows you to connect it very easily to whichever audio you want to broadcast. Here is a script – you can call it asterisk-restart.sh to restart asterisk. So instead of doing an Asterisk restart – astres.sh – you would run this script to restart Asterisk.
killall -9 lame
killall -9 ezstream