SpeechStack
Submit a template
← All templatestemplates / telephony-voice-agent-with-inbound-and-outbound-call-handling
Customnewupdated May 19, 2026 · telecom · support

Telephony voice agent with inbound and outbound call handling

A minimal bridge connecting Twilio Programmable Voice to the AssemblyAI Voice Agent API. Handles both inbound and outbound phone calls with zero audio transcoding by using G.711 μ-law passthrough. Includes tool calling example (generate random number) and automatic barge-in support. Demonstrates how to build a telephony voice agent that answers calls, speaks first on outbound dials, and executes function calls.

No demo yetView sourceFork template
The numbers
latency
cost / min
frameworkCustom
The stack
telephonyTwilio Voice
speech-to-textAssemblyAI Streaming
llmGPT-4o
text-to-speechElevenLabs Turbo v2.5
System prompt
No prompt published.
Config
config.json
{
  "voice_id": "ivy",
  "barge_in": true,
  "tools": [
    {
      "name": "generate_random_number",
      "description": "Generates a random number as a sample tool call"
    }
  ],
  "audio_format": "audio/pcmu",
  "sample_rate_hz": 8000
}
Tools
  • generate_random_numberGenerates a random number as a sample tool call
Tags
telephonytwilioinboundoutboundtool-callingg711-mulawzero-transcoding
Voice Notes

Voice AI recipes, picks, and analysis.

Get the useful new templates plus the occasional teardown of what’s working in production voice AI.

contributed by @dan-ince-aai · Proprietary · source: github discoverylanguages: en-US