Asterisk: Tips on handling a large volume of call recording

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.  

LVL 53
Who is Participating?
kode99Connect With a Mentor Commented:
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.
PhonebuffConnect With a Mentor Commented:
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.

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.
Never miss a deadline with

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

_agx_Author Commented:
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?
kode99Connect With a Mentor Commented:
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.
_agx_Author Commented:
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?
_agx_Author Commented:
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.)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.