cd /news/artificial-intelligence/i-built-an-ai-call-router-that-actua… · home topics artificial-intelligence article
[ARTICLE · art-117177] src=dev.to ↗ pub= topic=artificial-intelligence verified=true sentiment=↑ positive

I Built an AI Call Router That Actually Understands Intent

A developer built an AI-powered call router using Telnyx's Edge Runtime and AI Inference binding, which understands caller intent and routes calls without external glue code. The system uses a StatefulActor to hold call state in memory and Telnyx KV for routing tables, eliminating the need for multiple API integrations.

read2 min views1 publishedAug 31, 2026

I’ve always hated phone menus. "Press 1 for sales, 2 for support." By the time you reach the right department, you've listened to three minutes of hold music. I wanted to build something better: a call router that just asks you what you need and routes you instantly.

I built this using Telnyx. Not just their voice API, but their new Edge Runtime. Here’s why that matters.

Building voice AI is usually a glue-code nightmare. You need a telephony provider, a speech-to-text service, an LLM provider, and a database to store your routing logic. That’s four different API keys, four different SDKs, and four points of failure.

When latency spikes on the LLM, the caller waits. When the database connection drops, the call fails.

Telnyx is AI Communications Infrastructure. They own the telephony network, the AI inference layer, and now, an edge compute runtime.

For this project, I used a StatefulActor

on the Edge Runtime. When a call comes in, the runtime spins up an actor dedicated to that call leg. This actor holds the call state in memory. No external session database is required.

To classify the caller's intent, I used the built-in AI Inference binding. It looks like this:

const completion = await this.env.TELNYX.ai.openai.chat.createCompletion({
  model: 'meta-llama/Llama-3.3-70B-Instruct',
  messages: [...]
});

Notice anything missing? API keys. The binding is pre-authenticated. The runtime handles the credentials. I just call the model.

Once the LLM tells me the caller wants "billing," I need to know where to transfer them. I stored the route table in Telnyx KV, a globally distributed key-value store.

const destination = await this.env.ROUTES.get('route:billing');

If the key is missing, it falls back to a default destination.

gather_using_ai

captures the caller's request.All of this happens in one edge function. No external servers. No glue code.

When you build on AI Communications Infrastructure, you stop stitching together disparate services. You start composing capabilities. The telephony, the AI, and the compute live in the same place. The latency is lower. The code is cleaner.

If you want to see the code, I’ve open-sourced it. You can deploy it right now with the Telnyx CLI.

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @telnyx 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/i-built-an-ai-call-r…] indexed:0 read:2min 2026-08-31 ·