Asterisk: Tips on handling a large volume of call recording

Posted on 2013-12-05
Last Modified: 2014-01-29
I'm looking for some general tips from the Asterisk pros on handling call recording in Asterisk. I realize every situation is different, but any

- general do's / don'ts?
- better/worse audio formats for records?
- how do you handle recordings of gabby people (ie long duration)
- storage strategies for recording files?
- memory considerations

I've already done a lot of googling :) so it'd be great to get some feedback from the based on past experience.  

Question by:_agx_
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
LVL 15

Assisted Solution

Phonebuff earned 100 total points
ID: 39701884
I have a customer who records everything on a given set of extensions.  We use mostly defaults on the PBXinaFlash / FreePBX build but we also have a custom script that runs on the 15th of the month from Cron and moves the previous months recordings, and a CDR dump to a NAS file system with a lot more storage and retention.  

Also, solves the PHP array issue with and speeds the page opening when there are tons of files.

LVL 25

Expert Comment

ID: 39718938
How large of a volume are you talking about?

We use gsm format which comes out around 1/10th the size of going directly to wav files.  So it makes long calls and overall storage demand fairly low.  The downside is that it is not as easy to playback as wav files.  

In our case we have a inhouse app that is essentially a softphone that que's up call recordings from a sql database for playback directly from Asterisk so the format is not a problem.

Even a current entry level server can handle a decent workload.  I don't think you will find scaling out for storage or processing to be that much of a issue unless you are needing to handle a really massive number of concurrent calls.

One problem that is mostly resolved these days was call recordings being dropped when a call was transferred.  It will probably be fine with any more recent Asterisk setup.  If you are doing a custom from scratch setup you will want to check this for sure.  Looks like Asterisk 12 (which is beta now) has got this resolved so it just always works.
LVL 52

Author Comment

ID: 39720291
Thanks for the responses guys.

It's not a massive amount, but the customer wants to record every call, which averages around 3-5k calls per month. Concurrency shouldn't be too high. Somewhere between 20-30 concurrent calls max. I just wasn't sure how adding call recording for every call would impact Asterisk overall.  

In our case we have a inhouse app that is essentially a softphone that que's up call recordings from a sql database for playback directly from Asterisk so the format is not a problem.

@kode99 - Interesting. So are you saying you storing the recordings in the db? How much storage are we talking about? Also, I assume it is on a separate db server?
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 25

Assisted Solution

kode99 earned 400 total points
ID: 39726377
No the recordings are in files,  but the filenames are put into the CDR data via a user field when the MixMonitor is started.  Then this is used to reference the recording for playback.

The user can then search the calls for date, time, line and incoming or outgoing calls and the application calls in and does the playback.  Works well as you can even speed up or skip ahead etc with the built in Asterisk functionality.

We handle a similar call volume but the majority of calls are fairly short.   I anticipate doubling the volume as we migrate off a older system and do not expect to have to upgrade the main Asterisk server at all.  It's a older quad core with probably 4 GB ram and likely only 240 GB storage or less.  I doubt it has ever broken a sweat.

About the only issue is that all the recording files are in one directory,  and there are too many because there is quite a bit of history left on the server.  If I revamp it I would break it up by date to make it more manageable.  When the backups run it does split the files up that way for archiving.
LVL 52

Author Comment

ID: 39726856
Ah, jump back/ahead is a nice feature. Hadn't thought of that.

How frequently do you archive (ie move audio off server), and what tools do you use? Cron job like Phonebuff mentioned or something different?
LVL 25

Accepted Solution

kode99 earned 400 total points
ID: 39757089
Sorry for the delay getting back,  had a big project's deadline moved up by a couple months.

We keep at least a year of audio on the asterisk server but it is all backed up daily.  We keep as much as possibly so old recordings can be pulled easily so likely more like 2 years or so at any given time.  The recording directory is setup as a samba share and the audio files are copied to a backup server daily.  I should probably automate the deletion but the drive is never close to capacity,  usually clear off 6 months at a time.

I run robocopy from the windows side,  a cron job is just as effective.  Only new files are copied so its a very small amount of traffic. The backup are scheduled for slow times.

Compared to managing video files the total storage needed is tiny, around 6-8 GB for a year for our call volume.  Even if it was recorded with wav format it's still very manageable with todays drive capacities.
LVL 52

Author Comment

ID: 39769203
Thanks for following up. (Sorry, its my turn to be caught up with a deadline. I'll try and get back to this on the w/e.)

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wanted to query Cisco Call Manager CDR records from MS SQL Server? Here's how! CUCM can be configured to upload a CDR file to a given FTP server every minute. This article will show you how to set this up, schedule the import of this data an…
Not everyone has adapted to a rapid advancement in technology; there are people who are reluctant or afraid to delve into this brave new world of IT. If you have a friend or a family member who suffers from the so-called technophobia, here is how yo…
Sending a Secure fax is easy with eFax Corporate ( First, just open a new email message. In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question