AI & Agents

How to Set Up OpenClaw Twilio Integration for Voice and SMS

Production voice agent deployments grew 340% year-over-year across 500+ organizations in 2026, yet most Twilio integration guides still assume you are writing a custom Node.js server from scratch. OpenClaw's voice-call plugin handles the WebSocket plumbing, transcription routing, and call state so you can ship a working voice agent in an afternoon. This guide walks through provider credentials, automation hooks configuration, inbound call policies, SMS setup, and testing with real phone numbers.

Fastio Editorial Team 12 min read
Voice and SMS capabilities for OpenClaw agents via Twilio

What the Voice-Call Plugin Actually Does

Most developers who want their AI agent to make phone calls end up building a bespoke middleware layer: a WebSocket server, a transcription pipeline, TTS synthesis, call state management, and automation hooks validation. OpenClaw's voice-call plugin replaces that entire stack with a single installable module.

The plugin supports four providers: Twilio (Programmable Voice + Media Streams), Telnyx (Call Control v2), Plivo (Voice API), and a Mock provider for local development. Twilio is the most widely deployed option because it handles both voice and SMS through the same account, and its Media Streams API provides full-duplex audio over WebSocket.

Once configured, your OpenClaw agent can place outbound calls, hold multi-turn voice conversations, and receive inbound calls through a single tool interface. The official plugin documentation covers the full capability set: outbound notifications, multi-turn conversations, full-duplex realtime voice, streaming transcription, and inbound calls with allowlist policies.

The plugin runs inside the OpenClaw Gateway process, so call state and agent sessions share the same runtime. Channel switching between voice and text stays low-latency because nothing routes through an external message bus.

OpenClaw voice-call plugin architecture connecting to Twilio

How to Connect OpenClaw to Twilio

The setup has three layers: Twilio credentials, network reachability, and plugin installation. Working through them in order prevents the most common "why isn't this connecting?" frustrations.

Twilio credentials:

You need a Twilio account with a phone number that supports both Voice and SMS. From the Twilio Console, collect your Account SID and Auth Token, which authenticate API requests. Twilio offers trial credits so you can test voice and SMS before committing to a paid plan. Their pricing page lists current per-minute rates by country.

Network reachability:

Twilio delivers call events by sending HTTP POST requests to your server. Your OpenClaw Gateway needs a publicly reachable URL so these callbacks arrive. During development, a tunneling service creates a temporary public endpoint. For production, deploy the Gateway behind a reverse proxy with TLS termination.

Plugin installation and verification:

The voice-call plugin installs through OpenClaw's skill system. After installation, configure it with your Twilio credentials and the public callback URL. The official voice-call plugin docs specify the exact configuration fields, required values, and provider-specific options for Twilio, Telnyx, and Plivo.

OpenClaw includes a built-in setup verification step that checks credential validity, callback URL reachability, and Gateway-to-Twilio API communication. Run this before moving to call testing and resolve any failures it reports.

Verifying OpenClaw Twilio credentials and webhook configuration
Fastio features

Persist Call Transcripts and Agent Output Across Sessions

generous storage with semantic search, audit trails, and MCP-native tooling. Upload transcripts, share with your team, and query call history by meaning. No credit card required.

How Inbound Calls, Outbound Calls, and SMS Work

With the plugin installed and verified, your agent can make outbound calls immediately. Place a test call through the agent's voice_call tool to confirm the end-to-end path works: your agent speaks, Twilio connects the call, and the recipient hears audio.

Outbound call modes:

The plugin supports two conversation styles. In notification mode, the agent speaks a one-way message and disconnects. In conversation mode, the agent and caller have a back-and-forth dialog using streaming transcription. The transcription provider is configurable, with support for services like Deepgram and OpenAI.

For full-duplex realtime voice, where both parties can speak simultaneously without waiting for turn-taking, the plugin supports a realtime audio mode using providers like OpenAI Realtime or Google Gemini Live. Note that realtime and standard streaming modes are mutually exclusive. Choose one per deployment based on your latency requirements.

Inbound calls:

To receive calls, configure your Twilio number's voice automation hooks to point at your Gateway's public URL plus the automation hooks path. Set the HTTP method to POST in the Twilio Console.

The plugin uses an allowlist policy by default. Only numbers listed in the inbound allowlist connect to your agent. Calls from unlisted numbers get a polite rejection message. This prevents your agent from burning LLM tokens on spam calls. Per-number routing lets you assign different agent personas or TTS voices to specific callers.

SMS:

SMS works through the same Twilio account and phone number. For outbound messages, the agent uses the Twilio REST API. The LumaDock community guide covers wrapping the API call in a reusable OpenClaw skill for clean separation.

For two-way SMS, configure your Twilio number's messaging automation hooks to forward incoming texts to an OpenClaw handler. The flow is: user texts your number, Twilio POSTs to your automation hooks, your handler normalizes the payload and forwards it to OpenClaw, the agent generates a reply, and the handler sends it back via the Twilio REST API.

Validate automation hooks signatures on inbound SMS to prevent spoofed messages from triggering agent actions. Rate-limit by sender number to contain costs if someone decides to spam your Twilio number.

Outbound and inbound communication flow between OpenClaw and Twilio

Storing Call Logs and Transcripts with Fastio

Voice agents generate artifacts that need to persist beyond the call: transcripts, recordings, summaries, follow-up tasks. Local filesystem storage works for a single developer, but it breaks down when multiple agents share context or when you need to hand off call records to a human team.

S3 or Google Cloud Storage can hold the files, but you lose searchability. You would need a separate vector database, a permissions layer, and a UI for non-technical team members to review transcripts. That is a lot of infrastructure for what should be a simple problem.

Fastio provides a workspace where agents write files and humans read them through the same interface. Your OpenClaw agent can upload call transcripts, recordings, and summaries to a Fastio workspace using the Fastio MCP server. Intelligence Mode auto-indexes uploaded files for semantic search, so you can later ask "find all calls where the customer mentioned billing disputes" and get cited results.

The Business Trial includes 50 GB storage, included credits, and 5 workspaces with no credit card required. Install the Fastio skill from ClawHub to register storage, sharing, and AI query tools in your agent's toolset.

A practical workflow: after each call ends, the agent writes the transcript and a structured summary to a designated workspace folder. Webhooks notify a downstream agent or a human Slack channel. When the human needs the full conversation history, they open the workspace in a browser, search by topic, and read the transcript with the original audio recording attached. Ownership transfer lets the agent build the entire workspace and then hand admin control to a human manager.

This matters especially for regulated industries where call records need audit trails. Fastio logs every file action (uploads, downloads, shares, permission changes) with timestamps and actor identity, giving you a compliance-ready paper trail without building your own logging infrastructure.

Call transcript audit logs stored in Fastio workspace

Alternative Approaches to OpenClaw Voice

The official voice-call plugin is the most capable option, but it is not the only path. Two alternatives are worth knowing about depending on your constraints.

Clawphone is an open-source Node.js gateway that connects Twilio voice and SMS to OpenClaw agents using a different architecture. Instead of Media Streams (persistent WebSocket with external STT/TTS), Clawphone uses TwiML automation hooks polling with Twilio's built-in speech services. The caller speaks, Twilio records and transcribes, the agent processes the transcript asynchronously, and the response comes back as synthesized speech.

The tradeoff is latency versus simplicity. Clawphone adds roughly 1-2 seconds of response delay compared to the streaming approach, but it runs as a single Node process with no external STT/TTS accounts. For personal assistants or low-traffic use cases where sub-second response time is not critical, this is a reasonable choice. It also includes built-in features like Discord logging for call events and per-number rate limiting.

Custom Twilio skills on ClawHub offer a middle ground. You can build SMS notification workflows without the full voice-call plugin by wrapping Twilio REST API calls in a skill. This approach gives you outbound SMS and basic call initiation but not the streaming transcription, inbound routing, or session management that the official plugin provides.

For most production deployments that need real-time voice conversations, the official plugin is the right starting point. Clawphone works well for prototyping or personal use where operational simplicity matters more than latency. Custom skills fill the gap when you only need SMS or simple outbound notifications.

How to Debug Common Setup Problems

automation hooks unreachable: The most common failure is Twilio being unable to reach your Gateway. Run openclaw voicecall setup and check the automation hooks reachability test. If it fails, verify your tunnel is running, your firewall allows inbound connections on the automation hooks port, and your public URL matches the actual tunnel endpoint. For proxied setups, make sure the Gateway accepts forwarded headers from your reverse proxy.

Stale calls: If calls hang without disconnecting cleanly (common when the network drops or Twilio does not send a terminal automation hooks), the plugin includes a stale call reaper. Configure it to automatically end calls that have not received a automation hooks event within a timeout period.

Session scope confusion: The plugin supports two session scopes. Per-phone preserves conversation memory across calls from the same number, so a caller can pick up where they left off. Per-call starts fresh each time. Choose per-phone for customer service agents that need context continuity, and per-call for transactional use cases like appointment confirmations.

Realtime vs. streaming conflict: Realtime and streaming modes cannot both be active at the same time. Realtime uses full-duplex audio through OpenAI or Gemini. Streaming uses a separate STT provider for transcription with standard TTS for responses. If you get a configuration validation error, check that only one mode is enabled.

Cost monitoring: Twilio charges per minute for voice and per message for SMS. Set up usage triggers in the Twilio Console to get alerts before your bill surprises you. If you are storing transcripts in Fastio, the free tier's included credits covers moderate usage for uploading and searching call records.

Frequently Asked Questions

How do I connect OpenClaw to Twilio?

Install the voice-call plugin with `openclaw skill install twilio-api`, add your Twilio Account SID, Auth Token, and a Twilio phone number to the Gateway config, set a publicly reachable automation hooks URL, then run `openclaw voicecall setup` to verify the connection.

Can OpenClaw make phone calls?

Yes. The voice-call plugin adds a `voice_call` tool with actions for initiating calls, continuing conversations, sending DTMF tones, and ending calls. It supports one-way notifications and multi-turn voice conversations with streaming transcription.

How do I set up SMS agents with OpenClaw?

For outbound SMS, wrap the Twilio Messages API in an OpenClaw skill. For two-way SMS, configure your Twilio number's messaging automation hooks to forward incoming texts to an OpenClaw handler, which generates replies and sends them back through the Twilio REST API.

What does Twilio voice integration cost?

Twilio charges a monthly fee per phone number plus per-minute rates for voice calls and per-message rates for SMS. Check the Twilio pricing page for current rates by country. You also pay for your chosen STT/TTS providers and the LLM processing each conversation turn. Set usage triggers in the Twilio Console to cap spending.

Does the voice-call plugin support inbound calls?

Yes. Configure your Twilio number's voice automation hooks to point at the Gateway's public URL. The plugin uses an allowlist policy by default, connecting only approved caller numbers to your agent and rejecting unknown callers.

Can I use providers other than Twilio?

The voice-call plugin supports Telnyx (Call Control v2), Plivo (Voice API), and a Mock provider for offline development. Twilio is the most commonly used because it handles both voice and SMS through one account.

Related Resources

Fastio features

Persist Call Transcripts and Agent Output Across Sessions

generous storage with semantic search, audit trails, and MCP-native tooling. Upload transcripts, share with your team, and query call history by meaning. No credit card required.