Actions

Broadcastify-Calls-Trunk-Recorder

From The RadioReference Wiki

Install the Required Prerequisites

Don't skip this. **** YOU HAVE TO DO THIS *****

Ubuntu

  • libssl-dev
  • libcurl4-openssl-dev
  • fdkaac
  • sox
  • ntp
  • ntpstat
sudo apt-get install libssl-dev libcurl4-openssl-dev fdkaac sox ntp ntpstat

Mac OS X

brew install fdk-aac-encoder sox


Download and Build Trunk Recorder

You need to download and build the latest version of Trunk Recorder


Build instructions are here:


Make sure you have fdkaac and sox installed as listed above in the prereqs!

Apply for API Key and System ID

You will need an API Key and System ID assigned by the administrator before you can get started.

To get a System ID and API Key issued, submit an application here:

https://www.broadcastify.com/apply/calls

Configure Trunk Recorder

There are 3 configuration options

broadcastifyApiKey      : specified for each system entry in your trunk-recorder config
                          this is the API Key issued to you by the administrator

broadcastifySystemId    : specified for each system entry in your trunk-recorder config
                          this is the unique system identifier issued to you by the administrator

broadcastifyCallsServer : specified SYSTEMWIDE in your trunk-recorder config
                          should always be set to: "https://api.broadcastify.com/call-upload"

Example Trunk Recorder configuration

  • API Key Example: "9c3e3b1d-324f-11aa-bd8b-0ec68ab9ccec"
  • System ID Example: "91"
  • Note: The "ppm" and "gain" values are for example only. Use GQRX or similar to adjust them for your particular SDR sources and optimum SNR.
  • Note: The "shortName" value cannot have spaces or special characters; this will cause uploads to fail.
 The README.md file lists all the configuration options.
 More info can be found in the WIKI


{
	"sources": [{
		"center": 853000000.0,
		"rate": 2048000,
		"ppm": 69.0,
		"gain": 35.0,
		"digitalLevels": 3,
		"digitalRecorders": 4,
		"driver": "osmosdr",
		"device": "rtl=02,buflen=65536",
		"modulation": "fsk4"
	}],
	"systems": [{
		"control_channels": [851325000, 851825000],
		"type": "p25",
		"shortName": "mySystemName",
		"broadcastifyApiKey": "9c3e3b1d-324f-11aa-bd8b-0ec68ab9ccec",
		"broadcastifySystemId": "91",
		"audioArchive": false
	}],
	"broadcastifyCallsServer": "https://api.broadcastify.com/call-upload",
	"controlWarnRate": 5,
	"callTimeout": 0.75
}

Startup Scripts

MAC OS X

/Library/LaunchDaemons/org.username.tr.plist

Replace "username" with your Mac OS X Account username

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>EnvironmentVariables</key>
    <dict>
      <key>PATH</key>
      <string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:</string>
    </dict>
    <key>Label</key>
    <string>org.username.tr</string>
    <key>Program</key>
    <string>/Users/username/radio/trunk-build/start.sh</string>
    <key>RunAtLoad</key>
    <true/>
    <key>StandardErrorPath</key>
    <string>/tmp/org.username.tr.stderr</string>
    <key>StandardOutPath</key>
    <string>/tmp/org.username.tr.stdout</string>
    <key>UserName</key>
    <string>username</string>
</dict>
</plist>

/Users/username/radio/trunk-build/start.sh

#!/bin/sh
cd /Users/username/radio/trunk-build
./recorder --config=config.json

Load or Unload at Startup

sudo launchctl load -w /Library/LaunchDaemons/org.username.tr.plist
sudo launchctl unload -w /Library/LaunchDaemons/org.username.tr.plist

/Users/username/radio/trunk-build/restart.sh

#!/bin/sh
export PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:
killall recorder > /dev/null
cd /Users/username/radio/trunk-build
./recorder --config=config.json &

Crontab for auto-restart every 3 hours

0 */3 * * * /bin/sh /Users/username/radio/trunk-build/restart.sh > /dev/null