FEATUREDLatestOpenSIPSTOP STORIESVOIPWebRTC

How to Record WebRTC Calls (Securely & Legally)

Businesses record calls for training, quality checks, disputes and regulatory record-keeping. With WebRTC calling there is no single “record” button in the standard, so you have to decide where the recording happens, how it is protected, and what the law in your country requires before you press record. This guide covers all three.

Where a WebRTC call can be recorded

There are three places to capture a WebRTC call:

  • In the browser (client-side): the user’s own browser records the streams it sends and receives.
  • On a media server (server-side): the media passes through an SFU or MCU, which records it centrally. See SFU vs MCU vs P2P for how these differ.
  • On the phone system: if a browser softphone is connected to a PBX, every call already passes through the PBX, and the PBX can record it like any other call.

Recording methods

1. Client-side recording

The browser’s MediaRecorder API can record any media stream: your own microphone and camera (captured with getUserMedia()) and the remote participants’ streams received over the connection. To get a single file with both sides of the conversation, you mix the audio tracks together first, for example with the Web Audio API.

  • Suits: small teams, ad hoc recordings, and applications where the user should control the recording.
  • Advantages: simple, and no extra servers are needed.
  • Drawbacks: it depends on the user’s device and on the tab staying open, the file ends up on the user’s machine, and it is unsuitable where an organisation must be able to prove that every call was recorded.

2. Server-side recording on a media server

Route the media through a media server such as Janus or Jitsi and record there. Janus, for example, can record each stream and convert the recordings to standard formats afterwards.

  • Suits: meetings, contact centres and regulated industries.
  • Advantages: consistent recordings of every participant, stored where the organisation controls them.
  • Drawbacks: more infrastructure to run, and the media must pass through the server, which ends true peer-to-peer media.

3. Recording on the PBX

For business calling this is usually the simplest option. When browser softphones register to a PBX, the calls pass through it, so the PBX’s normal recording features apply. In Asterisk, for example, the MixMonitor application records both sides of a call to a file. A WebRTC call recorded this way is no different from a desk phone call.

Keeping recordings secure

  • WebRTC media is always encrypted in transit with DTLS-SRTP, and signalling should always use TLS or secure WebSockets. See how DTLS-SRTP keeps WebRTC voice and video secure.
  • Recording removes that protection: the stored file is plain audio unless you encrypt it. Encrypt recordings at rest, for example with AES-based disk or storage encryption.
  • Restrict who can listen to recordings and log access. Broken access control is the top risk in the OWASP Top 10 (2021).
  • Set a retention period and delete recordings when it ends. Keeping recordings for ever adds risk and, in many countries, breaks data protection law.

Legal considerations

Call recording law varies by country and, in the United States, by state. The points below are a general overview, not legal advice; check the rules that apply to you.

  • United States: most states require only one party to consent, which can be the person recording. A minority of states, including California and Florida, require all parties to consent. Justia has a 50-state summary.
  • United Kingdom: businesses may record calls without each caller’s consent for specified purposes, such as keeping records of transactions, regulatory compliance and quality control, under the Investigatory Powers (Interception by Businesses etc.) Regulations 2018. They must make reasonable efforts to tell users that calls may be recorded, and UK GDPR applies to the recordings. The ICO publishes guidance.
  • European Union: a recording of an identifiable person is personal data under the GDPR. You need a lawful basis (which is not always consent), you must tell people, and some member states add stricter rules of their own.
  • South Africa: under section 4 of RICA, a person who is a party to a call may record it, and section 6 allows businesses to record calls in the course of business under conditions, including making reasonable efforts to inform the people being recorded. POPIA then governs how the recordings are kept. Michalsons explains how to comply with RICA.

Whatever the local minimum, the safest practice is the same: tell people the call is being recorded, with an announcement at the start of the call or a clear notice in the application.

Checklist

  • Choose where to record: the browser, a media server or the PBX.
  • Encrypt recordings at rest and restrict who can play them.
  • Set a retention period and stick to it.
  • Inform participants, and check the consent rules in every country you call.

Final thoughts

Recording WebRTC calls is straightforward once you decide where the recording happens. For business calls on a phone system, the PBX is usually the right place; for browser-only applications, a media server gives consistent results. Either way, the security and legal work matters as much as the technical setup. If you are deciding between browser calling and a desktop app, see WebRTC softphone vs traditional softphone.

Updated 12 November 2026: corrected the legal section (the UK and South Africa were wrongly described as requiring all-party consent, and the GDPR does not always require consent), added recording on the PBX, removed a broken link, and updated the security references.

Leave a Reply

Your email address will not be published. Required fields are marked *