Skip to content

Commit

Permalink
feat(phone): Add starter kit for the phone channel. (watson-developer…
Browse files Browse the repository at this point in the history
…-cloud#166)

* feat(phone): Add starter kit for the phone channel.

* Apply suggestions from code review

* Update integrations/phone/examples/README.md

* Update integrations/phone/examples/README.md

Removes spacing from the beginning line
  • Loading branch information
jfmartinez committed Sep 5, 2023
1 parent d42b065 commit 1673b30
Show file tree
Hide file tree
Showing 12 changed files with 2,223 additions and 0 deletions.
11 changes: 11 additions & 0 deletions integrations/phone/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Watson Assistant toolkit for phone

This repository holds a collection of examples for utilizing and programming the Watson Assistant phone channel.

See the [overview of examples](examples/README.md) contained in this repository.

## Helpful links
- [Watson Assistant](https://cloud.ibm.com/docs/watson-assistant)
- [Watson Assistant phone integration](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-deploy-phone)
- [Handling phone interactions](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-phone-actions)
- [Contributing to this repository](CONTRIBUTING.md)
23 changes: 23 additions & 0 deletions integrations/phone/examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@


## Examples

This folder contains a set of examples that are intended to demonstrate how to use various features of the Watson Assistant phone channel. Below is a list of these examples, along with a brief explanation of each and the different features that each example demonstrates.


### [Common Interactions](./common-interactions/)

This example contains Watson Assistant phone integration actions that demonstrate:

- How to use the phone and SMS channel for two-factor authentication.
- How to tune the Watson Speech-To-Text parameters in the Greetings action for background noise (`background_audio_suppression`) and increase the speech capture time (`end_of_phrase_silence_time`).
- How to disable and enable Text-to-Speech barge-in.
- How to handle the input timeout from the phone channel via the `vgwPostResponseTimeout` keyword.
- How to disconnect the call when the caller is done.


### [Amazon Connect](./amazon-connect/)

This custom contact control panel (CCP) grabs data from an Amazon Connect flow and uses it to display the conversation history with Watson Assistant, and can be a reference for more complex and customer-specific cases.

The example in these instructions is based on this [blog](https://aws.amazon.com/blogs/contact-center/perform-an-external-screen-pop-with-amazon-connect/).
File renamed without changes.
61 changes: 61 additions & 0 deletions integrations/phone/examples/common-interactions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
## Phone Starter Kit

This example contains Watson Assistant phone integration actions that demonstrate:

- How to use the phone and SMS channel for two-factor authentication via the [send a text message](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-phone-actions#phone-actions-sms.)
- How to tune the Watson Speech-to-Text parameters in the Greetings action for background noise (`background_audio_suppression`) and increase the speech capture time (`end_of_phrase_silence_time`) by using the [speech_to_text](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-phone-actions#phone-actions-speech-advanced) response type.
- How to disable and enable Text-to-Speech barge-in via the [text_to_speech](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-phone-actions#phone-actions-text-advanced) response type.
- How to handle the input timeout from the phone channel via the `vgwPostResponseTimeout` keyword.
- How to disconnect the call when the caller is done, using the [end_session](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-phone-actions#phone-actions-hangup) response type.
- How to transfer a call via session-initiated protocol (SIP) transfer using the [Connect to Agent Resolver](#transferring-the-call-via-the-sip-transfer-option-in-the-connect-to-agent-resolver).

### Setting up your own assistant

This example is configured to use an existing assistant set up for common use. If you want to set up your own assistant, you need to perform the following steps:

1. Import the [actions.json](./action.json) file located in the repository for this example.
2. Create an [SMS integration](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-deploy-sms) to use the phone and SMS channel for two-factor authentication (optional).
3. Go to `Actions Settings > Change Conversation Topic > Conversation Topic` and enable `Allow changing the conversation topic for all actions` to handle user-input timeouts as digressions.
4. Go to the `Actions > All items > Created by you` to view a `Phone Utilities` folder with a list of actions that can be used for phone interactions.

<img src="./assets/phone-utilities-actions.png" />

### Using the phone channel

Once you've set up the starter kit, you can deploy a [phone integration](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-deploy-phone) if you don't yet have one provisioned.

Here are some example phrases you can use to trigger the different phone utilities while on the phone with your Watson Assistant:

| Utterance | Phone behavior | Action title |
| --- | --- | --- |
| `Goodbye` or `You've answered all of my questions` | Watson Assistant will disconnect the call. | `Call Completion` |
| `<<< SILENCE >>>` | Watson Assistant will reprompt on the phone. | `vgwPostResponseTimeout` |
| `Can I speak to an agent` | Watson Assistant will attempt to transfer your call. | `Connect to Agent` |



### Starter Kit Details
#### Transferring a call via SIP transfer in the Connect to Agent Resolver

For phone interactions, typically a SIP transfer is required for transferring the call to an upstream SIP provider. In the Watson Assistant actions, you can use the SIP Transfer option in the Connect to Agent resolver to achieve this.

1. Go to the "Connect to Agent" action, click the first Action Step and click`Edit Settings` under the `Connect to Agent Resolver`.

<img src="./assets/connect-to-agent-resolver.png" />

2. Add your SIP transfer information by editing fields such as `uri` and adding SIP headers in the configuration options of the Connect to Agent Resolver:

<img src="./assets/sip-transfer-option.png" />

For more information on call transfers, see [Transferring a call to a human agent](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-voice-actions#dialog-voice-actions-transfer) documentation.


#### Speech Recognition Settings

There may be use cases when you need to tune the speech recognition parameters for phone interactions. For example, in the `Greeting` action (`Actions > Set by Assistant > Greeting`), specifying a `speech_to_text` response type allows you to modify the speech recognition settings for interactions with Watson Assistant over the phone.

<img src="./assets/greeting-speech-to-text.png"/>

For more information on modifying speech recognition settings, see [Applying advanced settings to the Speech to Text service](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-voice-actions#dialog-voice-actions-speech-advanced).


Loading

0 comments on commit 1673b30

Please sign in to comment.