Skip to main content

Integrate your voice AI Agent with your contact center technology

Integrating Ada with your contact center technology is as simple as transferring a phone call:

  • You can transfer a call from your contact center platform to Ada
  • You can transfer a call from Ada to your contact center platform when human support is required

There are two different types of call transfers. Your AI Agent can receive or transfer phone calls using either option:

  • Public Switched Telephone Network (PSTN) transfers made over the phone network
  • Session Initiation Protocol (SIP) transfers made over the public internet

The one you'll choose depends on the capabilities of your contact center platform.

Understand the types of call transfers

Public Switched Telephone Network (PSTN) transfers

PSTN transfers are made using the phone network. To transfer a phone call, you just need to provide the phone number you want to transfer to, and don't need to configure anything else.

BenefitsDrawbacks

Easy to configure - to make a call or transfer, you just need to dial a phone number

Supported by all contact center platforms

More expensive

Not possible to include metadata with calls

Session Initiation Protocol (SIP) transfers

If your contact center platform supports SIP transfers, you can take advantage of the cost savings and additional features that are possible when transferring calls over the internet.

BenefitsDrawbacks

More cost efficient

Can sometimes include metadata with call transfers, depending on what your contact center platform supports

Not supported by all contact center platforms

Configuration can be more complicated in contact center platforms

Integrate your AI Agent with your contact center platform

This section takes you through how to integrate your contact center platform with Ada Voice. If you don’t see your contact center platform listed here, you can contact your Ada team to determine the best way to integrate. Ada Voice can integrate with any contact center platform.

Integrate Voice with Aircall

This section takes you through how to transfer calls between Ada and Aircall.

Get calls into Ada

  • If you want your AI Agent to answer all calls that are made to a phone number, the best option is to port your existing phone number to the Twilio account that you will use with Ada. For more information, see Porting a Phone Number to Twilio at Twilio's Help Center.
  • If you do not want your AI Agent to answer all calls that are made to a phone number, OR if you do not want to port your phone number to Twilio, then you can forward calls to an external number from Aircall to send inbound calls to your AI Agent. For more information, see Using Aircall's Forward to External Number Feature at Aircall's documentation.

Escalate calls directly to agents using Aircall

If a caller using your AI Agent needs to escalate to a human agent, you can hand them off using a SIP transfer to Aircall.

  1. Use the Transfer Call block in your handoff to make a SIP transfer to Aircall.
  2. In the Phone number or SIP address field, enter <DID>@<AIRCALL_SIP_IP_ADDRESS>, where:
    • <DID>: The destination number in Aircall you want to reach, in E164 format with a leading +.
    • <AIRCALL_SIP_IP_ADDRESS>: The IP address of Aircall’s SBC – this is something that your Aircall or Ada team can provide to you
  3. Select the checkbox beside Include a User-to-User header when transferring to the SIP address.
  4. Click +Add another row.
  5. For Key, enter the key name phone_number.
  6. For Value, select the phone_number metavariable.

If required, you can assign different phone numbers to different departments. For example, you can configure one number for handoffs related to billing issues, and another one related to sales inquiries. To do this, configure your agent number in Aircall. To learn how to do this, see Creating a New Number in Aircall at Aircall's documentation.

Integrate Voice with Twilio Flex

This section takes you through how to transfer calls between Ada and Twilio Flex.

Get calls into Ada

  • If you want your AI Agent to answer all calls that are made to a phone number, the best option is to configure your AI Agent to use that phone number. For more information, see Set up your Twilio account
  • If you don't want your AI Agent to answer all calls that are made to a phone number, then you can choose to just forward certain calls from Twilio Flex to Ada using Twilio Studio and a SIP transfer:
    1. Request the following from Ada:
      • Ada Voice SIP Proxy address
      • Voice SIP Proxy secret key
      • Sender name
    2. In Twilio Studio, in the UUI header, add a phone_number field, and set the value to the end user’s phone number.
    3. Go to Twilio > Services, and use the secret key and sender name you got from Ada to generate an authentication signature by defining a function:
      const crypto = require('crypto');

      // Helper function to get rounded time
      function getRoundedTime() {
      const now = new Date();
      now.setUTCMinutes(Math.floor(now.getUTCMinutes() / 10) * 10);
      now.setUTCSeconds(0, 0);
      return Math.floor(now.getTime() / 1000);
      }

      // Function to generate authentication signature
      function generateAuthenticationSignature(twilioCallId, secret) {
      const roundedTime = getRoundedTime();
      const message = `${twilioCallId}|${roundedTime}`;
      console.log("Rounded Time: ", roundedTime);
      if (!secret) {
      throw new Error('VOICE_SIP_PROXY_SECRET not found.');
      }
      const hmac = crypto.createHmac('sha3-256', secret);
      hmac.update(message);
      const hmacSignature = hmac.digest('hex');
      sender = "TEST_TFLEX"
      return `${twilioCallId}|${hmacSignature}|${sender}`;
      }

      // Twilio Function
      exports.handler = function (context, event, callback) {
      let authSignature = ""
      try {
      const twilioCallId = event.CallSid;
      const secret = context.VOICE_SIP_PROXY_SECRET
      authSignature = generateAuthenticationSignature(twilioCallId, secret);
      } catch (error) {
      console.error('Error generating authentication signature:', error.message);
      }
      const response = new Twilio.Response();
      console.log('Authentication Signature:', authSignature);
      response
      .setStatusCode(200)
      .appendHeader('Content-Type', 'application/json')
      .setBody({
      everything: encodeURIComponent(authSignature),
      });

      return callback(null, response);
      };
    4. Use a Run Function widget to pass the output from the above to a linked Connect Call To widget.
    5. In the Connect Call To widget, set the SIP endpoint.

Escalate calls directly to agents using Twilio Flex

If a caller using your AI Agent needs to escalate to a human agent, you can hand them off using a SIP transfer to Twilio Flex. You can modify Twilio Studio to process inbound calls from Ada Voice.

These transfers can contain user-to-user information (UUI) headers, which can contain information about the caller and their inquiry.

To do this, make sure you have the following:

  • A SIP domain on Twilio, which is where Voice will transfer the call to, and which will forward the call to a Twilio Studio Flow
  • An instance of Twilio Flex
  1. Set up a basic trigger in Twilio Studio
    1. Go to Studio > Flows > Create new flow, and give your flow a name, e.g., voice-twilio-flex-flow.

    2. Create a simple branch off of incoming calls, and add a Say or Play block to it. Here's an example, where incoming calls get the message "Transfer from Ada complete":

      Make sure you save and publish your flow.

    3. Configure your SIP domain to forward incoming calls to this flow.

    4. On your Ada dashboard, create a Transfer Call block to your SIP domain so you can try transferring calls to your new flow.

      If the transfer is successful, you should hear the message you added; in our example, "Transfer from Ada complete."

  2. Extract UUI headers
    1. In the flow you created, add a function to the Say/Play block, with the following attributes:
      • Widget name: Add a name
      • Service: HEX-to-ASCII
      • Environment: ui
      • Function: /getUUIHeaders
      • Function URL: https://hex-to-ascii-3794.twil.io/getUUIHeaders
      • Function Parameters: set UUI_Headers to {{trigger.call.SipHeader_User-to-User}}
    2. Go to Develop > Function sand Assets > Services.
    3. Define the service and implementation of the function. Here's an example of a function that extracts the UUI headers, and decodes them from HEX if needed:
      exports.handler = function(context, event, callback) {
      let twiml = new Twilio.twiml.VoiceResponse();

      // Check if UUI_Headers exists and contains "encoding=hex"
      if (event.UUI_Headers && event.UUI_Headers.includes("encoding=hex")) {
      // Step 2: Remove everything from the first ";" onwards
      let uui = event.UUI_Headers.split(';')[0];

      // Step 3: Check if the hex encoded string starts with "XX" and remove it
      if (uui.startsWith("XX")) {
      uui = uui.substring(2);
      }

      // Step 4: Decode the hex string to ASCII
      let asciiString = hexToAscii(uui);
      console.log('Decoded UUI:', asciiString);

      // You can use the decoded string as needed; here we just return it in the response for demonstration
      twiml.say(`Decoded UUI Header: ${asciiString}`);
      } else {
      // If "encoding=hex" is not found, or UUI_Headers does not exist, return the UUI_Headers field as is
      console.log('UUI_Headers:', event.UUI_Headers);
      twiml.say('UUI Headers do not require decoding.');
      twiml.say(`UUI Header: ${asciiString}`);
      }

      return callback(null, twiml);
      };

      // Helper function to convert hex to ASCII
      function hexToAscii(hexStr) {
      var hex = hexStr.toString(); //force conversion
      var str = '';
      for (var i = 0; i < hex.length; i += 2)
      str += String.fromCharCode(parseInt(hex.substr(i, 2), 16));
      return str;
      }
    4. Click Deploy All to deploy your changes, and turn on the Live logs on toggle.
    5. Try transferring a call again like you did earlier, but this time, include some UUI variables. You should see those extracted variables in your live logs.
Integrate Voice with Dixa

This section takes you through how to transfer calls between Ada and Dixa.

Get calls into Ada

  • If you want your AI Agent to answer all calls that are made to a phone number, the best option is to port your existing phone number to the Twilio account that you will use with Ada. For more information, see Porting a Phone Number to Twilio at Twilio's Help Center.
  • If you do not want your AI Agent to answer all calls that are made to a phone number OR if you do not want to port your phone number to Twilio, then you can forward calls to an external number from Dixa to send inbound calls to your AI Agent. For more information, see the Forward call section in Create a Phone Flow at Dixa's documentation.

Escalate calls directly to agents using Dixa

If a caller using your AI Agent needs to escalate to a human agent, you can hand them off using a SIP transfer to Dixa.

  1. Get the Ada IP address allowlist from your Ada team.
  2. Ask your Dixa Team to allowlist the Ada IPs, and ask them for your Dixa SIP domain.
  3. In your Dixa instance, go to Settings > Phone, and configure a DID number.
  4. On the Ada dashboard, in your handoff, use the Transfer Call block to make a SIP transfer to Dixa.
  5. In the Phone number or SIP address field, enter <DID>@<DIXA_SIP_DOMAIN>, where:
    • <DID>: The destination number in Dixa that is being reached, in E164 format with a leading +.
    • <DIXA_SIP_DOMAIN>: Dixa’s SIP domain, which you got from the Dixa team.
  6. Select the checkbox beside Include a User-to-User header when transferring to the SIP address.
  7. Click +Add another row.
  8. For Key, enter the key name phone_number.
  9. For Value, select the phone_number metavariable.

If required, you can assign different phone numbers to different departments. For example, you can configure one number for handoffs related to billing issues, and another one related to sales inquiries. To learn how to do this, see Buy a Phone Number at Dixa’s documentation.

Integrate Voice with Genesys Cloud

Get calls into Ada

  1. Log into your Genesys Cloud account, then go to the Admin tab.

  2. Under Telephony, click Trunks.

  3. On the External Trunks tab, click Create New. The Create External Trunk page opens.

  4. On the Create External Trunk page, fill in the following fields:

    1. Under External Trunk Name, enter a name (e.g., Ada Voice trunk).

    2. Under Type, select BYOC Carrier and Generic BYOC Carrier.

    3. Under Protocol, select TLS.

  5. In the Inbound section, fill in the following fields:

    1. Under Number Plan Site, select your main Genesys site. For more information, see About sites at the Genesys Cloud Resource Center.

    2. Under Inbound SIP Termination Identifier, enter a name (e.g., ada-voice).

    3. You can leave the Inbound SIP Termination Header field blank.

  6. In the Outbound section, fill in the following fields:

    1. Under Outbound SIP Termination FQDN, enter your SIP domain.

    2. Under Outbound SIP DNIS, enter admin.

    3. Under SIP Servers or Proxies, in the Hostname or IP Address field, enter your SIP domain, and in the Port field, enter 5061. Then, click the + icon to add it.

  7. Under SIP Access Control, in the Add an IP or CIDR address field, enter each of the following CIDR addresses, one at a time, and click the + icon to add it.

    These are all of Twilio's SIP IP addresses. For more information, see IP Addresses for Elastic SIP Trunking Services at Twilio Docs.

    168.86.128.0/18
    54.172.60.0/30
    54.172.60.0/23
    34.203.250.0/23
    54.244.51.0/30
    54.244.51.0/24
    54.171.127.192/30
    54.171.127.192/26
    52.215.127.0/24
    35.156.191.128/30
    35.156.191.128/25
    3.122.181.0/24
    54.65.63.192/30
    54.65.63.192/26
    3.112.80.0/24
    54.169.127.128/30
    54.169.127.128/26
    3.1.77.0/24
    54.252.254.64/30
    54.252.254.64/26
    3.104.90.0/24
    177.71.206.192/30
    177.71.206.192/26
    18.228.249.0/24
  8. Click the Protocol section of the page to expand it. Then, under User to User Information (UUI), do the following:

    1. Click the UUI Passthrough toggle so it's Enabled.

    2. Under Type, select User-to-User PD Attribute.

    3. Under Encoding Format, select Ascii.

  9. Under Transfer, click the Take Back and Transfer and Release Link Transfer (RLT) toggles so they're both Enabled.

  10. Click Save External Trunk.

Connect your SIP trunk to a number plan

  1. In Genesys Cloud, go to Telephony > Sites and select your main site. For more information, see About sites at the Genesys Cloud Resource Center.

  2. On the Number Plans tab, click New Number Plan.

  3. On the page that opens, fill in the following fields:

    1. Under Number Plan Name, enter a name.

    2. Under Match Type, select E.164 Number List.

    3. Under Numbers, enter the range of numbers that, when dialed from your system, will transfer to Ada Voice. These can be placeholders, and they can be the same number to indicate that the range only contains one phone number.

    4. Under Classification, choose a classification.

  4. Click Save Number Plans.

  5. On the Outbound Routes tab, click New Outbound Route.

  6. On the page that opens, fill in the following fields:

    1. Under Outbound Route Name, enter a name.

    2. Under Classifications, choose one or more classifications.

    3. Under External Trunks, click Select External Trunks and select the SIP trunk you created.

    4. Under Classifications, add a classification for your Outbound Route. This must match the Classification that you used for your Number Plan.

  7. Click Save Outbound Routes.

Create a call flow that transfers to Ada Voice

  1. In Genesys Cloud, on the Admin tab, click Architect.

  2. Select the call flow you want to transfer to Ada Voice. The Inbound Call Flow page opens.

  3. On the Inbound Call Flow page, under Toolbox, click Task to expand it, then drag the Task action into your Starting Menu. This creates the task we use to transfer callers to Ada Voice. The New Task pane opens.

  4. Under Toolbox, click Data to expand it, then drag the Set UUI Data action into the New Task pane, into the Drag action here box. The Set UUI Data pane opens.

  5. In the Set UUI Data pane, under Outgoing UUI Data, beside the Enter value field, click the menu that has an icon of a document on it, and select String Builder.

  6. Click the same menu again and click Expression. The String Builder window opens. In the String Builder window, under Expression, enter this string:

    Append("phone_number=", Replace(Call.Ani, "tel:", ""))

    This is a Genesys expression that extracts the caller's number and adds it to the UUI header in the format Ada Voice expects (e.g., phone_number=+14035555555).

  7. Click Save to save the string and close the String Builder window.

  8. Under Toolbox, click Transfer to expand it, then drag the Transfer to Number action into the New Task pane, under the Set UUI Data action you just added. The Transfer to Number pane opens.

  9. In the Transfer to Number pane, do the following:

    1. Under Number, enter the number you added in your number plan earlier.

    2. Under Perform release link transfer, select True.

    3. Under Audio, under Pre-Transfer Audio and Failed Transfer Audio, enter messages for Genesys to play to callers before transferring them and to let them know the transfer failed, respectively.

  10. Under Toolbox, click Disconnect to expand it, then drag the Disconnect action into the New Task pane, under the Transfer to Number action you just added.

  11. Click Publish.

At this point, you should be able to call your Genesys Cloud IVR and be successfully transferred to Ada Voice.

Escalate calls directly to agents using Genesys Cloud

If a caller using your AI Agent needs to escalate to a human agent, you can hand them off using a SIP transfer to Genesys Cloud.

  1. On the Ada dashboard, in your handoff, use the Transfer Call block to make a SIP transfer to Genesys Cloud.
  2. In the Phone number or SIP address field, enter <DID>@admin.byoc.usw2.pure.cloud, where <DID> is the destination number in Genesys Cloud that is being reached, in E164 format with a leading +.
  3. Select the checkbox beside Include a User-to-User header when transferring to the SIP address.
  4. Click +Add another row.
  5. For Key, enter the key name phone_number.
  6. For Value, select the phone_number metavariable.
  7. Click +Add another row.
  8. Provide any additional key value pairs that you want sent to Genesys Cloud.