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:
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.
Sign up for Jambonz cloud or use your own on-premise deployment.
Once logged in, create a Carrier which will provide your phone number (e.g. twilio).
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
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:
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:
Event | intent | Description |
---|---|---|
start | session_start | Jambonz 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: