Set Up SIP Backchannel for Google Dialogflow CX

The following list is an overview of the steps required to set up a SIP backchannel connection between CXone and your Dialogflow CX virtual agent.

  1. Create your Dialogflow CX virtual agent. It must be created on the global level. You can only add a phone number to a virtual agent on the global level, and you cannot change the level after it's created. Refer to the Dialogflow CX documentation for details.
  2. Request a phone number from your virtual agent provider.
  3. Copy your GCP project ID from the Google Cloud console. You need this information in the next step. Refer to the Amelia documentation for information about locating your project ID.
  4. Add a configuration app to Virtual Agent Hub. Ensure SIP backchannel support is enabled and configured in the app.
  5. Create a virtual agent Studio script using the Voicebot Conversation action.
  6. Assign the configuration app you created in an earlier step to the Voicebot Conversation action.
  7. Create or modify a point of contact (POCClosed The entry point that an inbound contact uses to initiate an interaction, such as a phone number or email address.) in CXone. Configure it with the 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. you want contacts to call and the script you created for the virtual agent. The DNIS used in the POC is not the same as the SIP number used in the virtual agent setup.

Request a SIP Phone Number

You must obtain a SIP phone number from the management console for your virtual agent provider.

  1. Log in to your Google Cloud Project.
  2. Open the GoogleDialogflow CX console.
  3. In the Manage section, select Integrations and then use the CX Phone Gateway section to create a phone number for your virtual agent.
  4. Refer to the Google Dialogflow CX help pageA square with an arrow pointing outside. for more information.
  5. Take note of the phone number. You need to use it to set up the SIP connection in CXone.

Add a Virtual Agent App with SIP Backchannel Support

Permissions Required: Automation & AI > Launch Automation & AI Studio Script View, Create/Edit

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 CXone, click the app selector and select Other > Automation & AI and then click Virtual Agent Hub. You can also double-click the virtual agent action in your Studio script to launch Virtual Agent Hub.
  2. Click Add Bot.
  3. Enter a Virtual Agent (Bot) Name and select Google Dialogflow CX. You cannot modify the name after creating the app.

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

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

  8. Enter the Project ID of the Google Cloud Project that hosts your virtual agent. This ID is used in the header URL for Dialogflow CX. You can find it on the Project Info tile in your Google Cloud Console. This is a required field.

  9. Click Add SIP Headers if you want the virtual agent to be able to transfer contacts to a live agent, then:  
    1. Enter HeaderURL as the Header Name.
    2. Copy and paste the following URL in the Header Value field:

      http://dialogflow.googleapis.com/v2beta1/projects

      CXone modifies the URL to include the Project ID you provided. If you're adding other headers, this URL must be the first one in the list.

  10. If you have other 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.

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

Create a Studio Script

Permissions Required: Studio Script View, Create/Edit

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 Google Pub Sub 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 Google Dialogflow CX 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 Configuration App to a Script 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.