Here's how it usually goes. You enable campaign recording, calls get recorded, files land on disk. Six months later you're staring at 2 TB of WAV files, your compliance team is asking about PCI-DSS, a client wants recordings from 14 months ago that you already deleted, and you realize you never planned any of this.
Recording in VICIdial seems simple until it isn't. This is the stuff that matters in production.
The Storage Math
A 50-agent outbound operation running 8-hour shifts generates roughly 18,000 minutes of recorded audio per day. In WAV format (VICIdial's default), that's about 17.3 GB daily, or 380 GB per month. Annually, you're looking at 4.5 TB.
Switch to MP3 at 32 kbps and the numbers drop to about 47.5 GB/month — an 8-10x reduction. But there's a catch: MP3 encoding adds CPU overhead on the telephony server. At 50 concurrent recordings, expect 5-10% additional CPU utilization.
The practical recommendation: record in WAV for the active period when QA reviews, disputes, and compliance checks happen. Convert to MP3 for archival after 30 days. You get original-quality recordings when they matter and compressed storage for the long term.
Never let your recording partition exceed 80% utilization. Set monitoring alerts at 70% and 80%. At 95%, Asterisk recording starts failing silently — no error, no alert, just missing recordings that you won't notice until someone needs one.
WAV vs MP3: The Real Trade-Off
WAV (8 kHz, 16-bit, mono PCM) is about 960 KB per minute. No CPU overhead — the audio is already in PCM format from the Asterisk channel. Lossless quality. Every audio player and transcription service handles it natively. Some compliance frameworks require "original quality" recordings.
MP3 at 32 kbps is about 120 KB per minute. Smaller files, faster transfers, cheaper storage. But it requires the LAME encoder, adds CPU load, and some compliance frameworks reject lossy-compressed recordings.
If you're converting after the fact, a nightly cron job handles it:
#!/bin/bash
# Convert WAV recordings older than 30 days to MP3
# Run via cron: 0 2 * * * /usr/local/bin/convert_recordings.sh
RECORDING_DIR="/var/spool/asterisk/monitor/MIXmonitor"
ARCHIVE_DIR="/var/spool/asterisk/monitor/ARCHIVE"
find ${RECORDING_DIR} -name "*.wav" -mtime +30 | while read wavfile; do
mp3file="${ARCHIVE_DIR}/$(basename ${wavfile%.wav}.mp3)"
lame --quiet -b 32 --resample 8 "${wavfile}" "${mp3file}"
if [ $? -eq 0 ] && [ -f "${mp3file}" ]; then
rm "${wavfile}"
fi
done
Update the recording_log table with the new file location after conversion so VICIdial's playback links still work.
Compliance Isn't Optional
Consent laws. Federal law requires one-party consent (your agent counts). But 12 states require all-party consent: California, Connecticut, Delaware, Florida, Illinois, Maryland, Massachusetts, Michigan, Montana, New Hampshire, Pennsylvania, and Washington. If you dial into those states, disclose recording on every call. The safest approach: universal disclosure regardless of destination. "This call may be monitored or recorded for quality assurance purposes."
PCI-DSS. If agents take credit card payments, you cannot store recordings of card numbers spoken aloud (PCI-DSS Section 3.4). VICIdial supports pause/resume recording — the agent clicks Pause before collecting payment info, Resume after. Configure Recording Buttons in campaign settings. The catch: it relies on agent behavior. If they forget to pause, you have a compliance violation on tape. For high-volume payment processing, a dedicated IVR payment system that removes the agent during payment collection is safer.
HIPAA. Healthcare recordings containing PHI need access controls, audit trails (VICIdial's recording_access table handles this), encryption at rest (LUKS on the recording partition is the simplest approach), and encryption in transit (TLS/HTTPS). HIPAA doesn't specify a retention period, but requires a policy and consistent destruction when it expires.
Retention periods. No single federal mandate exists, but practical minimums by industry: TCPA litigation protection needs 4-5 years. Financial services (SEC Rule 17a-4) needs 3-6 years. Healthcare (HIPAA) needs 6 years. The cost of storing compressed recordings for 5 years in S3 Glacier is trivial compared to being unable to produce a recording when a lawyer asks.
Archival That Scales
For single-server setups, VICIdial's built-in AST_audio_archive.pl moves recordings to an archive directory after a configurable number of days. Simple and effective.
For clusters, rsync recordings from each telephony server to a central archive server. Use --remove-source-files to free local disk after successful transfer.
For long-term retention, push to S3. Organize by year/month. Use Standard-IA for 90-365 day old recordings ($12.50/TB/month), Glacier Instant Retrieval for 1-3 years ($4/TB/month), and Glacier Deep Archive for 3+ years ($0.99/TB/month). If recordings can't leave your infrastructure, MinIO provides S3-compatible object storage on your own hardware.
Troubleshooting the Common Failures
Recordings not being created? Check campaign recording setting (ALLCALLS or ALLFORCE), recording directory ownership (asterisk:asterisk, 755), disk space, and whether app_mixmonitor.so is loaded in Asterisk.
One-sided or silent recordings? Almost always a NAT traversal issue. MixMonitor records what arrives at Asterisk — if one side's RTP stream isn't reaching the server, that side is silent.
Truncated recordings? Usually Asterisk running out of file descriptors. Check ulimit -n and increase to 65536 in /etc/security/limits.conf.
Recording infrastructure isn't glamorous, but getting it wrong means compliance violations, 2 AM disk emergencies, and the inability to produce recordings when regulators come knocking. ViciStack handles storage sizing, automated archival, and compliance-ready retention as part of every deployment.
Originally published at https://vicistack.com/blog/vicidial-call-recording/
Top comments (0)