Asterisk call recordings (was Re: [asterisk-tech] asterisk and SA regulation)

Steve Davies steve at
Fri Jun 2 16:25:21 SAST 2006

On 2 Jun 2006, at 14:37, Barry Gill wrote:

> > 2. We need to record calls. Apparently voice recordings are  
> inadmissable
> in court if they are not recorded in such a way so as to ensure the
> recordings can not be altered (ie. stored cryptographically on  
> dedicated
> hardware). Does anyone know the validity of this statement?

Here's what we do:

I create a directory that has extremely limited access to it.   
Specifically I make it 0100.

So for example:

	mkdir /var/log/asterisk/recordings
	chmod 0100 /var/log/asterisk/recordings

Within that directory I put a recordings.log file, that I give 0200  
permissions (--w--------)
I use chattr then to make that file append-only

So for example:

	mkdir /var/log/asterisk/recordings
	touch /var/log/asterisk/recordings/recordings.log
	chown -R asterisk:asterisk /var/log/asterisk/recordings
	chmod 0200 /var/log/asterisk/recordings/recordings.log
	chattr +a /var/log/asterisk/recordings/recordings.log
	chmod 0100 /var/log/asterisk/recordings

So now I have a file that you can't see - you have to know its name.   
And you can only append to it.    (Except of course if you are root)

Then, at the end of the recording - whilst the files are being  
soxmixed or whatever, I capture an md5sum of the file into the  
recordings .log.  Say something like this:

	md5sum $file >>/var/log/asterisk/recordings/recordings.log

That captures the MD5 at the time the file was originally created.

It would also be prudent to frequently take a copy of the  
recordings.log to securely kept offline storage.

Later the md5sum of the recording in question can be compared with  
the log to give a very good assurance that the recording hasn't been  

Now these steps haven't been tested in court - but I do think it  
would give a good assurance.


More information about the tech mailing list