Archivedir: Difference between revisions

From AllStarLink Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
archivedir is a simple log and recorder.


Placed in rpt.conf
== 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.  


archivedir= /etc/asterisk/log/
=== Setup ===
In rpt.conf under your node stanza place:


Note: It will create a subdirectory from the stated path with the node# so each node has it's own archive.
<pre>
[1999]
archivedir = /var/log/asterisk/
</pre>


i.e. /etc/asterisk/log/1999
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.
The chosen directory must have ownership / rights for asterisk.
<pre>
 
/var/log/asterisk/1999
It will create 2 things. A daily log file that the contents look similar to this...
/var/log/asterisk/1997
</pre>


=== 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 [https://winscp.net/eng/index.php WinSCP] for that. [https://www.audacityteam.org Audacity] (Mac, Windows & Linux) will playback .WAV files.


The log file is named for example 20221216.txt with contents that look similar to this:
<pre>
20221216112549,TXUNKEY,MAIN
20221216112549,TXUNKEY,MAIN
20221216112800,RXKEY,29285
20221216112800,RXKEY,29285
20221216112800,TXKEY,MAIN
20221216112800,TXKEY,MAIN
20221216112800,RXUNKEY,29285
20221216112800,RXUNKEY,29285
20221216112800,TXUNKEY,MAIN
20221216112800,TXUNKEY,MAIN
20221216112801,LINKDISC,29285
20221216112801,LINKDISC,29285
</pre>


The log file is named by date look like this:
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.  
 
20221216.txt
 
 
And 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.
 
20221216115590.WAV  (note that .wav and .WAV are not the same exact format)
 
Unfortunately, the log is not very in depth. But can show connects and disconnects and 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 HDD space.
 
This can be useful in debugging, policing or other creative things.
 
Also see the asterisk 'logger' http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/Monitoring_id264504.html


But note the dangerous warnings provided with the use of this 'asterisk logger'.
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
<code>archivedir = /tmp/</code> 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 [http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/Monitoring_id264504.html asterisk logger]. Note the dangerous warnings provided with the use of the asterisk logger.

Latest revision as of 14:24, 7 October 2023

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.