Archivedir

From AllStarLink Wiki
Jump to navigation Jump to search

Audio Archiver

Archivedir is a simple log and audio recorder. It creates a series of audio recordings, one each for an active COR on the node and named with file date and time down to the 1/100th of a second. This is useful in debugging, policing or other creative things.

Setup

In rpt.conf under your node stanza place:

[1999]
archivedir = /var/log/asterisk/ 

The directory can be of your choosing. It must exist and must have ownership / rights for Asterisk. For older versions of AllStar you may need to create additional subdirectories. Current AllStar will create the node number subdirectory for you. You want to end up with a subdirectory for each node# so each node has its own archive of audio recordings.

/var/log/asterisk/1999
/var/log/asterisk/1997

Usage

Restart Asterisk and you're all set. AllStar will create a recording for each COR activation and a daily log file. The recordings are named 20221216115590.WAV for example. Note that .wav and .WAV are not the same exact format. Download and erase the .WAV files. Windows users like WinSCP for that. Audacity (Mac, Windows & Linux) will playback .WAV files.

The log file is named for example 20221216.txt with contents that look similar to this:

20221216112549,TXUNKEY,MAIN
20221216112800,RXKEY,29285
20221216112800,TXKEY,MAIN
20221216112800,RXUNKEY,29285
20221216112800,TXUNKEY,MAIN
20221216112801,LINKDISC,29285

The log is not very in depth. But it shows connects, disconnects and which node made a transmissions. Often you will need to listen to the audio to tell exactly what happened when trying to trace some things down. But you have a time stamp to make that easier.

You must take care if running this long periods of time as the audio files will consume a lot of space. One option is to use archivedir = /tmp/ because if it fills up a reboot will clear the files and you'll have you node operational again. Ofcourse it's best to not let it get out of hand in the first place. Also see asterisk logger. Note the dangerous warnings provided with the use of the asterisk logger.