Fully integrated voice and SMS system that connects directly to your OpenClaw session.
- ✅ Real OpenClaw Integration: Speech/SMS → OpenClaw session → Intelligent response
- ✅ Full Context: Access to weather, calendar, memory, skills, everything
- ✅ Session Memory: Maintains conversation context across calls
- ✅ Dynamic Responses: No hardcoded responses, real AI thinking
- ✅ ElevenLabs Premium Voice: Natural-sounding speech with Polly fallback
User calls/texts → Twilio → Webhook → OpenClaw API → Response → TTS → User
Every interaction goes through OpenClaw's full AI pipeline with access to:
- Weather service
- Calendar integrations
- Browser automation results
- Memory/context
- All installed skills
GATEWAY_URL- Your OpenClaw Gateway URL (e.g.,https://gateway.openclaw.ai)GATEWAY_TOKEN- OpenClaw API authentication tokenTWILIO_ACCOUNT_SID- Twilio Account SIDTWILIO_AUTH_TOKEN- Twilio Auth Token
ELEVENLABS_API_KEY- ElevenLabs API keyELEVENLABS_VOICE_ID- Voice ID (default: Adam)AWS_ACCESS_KEY_ID- AWS credentials for Polly fallbackAWS_SECRET_ACCESS_KEY- AWS credentials for Polly fallback
- Create Web Service from this repo
- Add Environment Variables (see above)
- Set Start Command:
npm start - Upgrade to Paid Tier ($7/mo) - eliminates cold starts
Similar process - add environment variables and deploy.
- Go to Twilio Console → Phone Numbers
- Set Voice Webhook:
https://your-service.onrender.com/voice - Set SMS Webhook:
https://your-service.onrender.com/sms - Save changes
Call or text your Twilio number. The system will:
- Receive your speech/text
- Send it to OpenClaw for processing
- Get intelligent response with full context
- Convert to speech (for calls) or text (for SMS)
- Play/send response back to you
npm install
export GATEWAY_URL=https://your-gateway.openclaw.ai
export GATEWAY_TOKEN=your_token_here
export TWILIO_ACCOUNT_SID=ACxxxxx
export TWILIO_AUTH_TOKEN=xxxxx
npm startTo get your Gateway token:
- Log into OpenClaw web interface
- Go to Settings → API
- Generate a new token with
sessions.sendpermission - Copy token and add to environment variables
- Express.js - Web server
- Twilio SDK - TwiML generation
- Axios - OpenClaw API calls
- ElevenLabs - Premium TTS (primary)
- AWS Polly - TTS fallback
- Audio Caching - Fast responses for repeated phrases
- Render Free Tier: Has cold starts (30s delay)
- Render Paid ($7/mo): Always-on, instant response
- ElevenLabs: ~$0.30 per 1000 characters
- AWS Polly: ~$4 per 1 million characters
- Twilio: ~$0.01-0.02 per minute for calls
ElevenLabs (when configured):
- Natural, human-like speech
- Multiple voice options
- Emotional range
- Premium pricing
AWS Polly (fallback):
- Neural voices available
- Reliable, fast
- Lower cost
- Slightly robotic
Each phone number gets its own OpenClaw session with label voice-{phone_number}.
This means:
- Conversation context is maintained
- Memory persists across calls
- Can reference previous interactions
- "Remember when I asked about weather earlier?"
Application Error on call:
- Service is sleeping (free tier) - call again or upgrade
- Check Render logs for errors
"I'm having trouble connecting":
- Check
GATEWAY_URLandGATEWAY_TOKENare correct - Verify OpenClaw Gateway is running
- Check Render logs for API errors
Robotic voice:
- ElevenLabs not configured, using Polly fallback
- Add
ELEVENLABS_API_KEYandELEVENLABS_VOICE_ID
No response:
- OpenClaw session timeout (increase
timeoutSecondsin code) - Check OpenClaw Gateway logs
MIT