Skip to content
All projects

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
Azure Communication ServicesAzure Functions (Python)Azure OpenAI (GPT-4o)Azure Speech (STT/TTS, SSML)RedisAzure Storage QueueApplication Insights

Built at CloudLex

The problem

Staff spent hours on routine outbound update calls and inbound questions — time-consuming, inconsistent between people, and rarely logged against the matter.

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.

How it fits together

Trigger (queue / inbound call)Compose greeting (GPT-4o)Place / answer PSTN call (ACS Call Automation)Speech-to-textLLM turn (GPT-4o)SSML text-to-speechTool-call hangup when done

A two-function, event-driven state machine over the telephony channel.

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

  • 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