By Sagar Shankaran, Founder of CallSphere
Call recording compliance for AI voice agents — TCPA two-party consent states, CCPA disclosure, GDPR, and audit trails.
Key takeaways
Hitting "record" on a voice agent call takes one line of code. Staying legal across all US states, the EU, and the UK takes policy, disclosure logic, retention schedules, and audit trails. This post walks through the technical implementation of call recording compliance for AI voice agents, focused on TCPA two-party consent states, CCPA disclosure requirements, and GDPR lawful basis.
Disclaimer: this is engineering guidance, not legal advice. Work with counsel for your specific jurisdiction.
incoming call
│
▼
detect jurisdiction from caller ID / IP
│
▼
two-party state? ── yes ──► play consent prompt, wait for "yes"
│
no
│
▼
play one-party disclosure ("this call may be recorded")
│
▼
start recording + log consent event
┌───────────────────────┐
│ Voice agent runtime │
│ • consent state │
│ • recording on/off │
└──────────┬────────────┘
│
▼
┌───────────────────────┐
│ Consent log (Postgres)│
└──────────┬────────────┘
│
▼
┌───────────────────────┐
│ Recording storage │
│ (S3 + KMS encryption) │
└───────────────────────┘
def jurisdiction_for_caller(caller_number: str) -> str:
# Lookup NPA → state
npa = caller_number[2:5] if caller_number.startswith("+1") else None
return NPA_STATE.get(npa, "unknown")
TWO_PARTY_STATES = {"CA", "CT", "DE", "FL", "IL", "MD", "MA", "MI", "MT", "NV", "NH", "OR", "PA", "VT", "WA"}
def needs_two_party_consent(state: str) -> bool:
return state in TWO_PARTY_STATES
async def run_disclosure(oai_ws, state: str):
if needs_two_party_consent(state):
script = "This call will be recorded for quality and training. Is that okay with you?"
else:
script = "Just so you know, this call may be recorded for quality purposes."
await oai_ws.send(json.dumps({
"type": "response.create",
"response": {"instructions": f"Speak this exactly: {script}"},
}))
Set a flag on the session: awaiting_consent = true. Only start recording when the caller says yes.
flowchart LR
REQ(["Inbound request"])
PII["PII detection<br/>regex plus NER"]
POL{"Policy engine<br/>OPA or rules"}
REDACT["Redact or mask"]
LLM["LLM call"]
OUT["Response"]
AUDIT[("Append only<br/>audit log")]
BLOCK(["Block plus<br/>notify DPO"])
REQ --> PII --> POL
POL -->|Allow| REDACT --> LLM --> OUT --> AUDIT
POL -->|Deny| BLOCK
style POL fill:#4f46e5,stroke:#4338ca,color:#fff
style AUDIT fill:#ede9fe,stroke:#7c3aed,color:#1e1b4b
style BLOCK fill:#dc2626,stroke:#b91c1c,color:#fff
style OUT fill:#059669,stroke:#047857,color:#fff
CONSENT_YES = {"yes", "sure", "okay", "ok", "yeah", "fine", "that's fine"}
CONSENT_NO = {"no", "nope", "don't", "do not"}
async def handle_consent_turn(transcript: str, session):
t = transcript.lower().strip()
if any(w in t for w in CONSENT_YES):
session.consent = True
await log_consent(session.call_id, "granted")
await start_recording(session)
elif any(w in t for w in CONSENT_NO):
await log_consent(session.call_id, "refused")
await end_call_politely(session)
CREATE TABLE consent_events (
id BIGSERIAL PRIMARY KEY,
call_id TEXT NOT NULL,
caller_number TEXT,
jurisdiction TEXT,
consent_status TEXT NOT NULL,
disclosure_script TEXT NOT NULL,
recorded_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
import boto3
s3 = boto3.client("s3")
async def upload_recording(tenant_id: str, call_id: str, wav_bytes: bytes):
key = f"tenants/{tenant_id}/calls/{call_id}.wav"
s3.put_object(
Bucket="cs-recordings",
Key=key,
Body=wav_bytes,
ServerSideEncryption="aws:kms",
SSEKMSKeyId=tenant_kms_key(tenant_id),
)
async def delete_caller_data(caller_number: str):
call_ids = await db.fetch("SELECT call_id FROM calls WHERE caller_number = $1", caller_number)
for cid in call_ids:
await s3.delete_object(Bucket="cs-recordings", Key=f"calls/{cid}.wav")
await db.execute("UPDATE calls SET transcript = NULL, deleted_at = now() WHERE call_id = $1", cid)
CallSphere builds consent detection, per-state disclosure scripts, and encrypted recording storage into every production deployment. The voice plane runs on the OpenAI Realtime API (gpt-4o-realtime-preview-2025-06-03) at 24kHz PCM16 with server VAD, and the consent gate fires before the first tool call. Recordings land in per-tenant S3 buckets with SSE-KMS, and access is gated through signed URLs from the admin UI.
Hear it before you finish reading
Talk to a live CallSphere AI voice agent in your browser — 60 seconds, no signup.
The pattern applies uniformly across healthcare (14 tools, HIPAA-aware retention), real estate (10 agents), salon (4 agents), after-hours escalation (7 tools), IT helpdesk (10 tools + RAG), and the ElevenLabs sales pod (5 GPT-4 specialists). A GPT-4o-mini post-call pipeline redacts PII from transcripts before they flow into the analytics store. CallSphere supports 57+ languages with locale-specific consent scripts and maintains sub-second latency through the disclosure flow.
Yes — recording rules apply regardless of direction.
Good enough for WebRTC, but combine it with explicit disclosure everywhere.
End the call politely without recording and log the refusal.
Still reading? Stop comparing — try CallSphere live.
CallSphere ships complete AI voice agents per industry — 14 tools for healthcare, 10 agents for real estate, 4 specialists for salons. See how it actually handles a call before you book a demo.
It depends on the jurisdiction and vertical; store a policy column per tenant.
Only with explicit opt-in consent spelled out in the disclosure.
Need a compliance-ready voice agent? Book a demo, read the technology page, or see pricing.
#CallSphere #Compliance #TCPA #GDPR #CCPA #CallRecording #AIVoiceAgents

Written by
Sagar Shankaran· Founder, CallSphere
LinkedInSagar Shankaran is the founder of CallSphere, where he builds production AI voice and chat agents deployed across healthcare, hospitality, real estate, and home services. He writes about agentic AI, LLM engineering, and shipping voice agents that handle real calls in production.
See how AI voice agents work for your industry. Live demo available -- no signup required.
A 2026 market read on financial services and fintech SMBs across Singapore, Malaysia, the Philippines, and Indonesia — and how CallSphere AI voice and chat agents deliver multilingual, compliant, 24/7 customer conversations.
Ethiopian coffee exporters and cooperatives lose buyer enquiries across time zones. See how a CallSphere AI voice and chat agent answers international coffee buyers 24/7 in Amharic and English.
Hotels, event venues, and professional-services firms in Erbil serve guests and clients in Kurdish, Arabic, and English. CallSphere answers every call and message 24/7 and books directly.
Grenada businesses serving St George's University students and families, from rentals and clinics to tutoring and professional services, use CallSphere AI voice and chat agents to answer enquiries across every time zone and language, 24/7.
A step-by-step guide for Moroccan retail and e-commerce businesses to cut COD returns, recover abandoned carts, and answer buyers in Darija, French, and English with a CallSphere AI agent.
Tbilisi professional-services firms serving relocating founders and IT companies use CallSphere AI voice and chat agents to answer enquiries 24/7 in English, Georgian and Russian and book consultations.
© 2026 CallSphere Inc. All rights reserved.
Made within San Francisco
Watch how CallSphere handles real customer calls, schedules appointments, and processes payments — live.
Try Live DemoBook a DemoCalculate Your ROI