CodePrism Technologies logoCodePrism Technologies
Case Study — AI & Voice

A Deterministic Voice AI for Outbound Lead-Validation Calling, Built on Exotel

A real-time, bidirectional voice pipeline that dials leads sequentially over the phone network, asks a fixed script, and understands spoken answers with local speech recognition and rule-based matching, with no LLM anywhere in the loop.

PlatformVoice & Telephony
Duration~1 week, build to verified live call
TypeAI & Voice
Stack7 technologies
PROJECT OVERVIEW

0

LLM calls in the pipeline

~300ms

Local transcription per answer, GPU production

38s

Full 4-question call, verified live end to end

THE CHALLENGE

WhatsApp messaging gets complicated at scale.

GS1 India needed to pre-qualify inbound leads: confirm the caller handles barcode registration, whether their company is already a GS1 member, roughly how many products need barcodes, and whether they want a callback, before handing the lead to a human sales team. Doing that by phone, for every lead, does not scale as a manual process, and the obvious "just add AI" answers all had a catch: commercial voice-AI platforms are typically LLM-driven, which means non-deterministic answers, per-call API cost, and caller audio leaving the premises to a third party, none of which sits well with an auditable qualification script. Telephony compounded the problem: the calling platform's only non-streaming way to capture a spoken answer was record-then-transcribe, which lagged 5 to 20 minutes behind the call, useless for a sequential dialer that needs the next question to depend on the last answer. The platform's real-time bidirectional streaming applet existed but was in Beta, undocumented in places that mattered, and gated behind account verification that hadn't been confirmed to actually apply to it.

Challenge 1

Lead pre-qualification by phone was a manual, one-at-a-time human task with no automation path

Challenge 2

Commercial voice-AI options are largely LLM-based: not deterministic, not auditable against a fixed script, and they send caller audio off-premises

Challenge 3

The calling platform's record-then-transcribe path lags 5 to 20 minutes, incompatible with a live, sequential, question-by-question call flow

Challenge 4

The real-time streaming applet needed for live speech was Beta, and its published setup documentation turned out to be wrong in ways that silently kill a call

Challenge 5

The telephony account was Trial-tier: outbound dialling to any number other than one pre-registered test line was blocked until KYC, and every test call spent real prepaid balance

Measurable Impact
0LLM calls anywhere in the pipeline
~260-310msLocal transcription per answer, GPU production
38sFull 4-question call, verified live end to end
31Automated tests covering the full call flow
WHAT WE LEARNED
01

A simple, rules-based approach is the right tool when the answer space is closed: it is more accurate, faster, cheaper, and fully auditable compared to an LLM in the loop

02

Vendor documentation for a Beta telephony feature can be flatly wrong; the fastest way past an undocumented connection bug was comparing notes with someone else's already-working integration, not waiting on a support ticket

03

Half-duplex is the safer default on a real phone line until proper echo cancellation exists: a barge-in feature that can't tell your own voice from the caller's causes more harm than having no barge-in at all

04

A guardrail that rejects bad input outright is worth more than one that silently truncates it: an operator should never be able to believe a batch went out in full when it didn't

Technologies Background
Our Technologies

Built with technologies we trust.

FastAPI
HTMX
SQLite
Exotel Voicebot
Voice Activity Detection
faster-whisper
Piper

Project Goals

Let an operator upload a list of numbers and have each one dialled automatically, strictly one live call at a time
Ask a fixed four-question lead-validation script over a real, bidirectional voice call
Understand the caller's spoken answer locally: no cloud speech API, no audio leaving the machine
Store every answer as raw audio, verbatim transcript, and parsed value, so any result can be checked by a human
Keep a keypad (DTMF) fallback on every question, so a bad line or an unclear answer never loses data
Guard the telephony account's limited prepaid balance with a hard, un-bypassable cap on batch size

The Outcome

Delivered a fully auditable, zero-LLM voice AI that pre-qualifies leads over real phone calls, verified live end to end in under a week.

Conclusion & Impact

"For a voice application with a closed, fixed set of possible answers, a deterministic rules engine beat an LLM on every axis that mattered for this POC: it cost nothing per call, added no network round trip, never hallucinated an answer, and, critically for a client validating leads, every single parsed result could be explained by pointing at one line of the question script rather than a model's internal state."

Have a project in mind?

Let's discuss how we can help you build your next big thing.
Reach out and our team will be in touch.

Protected by reCAPTCHA. Google Privacy & Terms apply.

Building systems that hold up in production.

Bring up the problem others won't attempt.