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_SERVER_EXTERNAL_URL=https://your-public-url.com
FRONA_VOICE_TWILIO_ACCOUNT_SID=ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
FRONA_VOICE_TWILIO_AUTH_TOKEN=your-auth-token
FRONA_VOICE_TWILIO_FROM_NUMBER=+15551234567FRONA_SERVER_EXTERNAL_URL must be publicly accessible. Twilio sends call events (connection status, speech input) to this URL. The same value is used by other inbound integrations like SMS and Telegram, so set it once.
External URL for production
Set FRONA_SERVER_EXTERNAL_URL to your public domain:
FRONA_SERVER_EXTERNAL_URL=https://frona.example.comExternal URL for development
If you're running Frona locally, use ngrok to create a public tunnel:
ngrok http 3001Then set the external URL to the ngrok URL:
FRONA_SERVER_EXTERNAL_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_SERVER_EXTERNAL_URLis publicly accessible from the internet. - Agent not making calls. Verify the agent has the
voice_calltool group enabled in its policies. The built-in Receptionist agent has it by default.