Integration with IBM Watson through IBM Voice Gateway

Blueworx Voice Response can run a Watson Conversation dialog by integrating with IBM Voice Gateway.

Using Watson Conversation with BVR:

The integration in BVR is through the use of the CCXML dialogprepare and dialogstart elements and works in a similar way to starting VoiceXML dialogs.

For example

<dialogstart src="sip:watson@ibm.voice.gateway.ip:5060" type="'application/ibm-voice-gateway'" connectionid="evt.connectionid"/>

The key attributes in the dialogstart are:

src A valid SIP URI pointing to the IBM Voice Gateway instance. The user part of the SIP URI is used to direct the call to the appropriate Watson Conversation dialog as configured in IBM Voice Gateway.
type Must be set to "application/ibm-voice-gateway"

When the Watson Conversation dialog has finished, control is passed back to the CCXML application via a dialog.exit transition.

Transfer to an agent after the Watson Conversation dialog:

The Watson Conversation application can indicate to BVR that an agent transfer is needed. It does this by sending a transferTarget header to BVR at the end of the Watson Conversation dialog.

To do this, in the Watson Conversation application, create a Watson dialog node. Associate it with an intent in the "If bot recognizes" field. In the "Then respond with" field, click the options icon to the right and select "Open JSON editor". Now insert the following:

{
 "context": {
    "vgwByeCustomHeader": "transferTarget",
    "vgwByeCustomHeaderVal": "sip:agent\\@agent.ip.address:5060"
},
"output": {
   "text": {
     "values": [
       "Please hold on while I connect you with a live agent."
     ],
     "selection_policy": "sequential"
   },
   "vgwAction": {
     "command": "vgwActHangup"
   }
 }
}

The key values in the JSON are:

vgwByeCustomHeader Must be set to "transferTarget"
vgwByeCustomHeaderVal Must be set to the SIP URI that the call should be transferred to.

You can also change what it said to the caller when this action is initiated by replacing the text in the values field.

If the Watson Conversation application is coded to return the transferTarget, control is passed back into CCXML via a dialog.transfer event and not a dialog.exit event. The URI to transfer to will be in the uri attribute of the dialog.transfer transition. The dialog.transfer can then be handled like any other diallog.transfer transition. See here for more details on transfer in CCXML:

CCXML Call Transfer and Bridging

Sample Applications:

We have provided sample applications that describe the integration and can be used to connect to Watson Conversation. The sample applications are installed on the BVR server in the following location:

/opt/blueworx/vr/sample/IBMVoiceGateway

More Information:

For more details about IBM Watson Conversation and IBM Voice Gateway take a look at the following IBM links: