Architecture Note · Operations & RevOps

Inbound-Only AI Voice Receptionist: Consent Gates, Timezone Locks, and Escalation Sign-Off

Why prompt-only voice agents fail across regulated call desks—and the deterministic FastAPI and SQLite WAL architecture that enforces consent, prevents double-booking, and locks escalation sign-off.

The Problem: Missed Inbound Calls and High-Stakes Routing Across Timezones

Service operations teams, specialist clinics, and B2B support desks lose revenue and breach response SLAs whenever inbound calls hit voicemail during peak hours or after-hours gaps. Front desks spanning London, New York, Toronto, Sydney, and Tokyo must qualify intent, respect local office hours and recording laws, convert calendar slots accurately across Daylight Saving transitions, and route urgent clinical, legal, or outage calls immediately to a live specialist.

Why Naive AI Voice Wrappers Fail in Production

Wrapping a speech-to-text stream around a generic chat completion prompt breaks down along four operational failure modes:

  • Unbounded call direction and consent drift: Without schema-level locks, conversational agents can trigger unapproved outbound callbacks, skip mandatory AI-disclosure greetings, or persist raw audio buffers after a caller declines recording.
  • Nondeterministic scheduling and timezone races: Prompt-driven slot math misreads local offsets around DST boundaries and lacks atomic database locks, allowing concurrent calls to double-book the same provider.
  • Silent failure on low ASR confidence or emergencies: When background noise drops transcription confidence or a caller reports chest pain, a legal subpoena, or a production outage, a chatty model tends to improvise scheduling instead of halting automation.
  • Missing custody and auditability: Ephemeral voice logs either vanish without disposition history or linger indefinitely on disk with raw caller audio intact and zero tamper-evident audit trails.

The Deterministic Architecture That Fixes It

Production inbound reception treats language models as bounded intake extractors inside a deterministic FastAPI and SQLite WAL control plane, enforcing policy in code and database constraints before any booking or handoff completes.

  1. Strict inbound-only and consent enforcement: On POST /api/voice/inbound-session, any request with direction != "inbound", outbound_dial=true, or a non-inbound call_type is rejected with HTTP 422, logged to compliance_events, and blocked at the storage layer by SQLite CHECK constraints. When recording_consent is false, audio uploads and recording_url buffers are never persisted (recording_status="non_recorded" or "redacted"), while temporary text uploads in VOICE_UPLOAD_DIR (0600) auto-wipe after one hour (3600s).
  2. Zero-key deterministic intake and local hours policy: An OfflineDeterministicAdapter extracts structured caller intent and CRM summaries with zero external API keys (with an optional OpenAI-compatible fallback). Local office schedules are evaluated deterministically via Python zoneinfo rather than prompt heuristics.
  3. Atomic cross-timezone slot locking: POST /api/voice/book-slot rejects sessions missing ai_disclosure_given=true (HTTP 422) or already escalated (HTTP 409), validates business hours in the target IANA timezone, converts windows to UTC, and checks overlaps inside a BEGIN IMMEDIATE transaction backed by the partial unique index idx_appointments_unique_active_slot.
  4. Deterministic escalation and human sign-off gates: Urgent keywords (such as chest pain, legal subpoena, or outage), caller handoff phrases, or ASR confidence below 0.65 trigger POST /api/voice/escalate, halting autonomous booking and creating a ticket with signoff_required=true. Tickets remain in pending_human_signoff until closed via POST /api/voice/escalations/{ticket_id}/disposition.
  5. Immutable hash-chained audit logs and safe analytics: Every intake, booking, escalation, and human sign-off appends to audit_logs with sequential SHA-256 chaining (prev_hash|canonical) protected by SQLite BEFORE UPDATE and BEFORE DELETE abort triggers. GET /api/voice/analytics and /api/voice/analytics.csv report containment rate, average handle time, and booking conversion with OWASP CSV formula neutralization.

Operational Takeaway

Reliable voice automation does not come from freer prompting; it comes from constraining AI intake behind strict inbound-only schema locks, UTC-normalized slot transactions, automatic escalation halts, ephemeral upload auto-wipes, and mandatory human sign-off records backed by verifiable SHA-256 audit chains that withstand compliance review.

Test an inbound-only voice receptionist on your call flows

Start with a free 30-minute workflow check. Bring your hub timezones, escalation keywords, and calendar booking rules and leave with one concrete recommendation in writing within one business day.