Twilio SIPREC integration

You can integrate Twilio's SIPREC configuration with Google Cloud's Agent Assist. This integration allows Agent Assist to analyze Twilio's audio data.

The architecture

Google Cloud CCAI acts as the session initiation protocol (SIP) recording server (SRS) and Twilio is the SIP recording client (SRC). Twilio has edge locations in Oregon and Virginia, and the Oregon location has Edge servers with a complete, fully qualified domain name that has been configured to communicate with CCAI. Using Twilio's generic SIP recording (SIPREC) connector, you can transmit traffic from the Oregon location to CCAI.

The following image illustrates how the Twilio SIPREC connector transmits voice data from the Twilio telephony SRC to the Google Cloud CCAI SRS.

As part of CCAI, Agent Assist can then send transcripts of that voice data with suggestions back to the Twilio agent desktop using Cloud Run, Pub/Sub, and Memorystore for Redis.

Configure SRS details at Twilio SIPREC connector

Follow these steps to access a Twilio SIPREC connector:

  1. Visit the Twilio Stream Connectors Console page.
  2. Select SIPREC Connector.
  3. Give your connector a unique name.

For the SRS, use the following connection string and replace the phone number with the phone associated with your conversation profile. The phone number should be formatted as +1XXXXXXXXXX.

sip:<<enter_phone_number_here>>@216.239.36.145:5672;transport=tls;secure=true;edge=umatilla

For more details, see Twilio's SIPREC documentation.

Configure Twilio Studio

Follow these steps to configure Twilio Studio for SIPREC integration:

  1. Navigate to Twilio Studio and select the flow associated with the phone that your customers use to dial your contact center.
  2. Add a new plugin from the widget library called Fork Stream.
  3. Connect the incoming call trigger to the Fork Stream widget and the next connection to the rest of your flow.
  4. Configure the widget with the following information:

    • Widget Name: A unique name for your widget
    • Stream Action: Start
    • Stream Name: A unique name for your stream
    • Stream Type: SIPREC
    • Connector Name: The name of the connector you created in the previous section
    • Tracks: Both Tracks
    • Stream Parameters:
      • Key: conversation
      • Value: projects/<<gcp-project-id>>/conversations/{trigger.call.CallSid}

For more information, read about Twilio's Fork Stream widget.