FreePBX Call Recording File Format and Bitrate.

Introduction

In this article we will learn how to change the file format and bit rate for call recording files on a FreePBX server. This will allow you to save a lot of disk space without any noticeable loss in quality of the call recording files.

Before you start

Call recording is disabled by default on a FreePBX system therefore you might want to enable it, if you are going to experiment with call recording file formats. If you don’t know how to enable call recording, please read this article.

Download recording files

If you have the call recording enabled on your FreePBX, you can go to Reports -> CDR Reports and find all the recordings there. CDR reports web page allows you to either listen to the recordings online or download them to your PC. The files are stored in /var/spool/asterisk/monitor by default.

Default settings

Once you have downloaded the recording you can learn more about the properties of the audio file. By default, the recordings have the following parameters:

  • File Format – wav
  • Codec – PCM S16 LE
  • Bit Rate – 128kbps

The 1 minute of recording with such parameters will take about 1MB of disk space. The recording with such a bit rate provides a great sound quality, but takes a lot of disk space. It is possible to use another codec with a lower bit rate, which will provide almost the same sound quality, but the files will get about 10 times(!!!) smaller.

Recommended settings

Let’s switch to more efficient parameters for the recording files. Go to Settings -> Advanced Settings , scroll down to find Call Recording Format field and set it to WAV(uppercase letters). The default setting is wav(lowercase letters).

Click Submit and don’t forget to Apply Config.

When you set it to WAV, the recordings have the following parameters:

  • File Format – wav49
  • Codec – GSM
  • Bit Rate – 13kbps

The files will still have .wav extension and will be playable by any modern player. The codec used for the audio encoding is GSM which is different from PCM. GSM can provide very good quality of sound with only 13 kbps of bit rate. Notice, that the default bit rate was 128kbps and now you set it to 13kbps, which is almost 10 times less. The 1 minute of recording will now occupy only 100KB of disk space.

You can download the files in different formats and compare for yourself, but for the most of the scenarios the disk space saving far outweighs the negligible loss in quality.

Conclusion

Hope this will help you to solve disk space problem. Thank you for reading.

Add a Comment