Voice AI · Event-driven Backend
AI Voice CallBot (PSTN)
Autonomous phone agents that place and answer real PSTN calls, deliver case updates, and hold a natural back-and-forth conversation.
- 400+ calls/mo autonomous
- −60% response time
- Zero dead-air
Built at CloudLex
// problem
The problem
Staff spent hours on routine outbound update calls and inbound questions — time-consuming, inconsistent between people, and rarely logged against the matter.
// approach
What I built
- Queue-decoupled design: a queue-triggered function composes the opening message and dials out; a webhook function runs the live conversation loop (speech-to-text → LLM → SSML text-to-speech).
- The model itself decides when the conversation is complete via a tool call, instead of brittle keyword heuristics.
- A per-call correlation id ties together queue state, telephony events, and traces for clean debugging.
// architecture
How it fits together
A two-function, event-driven state machine over the telephony channel.
// decisions
Key technical decisions
Pre-render the greeting before the phone rings
Generating the opening line up front and replaying it on connect eliminated the 1–2 seconds of dead air callers used to hear while the model "thought".
Tool-call-driven hangup
Letting the model emit an explicit end-of-conversation tool call replaced fragile "did they say bye?" heuristics with clean, context-aware termination.
Queue-decoupled, fire-and-forget
Upstream systems enqueue a job and walk away; telephony bursts are absorbed by platform autoscaling rather than blocking a caller.
// outcomes
Outcomes
- 400+ calls per month handled autonomously
- ~60% faster response on routine updates
- Uniform, auditable call handling
Proprietary — source not public.
Want to talk through any of this?
jntkhandebharad@gmail.com