Version: Latest

Jambonz as Voice Gateway

New in 3.10

The Jambonz connector is new in Rasa 3.10 and has been released as a beta feature.

Use this channel to connect your Rasa assistant to Jambonz. Jambonz is a Voice Gateway that can interface with various customer support platforms like Genesys, Avaya, and Twilio using SIP.

Basic Rasa configuration

Create or edit your credentials.yml and add a new channel configuration:

credentials.yml
jambonz:
# currently no other parameters are needed

You can run that assistant using rasa run. To configure the Jambonz channel, you will need a URL to your Rasa assistant. You can use a tunneling solution like ngrok to expose your assistant for development.

Bot URLs for development

Visit this section to learn how to generate the required bot URL when testing the channel on your local machine.

Configuring Jambonz

To route calls to your Rasa assistant, you need to have a Jambonz deployment, an account and a phone number.

  1. Sign up for Jambonz cloud or use your own on-premise deployment.

  2. Once logged in, create a Carrier which will provide your phone number (e.g. twilio).

  3. Create an Application. To route calls to your assistant, Jambonz needs a webhook URL. You'll either need to deploy your assistant to a server and expose it to Jambonz or for development use a tunneling solution like ngrok.

    The webhook URL will be in the format wss://<your-server>/webhooks/jambonz/websocket

    or in the case of ngrok look like this: wss://recently-communal-duckling.ngrok-free.app/webhooks/jambonz/websocket

  4. Set up a "Phone Number". The configuration of the phone number should point to the application you created in the previous step.

Usage

Receiving messages from a user

When a user speaks on the phone, Jambonz 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 Rasa and you can then drive the conversation with flows.

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:

utter_greet:
- text: "Hello! isn’t every life and every work beautiful?"
note

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:

EventintentDescription
startsession_startJambonz will send this intent when it picks-up a phone call. By default, this intent triggers the pattern_session_start which you can customize.
end-Jambonz currently does not send any information when the call is ended.
DTMF-Jambonz will send DTMF (numbers on the phone pressed by a user ) as normal text messages with confidence 1.0.

Here is a simple modification of the default session start to greet the user with an utterance:

flows:
pattern_session_start:
description: flow used to start the conversation
name: pattern session start
nlu_trigger:
- intent: session_start
steps:
- action: utter_greet