Set Up SIP Backchannel for SmartAssist

Complete the following tasks to set up a SIP backchannel connection between CXone and your SmartAssist virtual agent.

Complete each of these tasks in the order given.

Before You Begin

Before you can set up a SmartAssist SIP backchannel connection, you must:

  • Create and configure your virtual agent in the Amelia management console. Refer to the Amelia documentation for details.

  • Contact your Account Representative to provision a SIP number. The CXone connectivity team works with Amelia to obtain a 999 number and configure your Amelia virtual agent to use it. You will need the number when you set up SmartAssist in CXone Virtual Agent Hub.

Set Up Workflows in Amelia

Your SmartAssist virtual agent must have workflows in Amelia to handle the end of the conversation. These workflows must use the CXone Signal API. The script waits for the signal from Amelia that indicates the end of the conversation before continuing.

The workflows should handle the following situations:

  1. Log in to Amelia.

  2. In your virtual agent, create a workflow and add the workflow logic, including the intent that triggers the workflow.

    For a workflow where the virtual agent asks the contact if they want to speak to a live agent, the logic should handle both the yes and the no response.

  3. In the workflow for requesting transfer to a live agent, add a parameter to fetch the contact ID from the header. Use the header key voice_sip_x-incontactid. The following image shows an example of setting a parameter inContactID, which fetches the contact ID.

    You need the contact ID to use the CXone Signal API.

  4. Set another parameter to hold the attribute indicating whether the interaction is ending or escalating to a live agent. This value is passed by the Signal API to the Studio script.  The following image shows parameter P1 holding the value liveAgentHandoff.

    The following image shows the parameter P1 with the value endInteraction. This is added to the workflow for when the contact doesn't need to be transferred to a live agent.

  5. You can set other parameters to pass additional information to the Studio script in CXone, if needed.
  6. In the workflow where you connect to the Signal API, generate an access token using the POST /auth/token API call A square with an arrow pointing outside the lines. . This is required to connect with the Signal API. Configure the following parameters, using the keys and secrets generated previously:
    • User name: client key
    • Password: secret key
    • Header
    • Authorization: Basic {appSecret}
  7. Configure the workflow to pass the access token, contact ID, and the P1 attribute into the body of the CXone Signal API (POST /interactions/{contactId}/signal A square with an arrow pointing outside the lines. ). An example of this is shown in the following images.

Add a Virtual Agent Hub App with SIP Backchannel Enabled

Required permissions : View Scripts, Create/Edit Scripts

Virtual Agent Hub apps contain the configuration settings that CXone uses to connect to your virtual agent. This is where you enable the SIP backchannel connection in CXone.

  1. In Studio, open or create a script and add a virtual agent action, if it doesn't contain one already.
  2. Double-click the virtual agent action to open Virtual Agent Hub.
  3. Click Add Bot.
  4. Enter a Virtual Agent (Bot) Name and select . You cannot modify the name after creating the app.

  5. On the Add Bot page, verify that Call is selected in the Media Type drop-down in the top right corner of the page.
  6. Click SIP Configured to switch it On.
  7. Enter the Phone Number you obtained from the virtual agent provider. This is the SIP number, which connects CXone and Amelia.

  8. Enter Caller ID details. This field is optional.

  9. If you have SIP headers to pass when CXone calls the virtual agent, click Add SIP Headers, then enter a Header Name and Header Value. Repeat this step for each header you need to add.

  10. Click Next at the top of the Add Bot page and then click Add.

Create a Studio Script

Required permissions : View Scripts, Create/Edit Scripts

Your Studio script must use the Voicebot Conversation action to connect to the virtual agent. It needs to route contacts to the virtual agent, then wait for the Signal API response. When the script receives the signal from the virtual agent, it should act appropriately. In most cases, it will either end the interaction (End action) or request an agent (Reqagent action).

General guidelines for creating virtual agent scripts are available on the Autopilot (Amelia) page on this help site. However, not all of those guidelines apply to SIP backchannel connection scripts.

The following are requirements specific to a script for SIP backchannel connections: 

Example Script

The following image shows a basic example of a SIP backchannel script. Additional scripting may be required. For example, you should connect up the other branches of the Voicebot Conversation action, as well as all branches of the other actions in the script. You may also want to configure additional behaviors after the Onanswer event action fires.

A basic script for SIP backchannel that uses the Voicebot Conversation action.

Download script.

Assign the Virtual Agent Hub App to the VOICEBOT CONVERSATION Action

When the virtual agentClosed The meaning or purpose behind what a contact says/types; what the contact wants to communicate or accomplish app is set up and configured in Virtual Agent Hub, you need to assign it to the virtual agent action in your script. This connects the action and the script to your virtual agent provider.

  1. In Studio, open the script you want to modify.
  2. Locate the virtual agent action in the script and double-click it to open Virtual Agent Hub.

  3. In the left column, locate the virtual agent that you want to assign to the action and click the checkmark An icon of a circle with a checkmark inside. next to it.
  4. Click Close.

Test the SIP Connection

You can test the SIP connection before putting it into production. The SIP number that was provisioned for you in this set up process cannot be dialed from the outside. It's only for use internally between CXone and Amelia. This means you need another phone number to use when testing the connection. Similarly, when you put your Autopilot (Amelia) virtual agent into production, configure the point of contact with the phone number contacts will use to call your organization.

  1. In the CXone ACD application, create a voice point of contactClosed The entry point that an inbound contact uses to initiate an interaction, such as a phone number or email address. (POC).
  2. In the Point of Contact field, choose a DNISClosed Identifies the number the contact dialed to reach you for inbound voice calls and the number the agent or system dialed on outbound voice calls. that's available for use as a test number. It can be a toll free for DID number.
  3. Configure the POC to use the scripting you created for the Autopilot (Amelia) SIP backchannel connection.

  4. Call the DNIS you selected. If the call connects you with Autopilot (Amelia) as you expect, the SIP backchannel connection is configured correctly.