DEV Community

Cover image for Call Recording APIs: Stereo, Consent, Redaction and Retention
Piyush Sahoo
Piyush Sahoo

Posted on

Call Recording APIs: Stereo, Consent, Redaction and Retention

A call recording API lets your application start, stop, fetch, and delete call audio, and it announces finished files through webhooks (callbacks). The API is the easy part. A compliant pipeline also captures consent, keeps card data out, redacts transcripts, logs access, and erases on a schedule you can defend.

This guide covers the engineering decisions in that order. It also compares consent rules in the US and the EU, and shows how to set a retention period you can defend.

Note: Key takeaways

  • Record each party on its own channel. The channel then tells you who spoke, so you avoid guessing speakers from a mixed track. Check the default, because mono is often what you get unless you ask.
  • Treat consent, carve-outs, and erasure as pipeline stages. Each stage should leave evidence you can show an auditor later.
  • Retention can have both a floor and a ceiling. Sector rules can require you to keep records for a minimum period, while data protection law requires erasure once the purpose ends.
  • Card verification codes are the hard line. PCI guidance forbids keeping them after authorization, even encrypted, if the audio can be queried. Transcription makes audio queryable.
  • Know your platform's retention period. If your policy needs longer, keep a copy in your own storage.

What does a call recording API do?

A recording API has four jobs, and only the first happens during the call:

Job What happens What usually goes wrong
Capture Audio is written while the call runs A low default duration limit cuts the file short
Notify A webhook announces the finished file Your endpoint is down, and the event is gone
Retrieve You download the file with your credentials Code trusts the file extension, then fails to decode
Delete You remove the file, or the platform ages it out A copy survives in a bucket nobody tracks

The asynchronous step shapes the design. You never get the audio in the response that started the recording. You get an identifier, then a later event, so your pipeline should be a small state machine keyed on the recording ID rather than one blocking request.

Provider terms differ, but the shape is common. Starting a recording and delivering its file are separate steps.

Should you record calls in mono or stereo?

Record in stereo unless storage cost truly outweighs everything downstream. A mono file mixes both voices into one track. A stereo file gives each party a channel, and that single choice decides what your analytics can measure.

Illustrative waveforms of one call. In mono, the agent and customer share a single track and their overlapping speech merges. In stereo, each party has a separate track, so the overlap stays attributable and talk time is measurable.

Channels and diarization solve different problems

Deepgram's comparison draws the line well. Multichannel transcription handles each audio channel on its own. Diarization segments audio by speaker identity, whatever the channel. With stereo you already know the speaker from the channel, so one source of error disappears.

Stereo also gives you a compliance option. Because the voices sit in separate channels, you can apply different policies to each. You might keep the agent channel longer for coaching, and erase the customer channel sooner.

Three stereo traps

  • The default may be mono. Many recording APIs default to mono, so set the channel type explicitly (Record Calls docs).
  • Conferences aren't per-speaker. A room can hold more people than a file has channels, so some voices may share a channel. Don't assume one channel per person on any platform.
  • Identical channels signal a file problem. If both channels transcribe to the same text, Deepgram points to joint stereo, where a space-saving conversion has mixed the channels. Test for this if you convert or compress files before transcribing.

MP3 or WAV?

Choose by what reads the file next. MP3 suits human review and long archives. WAV suits speech engines and forensic work, because no lossy step sits between the call and the model.

Format also multiplies your storage, and retention multiplies it again. The chart assumes 100,000 recorded minutes a month.

Illustrative bar chart of stored audio at 100,000 recorded minutes a month. One month holds 48 GB in MP3, 96 GB in mono WAV, and 192 GB in stereo WAV. Six months holds 288 GB, 576 GB, and 1.2 TB. Twelve months holds 576 GB, 1.2 TB, and 2.3 TB. Sixty months holds 2.9 TB, 5.8 TB, and 11.5 TB.

The arithmetic is bitrate times seconds. MP3 at 64 kbps gives 48 GB for 100,000 minutes. For WAV we assumed 8 kHz, 16-bit mono PCM, which gives 128 kbps, and double that for stereo. A workable compromise is to transcribe from WAV, then keep a compressed copy for the long tail.

What makes a call recording pipeline compliant?

A pipeline is compliant when you can prove what happened to one specific call. That means every stage needs an output you could hand to an auditor, not just a setting you believe was on.

Table-style diagram of seven pipeline stages and the proof each leaves: consent gate keeps notice version, response, and time; capture keeps recording ID and call UUID; carve-out keeps stop and restart timestamps; ingest keeps file hash and copy time; transcribe and redact keeps entity list and redaction version; control access keeps who opened it, when, and why; erase keeps a deletion record per recording.

Consent gate

Run this before capture, and let its result decide whether recording starts. Store the notice version with the response, because your script will change and you must know what each caller heard.

Consent to call and consent to record are different questions. Calling rules govern placing the call, and data protection law governs the recording. If you're in India, Vobiz's UCC guide covers the calling side.

Ingest

Treat the webhook as a hint rather than as your source of truth. Verify the sender, respond quickly, and queue the work. Then fetch the file, hash it, copy it to your store, and record the result under the recording ID so a repeated event does nothing.

Run a reconciliation job against the list API as well. It catches any recording whose webhook never arrived, and it matters most when the platform's retention window is short.

Transcribe and redact

Redact before a transcript leaves your boundary. Once raw text has reached a third-party model, redaction can't recall it.

Decide scope using the identifiers your callers really speak. That list usually includes card numbers and national ID numbers, such as Social Security numbers in the US, or Aadhaar and PAN if you're in India. Measure misses on your own languages and accents, including calls that switch between languages. Our ASR guide explains how telephony audio affects accuracy.

Derived data counts too. Treat sentiment tags, voiceprints, and lead scores as personal data with purpose limits of their own. So your erasure job has to reach transcripts, embeddings, and analytics tables as well as the audio.

Control access and erase

Index recordings by person, not only by call. An erasure request names a person, and your system has to find every file, transcript, and backup connected to that person. Numbers alone won't always get you there, since people share and change phones.

Log each retrieval with a reason. DPDP Rule 6 specifically asks for visibility into access through logs and monitoring, alongside encryption or masking and access control.

What are the consent rules in the US and EU?

The strictest party on the call usually sets your default. If you can't tell where everyone is, announce and capture consent for all of them.

Jurisdiction Baseline Note
US federal One-party consent under 18 U.S.C. § 2511(2)(d) Doesn't protect recording made for a criminal or tortious purpose
California All-party consent for confidential communications Fine of up to $2,500 per violation, and up to $10,000 after a prior conviction. Civil claims can reach $5,000 per violation or three times actual damages
Other US states Varies The Digital Media Law Project's guide is a starting map, but it's no longer updated, so verify each state
EU (GDPR) A lawful basis, of which consent is one Purpose limitation, data minimisation, and storage limitation apply, plus the right to erasure
US healthcare (HIPAA) Depends on your role A recording with identifiable health information can be protected health information, and a vendor handling it can be a business associate

How long should you keep call recordings?

Keep each recording for the longest period a rule actually requires of you, and no longer. Rules can push from both sides. A sector regulator may set a minimum period, while data protection law, such as the GDPR's storage limitation principle, sets a ceiling once the purpose ends.

If you're in India, RBI's recovery directions and a SEBI circular set minimum periods for some firms, and the DPDP Act requires erasure once consent is withdrawn or the purpose ends. Check with your compliance team for your own licence.

In practice, set a retention rule per purpose, and let each recording carry its purpose as metadata. A single global timer will be wrong for someone.

How do you keep card numbers out of call recordings?

Stop capture before card entry, so the data never reaches a file. The PCI Security Standards Council's telephone payment supplement gives the reasoning. It's from March 2011 and cites PCI DSS 2.0 numbering, so map it to the version you're assessed against.

The supplement separates two kinds of data:

  • Card verification codes (CVV, CVC, CID). You must not store these after authorization, even when encrypted, in audio that can be queried. Where technology can prevent recording them, it says to use it.
  • The card number (PAN). Storing it is not banned outright, but it has to be unreadable and justified by a business need.

The supplement's list of query methods includes data mining and analysis tools. So if you transcribe recordings, assume they're queryable. It also says encryption alone doesn't make data non-queryable, and that vaulting audio is a last resort.

Timeline of one call. File A records the conversation, then recording stops and is confirmed. The caller enters card details while nothing records. Recording starts again as file B. Both files share one call UUID, and the digits should stay out of webhook logs.

Order matters here. Prompt for the card only after the stop call has succeeded, or a slow request will capture the first digits. Then listen to a sample of real gaps.

Stopping the recording only protects the recording. If digits reach your server, your application and its logs now hold them. A validated payment service, or a separate flow that never touches your recording stack, shrinks that exposure. Ask your assessor which fits your scope.

Vobiz docs for this topic

The setup details for this are in the Vobiz docs:

Anything that places calls or sends messages is billed and reaches real people, so run it only with your own credentials after confirming the details.

How do you test a recording pipeline before launch?

Run these against your own account, with your own Auth ID and Auth Token and with test participants who have agreed to take part. Each call is real and billed, so confirm the numbers first.

  1. Decline consent. Confirm that no recording exists for the call.
  2. Talk for ten minutes. Confirm the file is ten minutes long, not one.
  3. Take your webhook down. Confirm that reconciliation still finds the file.
  4. Check the channels. Confirm that each party is alone on its channel, with little bleed.
  5. Enter a test card number. Confirm the digits appear in no file, transcript, or log.
  6. Seed known identifiers. Measure what redaction missed.
  7. File an erasure request. Confirm it removes the audio, transcript, derived data, and bucket copy.

The output of these tests is also your audit evidence, so keep it. For next steps, feed clean transcripts into post-call analytics, or use them to pass context during a call transfer.

Frequently asked questions

Is it legal for a business to record calls?

Generally yes, with notice and a lawful purpose, but the rules vary. US federal law needs one party's consent, some states such as California need all parties, and the GDPR needs a lawful basis. If you're in India, no single statute sets a one-party or all-party rule. Give clear notice, capture consent, and take legal advice for your use.

Do I need consent from both parties to record a call?

It depends on the jurisdiction. US federal law requires one party, while California requires all parties for confidential communications. Data protection laws such as the GDPR look at the person whose data you process, so a business should give notice and have a lawful basis. Where locations are uncertain, default to telling everyone and capturing a response.

Should I record calls in mono or stereo?

Use stereo for almost every business call. Each party gets a separate channel, so a transcript's speaker labels come from the channel rather than from diarization. It also makes talk time and overlap measurable. Mono mainly wins on storage, so reserve it for cases where nobody will analyse the audio.

How long should I keep call recordings?

It depends on who you are and where you operate. A sector regulator can set a minimum, such as SEBI's five years for research analysts in India, while laws like the GDPR require erasure once the purpose ends. Set a period per purpose, then erase on schedule. Confirm yours with counsel.

Can call recordings contain card numbers?

Card verification codes must not be kept after authorization in audio that can be queried, even when encrypted. A stored card number must be unreadable and justified. The practical answer is to stop recording before card entry, or use a validated payment service, then verify by listening to samples.

How do I record each party on a separate channel?

Request stereo recording so the caller and callee land on separate channels, and set an explicit time limit. The Record Calls docs cover the parameters.

Further reading on Vobiz

Sources

Indian law and regulators

Law firm and practitioner summaries

Payment, US, and EU rules

Vendor documentation and guides, read November 3, 2026

Record calls on Vobiz — Provision a number and start capturing stereo recordings you can transcribe and analyse.


If the calls you're recording are handled by voice AI agents, Vobiz provides the SIP trunks, numbers and voice API underneath them.

Top comments (0)