I previously published a rant in which I described some needs for a logging recorder for radio communications. When I’ve purchased logging recorders of this type for public safety (use use them to record all phone, radio and operator positions) it has come to $20,000+ for 32 channels. They come all setup and are a bit more sophisticated of course. But a price tag like that isn’t going to work for amateur radio and it certainly doesn’t make sense if I need to scatter these about the county to record what’s going on out there.

Here then is your cheap and easy solution. Edit your rpt.conf file and, in the stanza for the node you want to record, enter something like this:

archivedir=/var/log/audio

Yeah, it’s that easy. You do need to make sure that directory exists, or whatever directory you want to use. If it doesn’t exist then you’ll use the standard Linux command to create it:

mkdir /var/log/audio

Once you restart Asterisk or, from the Asterisk command line, enter “rpt reload” every single activity for that node is being recorded. In the directory you specified it will create a new directory with the number of the node.  In my case at home I’ve got /var/log/audio/27006 for node 27006 and /var/log/audio/29915 for that node as both are hosted by the same computer.

In those directories you will see that the system creates a new WAV file for every recording.   The file name is the time stamp of the beginning of each recording.  An example is 20140623074840.WAV which tells us that his recording is from Year 2014, Month 06, Day 23, Hour 07, Minute 48, Second 40.  (This is a good point to ask yourself: “Is my system configured to properly use NTP to sync with a reliable time server?”)

Also in the directory will be a text file, something like 20140623.txt  This file is a record of every action app_rpt knows for the channel for that day.  This includes such things as when it received a signal, when it transmitted one, what DTMF digits it received, what nodes it connected to.  Lots of stuff.

You would think that all these recordings would quickly fill a hard drive.  They really don’t, at least not as fast as I figured they would.  I’ve been connected to the WIN System and recording everything for three days and all that only consumed an additional 1% of my 80 GB hard drive.  That’s a busy system which has roughly 23 times the traffic of all of Bonner County public safety dispatch channels combined.

But keeping your house clean and tidy is a good thing so create a script, in whatever directory you keep your custom scripts and call this one what you like. Mine is record_clean and I keep it in /home/n7jct/bin

#!/bin/bash

#This script deletes audio recordings older than you want to keep.
#Adjust the value of the mtime option to set the number of days you
#wish to keep files for.
find /var/log/audio/27006/* -mtime +3 -exec rm {} \;
find /var/log/audio/27006/* -mtime +3 -exec rm {} \;

In this case the mtime option is set to keep 3 days of files. Everything else is flushed. Make the script executable and set it to run in cron at least once a day.

That’s it. I hope you find this useful. It has been for me.