This guide walks through connecting Twilio to Frona so agents can make phone calls.
Prerequisites
- A Twilio account
- A Twilio phone number
- A publicly accessible URL for your Frona instance (or ngrok for development)
1. Get your Twilio credentials
From the Twilio Console:
- Account SID: found on the dashboard
- Auth Token: found on the dashboard (click to reveal)
- Phone Number: the number you purchased or were assigned
2. Configure Frona
Add the Twilio settings to your environment or config file:
# Environment variables
FRONA_VOICE_TWILIO_ACCOUNT_SID=ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
FRONA_VOICE_TWILIO_AUTH_TOKEN=your-auth-token
FRONA_VOICE_TWILIO_PHONE_NUMBER=+15551234567
FRONA_VOICE_CALLBACK_BASE_URL=https://your-public-url.comThe callback URL must be publicly accessible. Twilio sends call events (connection status, speech input) to this URL.
Callback URL for production
Set FRONA_VOICE_CALLBACK_BASE_URL to your public domain:
FRONA_VOICE_CALLBACK_BASE_URL=https://frona.example.comCallback URL for development
If you're running Frona locally, use ngrok to create a public tunnel:
ngrok http 3001Then set the callback URL to the ngrok URL:
FRONA_VOICE_CALLBACK_BASE_URL=https://abc123.ngrok-free.app3. Restart Frona
Restart the service to pick up the new configuration.
4. Test it
Start a conversation with the Receptionist agent and ask it to make a call:
Call +15559876543 and ask about their business hours.
The agent will:
- Read your memory for relevant context
- Initiate the call via Twilio
- Handle the conversation
- Report back with the results
Phone number format
All phone numbers must be in E.164 format: + followed by the country code and number, with no spaces or dashes.
- Correct:
+15551234567 - Incorrect:
(555) 123-4567,555-123-4567
Troubleshooting
- Calls not connecting. Verify your Twilio credentials and that the phone number is active.
- Callback errors. Check that
FRONA_VOICE_CALLBACK_BASE_URLis publicly accessible from the internet. - Agent not making calls. Verify the agent has the
voice_calltool group enabled. The built-in Receptionist agent has it by default.