New in 3.11The Jambonz connector has been made generally available in Rasa Pro 3.11. It was released as a beta feature in Rasa Pro 3.10.
Basic Rasa configuration
Create or edit yourcredentials.yml and add a new channel configuration:
credentials.yml
Basic AuthenticationSupport for
username and password parameters is
only available on Rasa Pro 3.11.8+, Rasa Pro 3.12.7+ and later releases.username(optional): Basic authentication username for Jambonz channel.password(optional): Basic authentication password for Jambonz channel.
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 developmentVisit 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/websocketor in the case of ngrok look like this:wss://recently-communal-duckling.ngrok-free.app/webhooks/jambonz/websocket - If your channel is secured by Basic Authentication in the above step, then select “Use HTTP basic authentication” and fill Username, Password fields.
- 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: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:
Here is a simple modification of the default session start to greet the user
with an utterance: