How to Set Up Call Recording and Compliance Logging

Many businesses need to record calls for quality assurance, dispute resolution, or regulatory compliance. This guide covers setting up call recording in Asterisk/FreePBX along with responsible handling of the resulting data.

Important: Legal Considerations First

Call recording laws vary significantly by jurisdiction — some require all-party consent, others only one-party consent, and rules differ for business vs personal calls. This article covers only the technical setup; consult with legal counsel regarding your specific recording obligations and disclosure requirements before enabling call recording.

Enabling Call Recording in FreePBX

Under Applications → Extensions, for each extension needing recording, set Call Recording to "Always," "On Demand," or "Never" depending on your policy.

Enabling Recording in Raw Asterisk Dialplan

exten => 1001,1,MixMonitor(${UNIQUEID}.wav,b)
exten => 1001,n,Dial(PJSIP/1001,20)

MixMonitor records both sides of the conversation into a single audio file.

Configuring Storage Location

exten => 1001,1,Set(RECFILE=/var/spool/asterisk/monitor/${STRFTIME(${EPOCH},,%Y%m%d)}/${UNIQUEID}.wav)
exten => 1001,n,MixMonitor(${RECFILE},b)

Organizing recordings into date-based subdirectories keeps a growing recording archive manageable.

Playing an Announcement Before Recording (For Consent)

exten => 1001,1,Playback(custom/call-may-be-recorded)
exten => 1001,n,MixMonitor(${RECFILE},b)
exten => 1001,n,Dial(PJSIP/1001,20)

If your legal requirements include announced consent, ensure this plays reliably before recording actually begins — verify the announcement itself isn't accidentally captured as part of the recorded call in a way that violates your specific compliance needs.

Securing Recorded Call Data

Call recordings often contain sensitive information (personal details, sometimes payment information if not properly excluded) — restrict file system access to recordings, and encrypt at rest if storing genuinely sensitive content. See Backup Encryption: Protecting Your Backups from Unauthorized Access for the underlying encryption approach.

Setting a Retention Policy

sudo find /var/spool/asterisk/monitor -name "*.wav" -mtime +90 -delete

Automatically delete recordings beyond your required/appropriate retention period — retaining data longer than necessary increases both storage cost and potential liability exposure.

Excluding Payment Card Data from Recordings (PCI DSS Relevance)

If calls might involve customers reading payment card numbers aloud, consider pause/resume recording functionality during that specific portion of the call — a common PCI DSS compliance requirement for phone-based payment collection; consult current PCI guidance and your specific payment processor's requirements.

Accessing and Reviewing Recordings

FreePBX provides a web-based interface for browsing, playing, and downloading recordings under its reporting modules — restrict access to this interface to authorized personnel only.

Common Errors

Recordings are silent or one-sided — verify MixMonitor's b flag (both channels) is included, and check for codec-related issues affecting the recording specifically.

Continue Reading

Browse more articles in VoIP & Communication Servers.

  • call recording asterisk, voip compliance logging, mixmonitor, call recording setup
  • 0 Пользователи нашли это полезным
Помог ли вам данный ответ?

Связанные статьи

How to Install Asterisk PBX on a VPS

Asterisk is the foundational open-source telephony engine powering most self-hosted PBX systems...

How to Install FreePBX on a VPS

FreePBX is a widely-used, open-source web interface built on top of Asterisk — making PBX...

How to Set Up SIP Trunking for Your PBX

A SIP trunk connects your self-hosted PBX to the public telephone network, letting you make and...

How to Configure Extensions and Voicemail in Asterisk

Extensions are the individual phone lines within your PBX system, and voicemail lets callers...

How to Secure a VoIP Server Against Toll Fraud

An unsecured VoIP server is a common target for toll fraud — attackers who compromise weak...