This guide covers an advanced integration pattern for developers who need full control over their Twilio infrastructure. For a simpler setup, consider using the native Twilio integration which handles configuration automatically.
Before diving in, understand the trade-offs between the native integration and the register call approach:
The register call endpoint allows you to use your own Twilio infrastructure while leveraging ElevenLabs agents for the conversation. Instead of importing your Twilio number into ElevenLabs, you maintain full control of your Twilio setup and use the ElevenLabs API to register calls and receive TwiML for connecting them to your agents.
This approach is ideal when you:
When using the register call endpoint, call transfer functionality is not available as ElevenLabs does not have direct access to your Twilio account credentials.
Before using the register call endpoint, configure your agent to use the correct audio format supported by Twilio.
The register call endpoint accepts the following parameters:
The endpoint returns TwiML that you should pass directly to Twilio.
For outbound calls, initiate the call through Twilio and point the webhook URL to your server, which then registers with ElevenLabs:
Use the conversation_initiation_client_data parameter to pass dynamic variables and override agent configuration:
For more information about dynamic variables and overrides, see the dynamic variables and overrides documentation.
Configure your Twilio phone number to point to your server:
https://your-ngrok-url.ngrok.app/twilio/inbound)
When using the register call endpoint instead of the native integration: