Audiocodes VoiceAI Connect
Rasa Pro License
You'll need a license to get started with Rasa Pro. Connect with a Rasa expert
Not sure if you need Rasa Pro yet? Try it for free
Use this channel to connect your Rasa assistant to Audiocodes VoiceAI connect.
To get credentials, create a bot on the VoiceAI connect portal.
- Select Bots in the left sidebar.
- Click on the + sign to create a new bot.
- Select Rasa as the Bot Framework
- Set the bot URL and choose a token value.
Setting the bot URL with a tunneling solution when testing locally
Visit this section to learn how to generate the required bot URL when testing the channel on your local machine.
The token value chosen above will be used in the
You can also specify optional parameters:
|No default value||The token to authenticate calls between your Rasa assistant and VoiceAI connect|
|120||In seconds. For each ongoing conversation, VoiceAI Connect will periodically verify the conversation is still active on the Rasa side.|
Then restart your Rasa server to make the new channel endpoint available.
Receiving messages from a user
When a user speaks on the phone, VoiceAI Connect will send a text message (after it is processed by the speech-to-text engine) to your assistant like any other channel. This message will be interpreted by the NLU and you can then drive the conversation with rules, stories and forms.
Sending messages to a user
Your bot will respond with text messages like with any other channel. The text-to-speech engine will convert the text and deliver it as a voice message to the user.
Here is an example:
Only text messages are allowed. Images, attachments, and buttons cannot be used with a voice channel.
Handling conversation events
Non-voice events can also be handled by the bot. Here are a few examples:
|VoiceAI will send this intent when it picks-up a phone call. In general, the response to that intent is a welcome or greeting message. Call context will be provided through entities|
|VoiceAI will send this intent when a call ends. You can use that to call an action that updates the call information.|
|VoiceAI will send this intent when receiving a DTMF tone (i.e user presses digit on the keyboard of the phone). The digit(s) sent will be passed in the |
The general pattern is that for every
event sent, the bot will receive the
vaig_event_<event> intent, with context information in entities.
Here is a simple rule to send a greeting message when a call to the bot is initiated:
Check the VoiceAI Connect documentation for an exhaustive list of events.
You can send events from Rasa to VoiceAI Connect to make changes to the current call configuration. For example, you might want to receive a notification when the user stays silent for more than 5 seconds, or you might need to customize how DTMF digits are sent by VoiceAI Connect.
Call configuration events are sent with custom messages and are specific to the current conversation (sometimes to a message). Which means they must be part of your stories or rules so the same behaviour is applied to all conversations.
Those Rasa responses don't utter anything, they just configure the voice gateway. It is a good practice naming them differently, for example prefixing them with
All the supported events are exhaustively documented in the VoiceAI Connect documentation. We will look at one example here to illustrate the use of custom messages and events.
Example: changing a pin code
In this example we create a flow to allow a user to change a pin code.
In the domain, we can add the
Now you can configure the
pin_code slot in the
pin_code_form to extract the pin code from the
value entity with the
vaig_event_noUserInput was declared in the
vaig_event_noUserInput intent is sent by VoiceAI Connect when the user stays silent as per our configuration,
we must deactivate the form so we can pick up the conversation from a rule or a story and gracefully handle the failure.
In the following example, we simply cancel the current flow if we receive the
vaig_event_noUserInput intent (i.e. user stays silent) while the
pin_code_form loop is active.