By default, queues configured in FreePBX save the files in the “/var/spool/asterisk/monitor” directory, using the following logic:
This results in filenames like “q400-20121128-085759-1354111073.263109.WAV”
This method works fine, but results in massive numbers of files in one directory if you are doing any volume of call recording. To wit, we are up to 260,000 files in less than three years. As you can imagine, disk performance when retrieving recordings suffers as a result.
A better solution would be to store the recordings by month and by date, such that we end up with many directories with a few files in each, rather than one directory with a HUGE number of files in it.
Many have implemented shell scripts to move the files to folders by year, month, and date, which also works, but is unnecessarily cumbersome. It would be much easier to simply store the files by folder in the first place by changing the “Set(MONITOR FILENAME” instruction.
I would propose that the instruction be changed to something like:
If I have put it together correctly, that would result in calls for November 28, 2012 being stored in the directory “/var/spool/asterisk/monitor/2012-11/28/” with the same filename that is currently being used.
This could be accomplished today by overriding the queue entry, but that is less than elegant and might cause issues with updates to FreePBX.
Would it be possible to change the default, or barring that, add an option where we could specify a custom monitor filename for our queue(s)?
Tom