Elevenlabs AI Integration - AI Voice Bots

If you would like to utilize an AI Voice Bot with your Genius Phone Numbers or Contact Center, you have a few options of different AI Bot integrations available within Genius.

Elevenlabs is a leading provider in the AI Voice Bot space and provides a one-stop shop for your AI Voice Bot needs.

 

For an Elevenlabs AI Bot, you will need:

  • At least 1 AVOXI phone number
  • An Elevenlabs account
  • At least 1 Elevenlabs Agent setup

Setting up an Elevenlabs AI Bot via SIP URIs (Inbound Calls)

  1. Create an Account within Elevenlabs.io 
  2. In the left sidebar (in the ElevenAgents space) create a new Voice Agent. 
    1. Choose a Blank Agent or a template and give the AI Bot a name
    2. Add a system prompt to the Agent - give it a quick description of what you want the Agent to do (helpful for testing, you can always come back and update this later)
  3. Next, create a Voice Channel in Elevenlabs
    1. When logged into Elevenlabs, in the left sidebar go to the Channels page and choose the Telephony channel
    2. In Telephony settings click Add a Number and choose “From SIP” then enter the phone number you will be using for this AI Bot
    3. In your SIP settings, choose what Agent will take calls on this number and save. You don't need to change any other settings at this time.
    4. On the Phone Number Details sidebar, copy the SIP Server TCP settings (or TLS settings if you want to use encrypted SIP)
      1. This will be required in Genius shortly
      2. example: sip:sip.rtc.elevenlabs.io:5060;transport=tcp
  1. AVOXI SIP URI Setup - Login to Genius
    1. Go to SIP setup
    2. Add a new SIP URI
      1. Create a name for the SIP URI - like “Elevenlabs Agent”
      2. Make sure in the SIP Connection field that Custom SIP is chosen
      3. Leave authentication Off
      4. Choose TCP (or TLS for Encrypted SIP) for the Protocol
      5. in the URI field
        1. Put the phone number in the first field (in the custom field at the bottom of the dropdown type in the phone number then click the + to the right to add that number to the field
        2. After the @ - enter sip.rtc.elevenlabs.io
        3. For the port (rightmost field) - enter 5060 (or 5061 for TLS)
        4. Check the preview to make sure it looks correct
  1. Go to the Phone Number in Genius and make sure it is now routing to the Elevenlabs SIP URI we just set up
  1. Make a test call to that phone number and ensure it routes to your Elevenlabs AI Bot we set up. If the call fails by immediately disconnecting, re-check the above settings and make sure you didn't miss any setup steps.

 

Setting up an Elevenlabs AI Bot via SIP Trunk (Outbound Calls)

  1. AVOXI SIP Trunk Setup - Login to Genius
    1. Go to the SIP → SIP Trunks page
    2. Click Add SIP Trunk (you can use an existing trunk if you already have one)
      1. Note: This will incur an additional monthly charge, details shown when you add the SIP Trunk
      2. Give your SIP Trunk a name - like “Elevenlabs SIP Trunk”
      3. Give your SIP Trunk a subdomain - like "elevenlabstrunk"
      4. Make sure to choose the correct protocol (e.g. TCP or TLS)
      5. Make sure Authentication is set to Basic and set a unique username and password - these will be needed in Elevenlabs
      6. Save, then navigate to the Setup Instructions tab for instructions on that SIP Trunk which will contain the details you'll need for the next step (in addition to the username and password you just set)
  1. Login to Elevenlabs and go to your ElevenAgents section with your Agent selected
    1. Go to the Channels screen via the left sidebar
    2. Choose the Number you set up when configuring Inbound calls (see instructions above) and Edit that Number
    3. Scroll down to the Outbound Configuration section and retrieve the following details from the SIP Trunk in Genius
      1. From the Setup Instructions page on the SIP Trunk - copy the DNS Host Name and then paste this into the Address field
      2. Update your transport type to TCP or TLS based on what you set up in Genius
      3. Change Media Encryption to either Disabled (TCP) or Required (TLS)
      4. Paste your SIP Trunk Username and Password here and then click Update
  2. Run an Outbound test call from the Number sidebar in Elevenlabs
    1. This will let you validate that the number is set up and working correctly and outbound calls can be initiated from Elevenlabs

 

Setting up an Elevenlabs AI Bot call transfers (via SIP REFER)

  1. Login to Elevenlabs and go to your ElevenAgents section with your Agent selected
    1. Go to the Tools page via the left sidebar
    2. In the System tools section, enable Transfer to Number
      1. In Transfer to Number, Human Transfer Rules section, add a rule
      2. Set the Transfer Type to SIP REFER
      3. Set the SIP URI to your DNS Host Name in the Setup Instructions of your SIP Trunk in Genius (previously used when setting up the SIP Trunk in Elevenlabs)
        1. At the beginning of the DNS - add the SIP Protocol and the extension in Genius you would like to transfer to
        2. Example: sip:908701@00005-receptionistagent.us1.trunks.avoxi.com
          1. Note: 908701 here is an extension within Genius the call will be sent to
          2. If you'd like to transfer to a specific number, rather than an extension in Genius, set the SIP URI to sip:[e.164 Number]@avoxi.io instead of the above SIP Trunk - this will transfer the calls through AVOXI's servers and on to the number specified
      4. Do not add Custom SIP Headers, they will be removed when transferring into AVOXI's network
      5. Make sure to add the conditions when you want this transfer to trigger, such as when asking to be escalated
      6. Continue adding and creating additional rules for additional destinations
      7. Save the Transfer to number configuration
      8. Make sure to click Publish in the top-right to make sure these changes are live with your Agent.
  1. Call into the number and trigger a transfer and confirm that the call is transferred to the expected destination

Transferring to destinations within Genius

The most common approach to setting up transfer to Genius is to transfer to a Flow in Flow Builder. All Flows are given an extension once published which you can view from the Flows screen.
This allows you to get the call into Genius and then route to your destination of choice just by updating the Flow, providing maximum flexibility. 

 

 

 

Setting Up Context Transfer from Elevenlabs to Genius or other CCaaS systems (when transferring via SIP REFER)

User-to-User Information (UUI)

UUI is not currently a support SIP Header when transferring calls into our through Genius. We are planning to add support for this soon. Please reach out to support@avoxi.com with any questions

 

If you would like to transfer context of a call alongside the call when escalating or transferring a call back through Genius, follow the below steps. 

Call context usually includes things like:

  • Caller Name
  • Duration of call with Elevenlabs Agent
  • Reason call was transferred
  • Summary of the call so far
  • Language the call has been taken in (in Elevenlabs)

 

  1. See previous instructions for setting up transfer via SIP REFER
    1. Important: SIP REFER required to transfer context with Elevenlabs.  Other transfer types may not preserve the X-AVOXI-CALL-ID header that needs to be passed into Genius and downstream systems.
  2. Once Transfer to number tool is set up in Elevenlabs, run a test call and confirm you see the following field when viewing via the Conversations screen in Elevenlabs:
    1. You're specifically looking for the sip_avoxi_call_id Dynamic variable on the Client data (or SIP) tab - if that is present and you can see a sip_avoxi_call_id present for all calls from AVOXI, then you can continue
  3. Generate a new API Key in Elevenlabs
    1. Go to elevenlabs.io/app/settings/api-keys
    2. Create an API Key
    3. Give Read access to ElevenAgents
    4. Create the API Key and make sure to copy the API key down somewhere safe, this will be the only time you can view the API Key in the Elevenlabs UI. We'll be using this shortly.
  4. Set up the API Call in your Contact Center system
    1. For purposes of illustration, this will be set up in the AVOXI Genius Contact Center.  Any Contact Center with Webhook/API Call support + SIP support for Inbound calls should work
    2. Create a new Call Flow (or equivalent in your CCaaS system)
    3. Set up a webhook
      1. Endpoint: https://api.elevenlabs.io/v1/convai/conversations?dynamic_variable_params=sip_avoxi_call_id:eq:[AVOXI Call ID]&summary_mode=include
        1. Replace [AVOXI Call ID] with the X-AVOXI-CALL-ID from the SIP Header
        2. Make sure to include the dynamic variable parameter here, that is what will allow you to search Elevenlabs calls based on the AVOXI Call ID
        3. Make sure to include the &summary_mode=include - this will include the longer call summary in the response
      2. Auth Header:
        1. xi-api-key: [YOUR Elevenlabs API Key HERE]
      3. Field Mapping
        1. You can test the above API call with a past call to test it out. You should see a response like the below which you can use to map to fields in your CCaaS system
        2. {
          "conversations":[
          0:{
          "agent_id":"Ewje4wyfsQH9yBHqEUBp",
          "agent_name":"AI-Keith",
          "branch_id":"agtbrch_1601ks2d8wp0edetzr1z5qcynj22",
          "call_duration_secs":26,
          "call_success_score":NULL,
          "call_successful":"success",
          "call_summary_title":"AVOXI China Transfer",
          "conversation_id":"conv_7801m3z3ef9peagb51pvyjatm24r",
          "conversation_initiation_source":"sip_trunk",
          "data_collection_results":NULL,
          "direction":"inbound",
          "evaluation_criteria_results":NULL,
          "main_language":"en",
          "message_count":7,
          "rating":NULL,
          "sentiment_analysis":{...},6 items
          "start_time_unix_secs":1790971428,
          "status":"done",
          "tag_ids":[],0 items
          "termination_reason":"Call was transferred to number",
          "tool_names":[...],1 item
          "transcript_summary":"The user inquired if AVOXI offers numbers in China. The agent confirmed that AVOXI provides local presence dialing services in China through its TrueLocal solution. The user then requested to be transferred to a live agent, and the agent initiated the transfer.",
          "version_id":"agtvrsn_0801m3z2mnkpfsq8vb04vp0gyb27"
          }23 items
          ],1 item
          "has_more":false,
          "next_cursor":NULL
          }
        3. Working example from within Genius - notice the field mapping on the Webhook Response section which maps to fields that can be used in Conditional Routing, Screenpops, or other Webhooks:
      4. Elevenlabs documentation on this endpoint: https://elevenlabs.io/docs/api-reference/conversations/get
  5. Run a Test Call
    1. Call the number you have routing to Elevenlabs, ensure the AI Agent picks up, discuss something on the call so you can verify accuracy of the context, then ask the AI Agent to transfer you to the transfer tool you previously set up.
    2. After the call, check in your Contact Center system for the following:
      1. Call was answered, and then transferred to a SIP REFER where it was sent to an Agent/Team/Destination
      2. API Call to Elevenlabs was sent and returned data for a call matching the AVOXI Call ID for that call

Delay before retrieving Call Context

In testing we noticed that if we sent an API Call to Elevenlabs immediately after the call transfer, the Call Context may not yet be available. You should build a short delay into your Flow before running the API Call to Elevenlabs to retrieve the context. A 1-3 second delay should be sufficient, and a smaller delay may work as well. 


If you play a message, such as a queue message, after transfer from the AI Bot then it should work well to put the API Call/Webhook just after that message.

 

 

 

 

Was this article helpful?

Have more questions? Submit a request

Updated:

October 2nd, 2026

Author:

Curtis Foster

Updated By:

Curtis Foster

KB ID:

3957174

Page Views:

1946

Tags:

voice bots, ai integration

Can't find what you're looking for?

Contact our award-winning customer care team.