SIP trunking

Connect your existing phone system with ElevenLabs conversational AI agents using SIP trunking

Overview

SIP (Session Initiation Protocol) trunking allows you to connect your existing telephony infrastructure directly to ElevenLabs conversational AI agents. This integration enables enterprise customers to use their existing phone systems while leveraging ElevenLabs’ advanced voice AI capabilities.

With SIP trunking, you can:

  • Connect your Private Branch Exchange (PBX) or SIP-enabled phone system to ElevenLabs’ voice AI platform
  • Route calls to AI agents without changing your existing phone infrastructure
  • Handle both inbound and outbound calls
  • Leverage encrypted TLS transport and media encryption for enhanced security

How SIP trunking works

SIP trunking establishes a direct connection between your telephony infrastructure and the ElevenLabs platform:

  1. Inbound calls: Calls from your SIP trunk are routed to the ElevenLabs platform using your configured SIP INVITE address.
  2. Outbound calls: Calls initiated by ElevenLabs are routed to your SIP trunk using your configured hostname, enabling your agents to make outgoing calls.
  3. Authentication: Connection security for the signaling is maintained through either digest authentication (username/password) or Access Control List (ACL) authentication based on the signaling source IP.
  4. Signaling and Media: The initial call setup (signaling) supports multiple transport protocols including TLS for encrypted communication. Once the call is established, the actual audio data (RTP stream) can be encrypted based on your media encryption settings.

Requirements

Before setting up SIP trunking, ensure you have:

  1. A SIP-compatible PBX or telephony system
  2. Phone numbers that you want to connect to ElevenLabs
  3. Administrator access to your SIP trunk configuration
  4. Appropriate firewall settings to allow SIP traffic
  5. TLS Support: For enhanced security, ensure your SIP trunk provider supports TLS transport
  6. Audio codec compatibility: Your system must support 48kHz audio or be capable of resampling audio on your end, as ElevenLabs’ SIP deployment outputs and receives audio at this sample rate. This is independent of any audio format configured on the agent for direct websocket connections.

Setting up SIP trunking

2

Import SIP Trunk

Click on “Import a phone number from SIP trunk” button to open the configuration dialog.

Select SIP trunk option
SIP trunk configuration dialog
3

Enter basic configuration

Complete the basic configuration with the following information:

  • Label: A descriptive name for the phone number
  • Phone Number: The E.164 formatted phone number to connect (e.g., +15551234567)
SIP trunk basic configuration
4

Configure transport and encryption

Configure the transport protocol and media encryption settings for enhanced security:

  • Transport Type: Select the transport protocol for SIP signaling:
    • TCP: Standard TCP transport
    • TLS: Encrypted TLS transport for enhanced security
  • Media Encryption: Configure encryption for RTP media streams:
    • Disabled: No media encryption
    • Allowed: Permits encrypted media streams
    • Required: Enforces encrypted media streams
Select TLS or TCP transport
Select media encryption setting

Security Best Practice: Use TLS transport with Required media encryption for maximum security. This ensures both signaling and media are encrypted end-to-end.

5

Configure outbound settings

Configure where ElevenLabs should send calls for your phone number:

  • Address: Hostname or IP address where the SIP INVITE is sent (e.g., sip.telnyx.com). This should be a hostname or IP address only, not a full SIP URI.
  • Transport Type: Select the transport protocol for SIP signaling:
    • TCP: Standard TCP transport
    • TLS: Encrypted TLS transport for enhanced security
  • Media Encryption: Configure encryption for RTP media streams:
    • Disabled: No media encryption
    • Allowed: Permits encrypted media streams
    • Required: Enforces encrypted media streams
SIP trunk outbound configuration

Security Best Practice: Use TLS transport with Required media encryption for maximum security. This ensures both signaling and media are encrypted end-to-end.

The Address field specifies where ElevenLabs will send outbound calls from your AI agents. Enter only the hostname or IP address without the sip: protocol prefix.

6

Add custom headers (optional)

If your SIP trunk provider requires specific headers for call routing or identification:

  • Click “Add Header” to add custom SIP headers
  • Enter the header name and value as required by your provider
  • You can add multiple headers as needed

Custom headers are included with all outbound calls and can be used for:

  • Call routing and identification
  • Billing and tracking purposes
  • Provider-specific requirements
7

Configure authentication (optional)

Provide digest authentication credentials if required by your SIP trunk provider:

  • SIP Trunk Username: Username for SIP digest authentication
  • SIP Trunk Password: Password for SIP digest authentication

If left empty, Access Control List (ACL) authentication will be used, which requires you to allowlist ElevenLabs IP addresses in your provider’s settings.

Authentication Methods:

  • Digest Authentication: Uses username/password credentials for secure authentication (recommended)
  • ACL Authentication: Uses IP address allowlisting for access control

Digest Authentication is strongly recommended as it provides better security without relying on IP allowlisting, which can be complex to manage with dynamic IP addresses.

8

Complete Setup

Click “Import” to finalize the configuration.

Assigning Agents to Phone Numbers

After importing your SIP trunk phone number, you can assign it to a conversational AI agent:

  1. Go to the Phone Numbers section in the Conversational AI dashboard
  2. Select your imported SIP trunk phone number
  3. Click “Assign Agent”
  4. Select the agent you want to handle calls to this number

Troubleshooting

If you’re experiencing connection problems:

  1. Verify your SIP trunk configuration on both the ElevenLabs side and your provider side
  2. Check that your firewall allows SIP signaling traffic on the configured transport protocol and port (5060 for UDP/TCP, 5061 for TLS)
  3. Confirm that your address hostname is correctly formatted and accessible
  4. Test with and without digest authentication credentials
  5. If using TLS transport, ensure your provider’s TLS certificates are valid and properly configured
  6. Try different transport types (Auto, UDP, TCP) to isolate TLS-specific issues

If calls are failing due to authentication issues:

  1. Double-check your SIP trunk username and password if using digest authentication
  2. Check your SIP trunk provider’s logs for specific authentication error messages
  3. Verify that custom headers, if configured, match your provider’s requirements
  4. Test with simplified configurations (no custom headers) to isolate authentication issues

If you’re experiencing issues with TLS transport or media encryption:

  1. Verify that your SIP trunk provider supports TLS transport on port 5061
  2. Check certificate validity, expiration dates, and trust chains
  3. Ensure your provider supports SRTP media encryption if using “Required” media encryption
  4. Test with “Allowed” media encryption before using “Required” to isolate encryption issues
  5. Try different transport types (TCP, UDP) to isolate TLS-specific problems
  6. Contact your SIP trunk provider to confirm TLS and SRTP support

If you’re having problems with custom headers:

  1. Verify the exact header names and values required by your provider
  2. Check for case sensitivity in header names
  3. Ensure header values don’t contain special characters that need escaping
  4. Test without custom headers first, then add them incrementally
  5. Review your provider’s documentation for supported custom headers

If the call connects but there’s no audio or audio only flows one way:

  1. Verify that your firewall allows UDP traffic for the RTP media stream (typically ports 10000-60000)
  2. Since RTP uses dynamic IP addresses, ensure firewall rules are not restricted to specific static IPs
  3. Check for Network Address Translation (NAT) issues that might be blocking the RTP stream
  4. If using “Required” media encryption, ensure both endpoints support SRTP
  5. Test with “Disabled” media encryption to isolate encryption-related audio issues

If you experience poor audio quality:

  1. Ensure your network has sufficient bandwidth (at least 100 Kbps per call) and low latency/jitter for UDP traffic
  2. Check for network congestion or packet loss, particularly on the UDP path
  3. Verify codec settings match on both ends
  4. If using media encryption, ensure both endpoints efficiently handle SRTP processing
  5. Test with different media encryption settings to isolate quality issues

Limitations and Considerations

  • Support for multiple concurrent calls depends on your subscription tier
  • Call recording and analytics features are available but may require additional configuration
  • Outbound calling capabilities may be limited by your SIP trunk provider
  • TLS Support: Ensure your SIP trunk provider supports TLS 1.2 or higher for encrypted transport
  • Media Encryption: SRTP support varies by provider; verify compatibility before requiring encryption
  • Audio format: ElevenLabs’ SIP deployment outputs and receives audio at 48kHz sample rate. This is independent of any audio format configured on the agent for direct websocket connections. Your SIP trunk system must either support this format natively or perform resampling to match your system’s requirements

FAQ

Yes, SIP trunking allows you to connect your existing phone numbers directly to ElevenLabs’ conversational AI platform without porting them.

ElevenLabs is compatible with most standard SIP trunk providers including Twilio, Vonage, RingCentral, Sinch, Infobip, Telnyx, Exotel, Plivo, Bandwidth, and others that support SIP protocol standards. TLS transport and SRTP media encryption are supported for enhanced security.

Yes, TLS transport is highly recommended for production environments. It provides encrypted SIP signaling which enhances security for your calls. Combined with required media encryption, it ensures comprehensive protection of your communications. Always verify your SIP trunk provider supports TLS before enabling it.

  • Auto: Automatically selects the best available transport protocol - UDP: Fastest but unencrypted signaling (good for internal networks) - TCP: Reliable but unencrypted signaling - TLS: Encrypted and reliable signaling (recommended for production) For security-critical applications, always use TLS transport.

Custom SIP headers allow you to include provider-specific information with outbound calls. Common uses include call routing, billing codes, caller identification, and meeting specific provider requirements.

The number of concurrent calls depends on your subscription plan. Enterprise plans typically allow for higher volumes of concurrent calls.

Yes, you can use your existing PBX system’s routing rules to direct calls to different phone numbers, each connected to different ElevenLabs agents.

Next steps