Voice AI Fails When State Splits | SignalWire

Voice AI Fails When State Splits

External state management is the single biggest source of production failures in voice AI. The fix is not better code. It is a different architecture.

< 1.2s typical AI response latency

1 platform for the full AI pipeline

2,000+ companies in production

2.7B minutes processed

Failure modes that emerge at scale

Zombie calls

Your app receives a hangup event after it already issued a transfer command. The transfer succeeds. The call is now live with no state tracking. Nobody knows the call exists.

Double updates

Two concurrent events for the same call. Both read state, both mutate, one overwrites the other. The caller hears contradictory information in the same conversation.

Phantom transfers

The transfer target picks up during a brief network partition. Your app never receives the answer event. The call is bridged but your state shows it as still ringing.

Stale responses

The caller interrupts while the LLM is generating. Your app receives the full LLM response and sends it to TTS. The caller hears an answer to a question they already corrected.

Build a Voice AI Agent

Python

TypeScript

Go

Java

Ruby

PHP

Perl

C++

C#

from signalwire import AgentBase
from signalwire.core.function_result import FunctionResult

class SupportAgent(AgentBase):
    def __init__(self):
        super().__init__(name="Support Agent", route="/support")
        self.prompt_add_section("Instructions", body="You are a customer support agent. "
                            "Greet the caller and resolve their issue.")
        self.add_language("English", "en-US", "rime.spore:mistv2")

@AgentBase.tool(name="check_order")
    def check_order(self, order_id: str):
        """Check the status of a customer order.
        Args:
            order_id: The order ID to look up
        """
        return FunctionResult(f"Order {order_id}: shipped, ETA April 2nd")

agent = SupportAgent()
agent.run()

AI outside the call vs. AI inside the call

Bolt-On: AI Outside the Call

Audio streams to your server, then to STT, LLM, TTS. Six network hops minimum per conversational turn. State split across your app, telephony provider, and AI services. Race conditions multiply with call volume. Your app is responsible for context, timing, and error recovery. Root cause found after 90 minutes of cross-vendor investigation.

SignalWire: AI Inside the Call

AI kernel orchestrates from inside the media stack. The kernel eliminates the hops between the audio and the orchestration layer. Events processed in order within a single system. No external state to synchronize or reconcile. State lives in one place: the platform. The media engine holds runtime state. The control plane governs lifecycle.

Sigmond Runs on SignalWire

A voice and video AI agent built on the SignalWire SDK, wired to a live knowledge base, able to see what you show him. Build the same thing on voice, phone, WhatsApp, or SIP, or an entire white-label platform with SignalWire as the network underneath.

Call recording

This call is recorded. Audio and transcripts are used to improve our AI and customer support experience, and aren't shared or sold to third parties.

Keep state inside the call.

Build on one platform where the media engine and AI control plane share a single ordered call lifecycle.