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
Sagar 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 how-to for Colombian education and tutoring SMBs to answer parents and students instantly, book trial classes 24/7 in Spanish and English, and grow enrollment 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.
A practical how-to for Palau eco-resorts and dive operators on capturing every high-value, multilingual enquiry with a CallSphere AI voice and chat agent, while honouring Palau’s marine-conservation commitments.
How salons, spas and wellness SMBs across the UAE, Saudi Arabia and Qatar use CallSphere AI voice and chat agents to capture every booking 24/7 in Arabic, English and expat languages, and cut no-shows.
How estate agents and property managers in Luxembourg City and across the Grand Duchy use CallSphere to capture multilingual viewing and enquiry calls 24/7, GDPR compliant.
A practical guide for Senegalese logistics, freight, legal and consulting SMBs in Dakar and Thiès to capture every enquiry 24/7 with a CallSphere AI voice and chat agent in French, Wolof and English.
© 2026 CallSphere LLC. All rights reserved.
Made within New York
Watch how CallSphere handles real customer calls, schedules appointments, and processes payments — live.
Try Live DemoBook a DemoCalculate Your ROI