When testing a voice enabled chatbot, Botium offers the option of using a Twilio Voice Gateway to send voice utterances to your voice enabled chatbot.
To utilize a Twilio Outbound SIP gateway for Botium voice testing, two configuration steps are required. First you must configure the Twilio Gateway, then setup the VOIP Connector in Botium, see below for more information on each step.
Configuring Twilio Gateway
-
Add TwiML Bin:
- Access the TwiML Bins page via the Twilio Console.
- Name the TwiML Bin (e.g., "SipClientOutbound" as recommended by Botium). This name is for your reference only.
- Enter the following TwiML code in XML
format:
<?xml version="1.0" encoding="UTF-8"?> <Response> <Dial answerOnBridge="true" callerId="{{#e164}}{{From}}{{/e164}}">{{#e164}}{{To}}{{/e164}}</Dial> </Response>
- Once the code is validated by Twilio (indicated by a green check-mark), click Create to save the TwiML Bin.
- Access the TwiML Bins page via the Twilio Console.
-
Add Credential List:
- While logged into your Twilio account, go to
Programmable Voice > Credential Lists
. - Click the + icon to create a new credential
list:
- Username: Enter the phone number being used for this Twilio project.
- Password: Create any password string (record these for later use in Botium).
- While logged into your Twilio account, go to
-
Add IP / CIDR Access Control List:
- In the Twilio Console, navigate to
SIP Trunking > Authentication and IP Access Control Lists
. - Add a new IP range:
- CIDR Network Address: Enter the IP address of the VOIP worker (provided by Botium/Cyara).
- Range: Set to 32.
- In the Twilio Console, navigate to
-
Add a SIP Domain:
- Go to Domains and click the + icon to
create a new SIP Domain:
- Friendly Name: Enter any name for your reference.
- SIP URI: Provide a valid SIP URI (to be used later in the Botium VoIP Connector settings).
- IP Access Control Lists: Select the list created in Step 3.
- A Call Comes In: Choose "SipClientOutbound" (the TwiML Bin created in Step 1).
- SIP Registration: Enable this option.
- Credential Lists: Select the list created in Step 2.
- Go to Domains and click the + icon to
create a new SIP Domain:
- (Optional) Enable Geo-Permissions: Certain regional phone numbers are blocked by default, preventing calls to those numbers. To enable calling to these regions, adjust the settings on the Geo-Permissions page.
Configuring the Botium VOIP Connector for Twilio
-
Create a New Chatbot:
- From the Chatbots Connections menu, create a new chatbot
Botium Tools & Settings > Chatbot Connections > Create new Chatbot
- Select the 'Voice over IP' chatbot technology, and enter the
following details:
-
HTTP endpoint of VOIP Worker:
<VOIP worker endpoint provided by Botium/Cyara>
-
VOIP worker API Key:
<API Key provided by Botium/Cyara>
-
SIP Address to call:
sip:<number to call>@<sip domain>
- Speech Recognition Profile: Azure STT EN
-
Speech Synthesis Profile (Optional): Azure TTS
ENRemember: Azure STT/TTS are for English speech recognition and synthesis, select an appropriate speech profiles for languages other than English.
Note:A successful Twilio Connector configuration will look as follows;
-
HTTP endpoint of VOIP Worker:
- From the Chatbots Connections menu, create a new chatbot
-
Enter SIP Configuration Details: The VoIP connector will work with
any provider that supports VoIP protocols (SIP, etc..)
- SIP Registrar URI: sip:<sip domain>
- SIP Address: sip:<Phone Number>@<sip domain>
-
SIP Username: <Phone Number from credential list>Note: For other providers the SIP Username may be a string <username from credential list>
- SIP Password: <Password from credential list>
Note: Here is an example of a Twilio Configuration:
-
(Optional) Configure Speech Recognition / ASR Message Handling: For
handling ASR behavior, use the JOIN method to combine messages based on
silence duration, or the SPLIT method to break sentences by characters.Tip: The JOIN method is recommended.
-
(Optional) Configure Silence Duration Timeouts: Bot Response Timeout
in VOIP Connector relates to the final ASR results, which may have delays.
To manage silence durations, you can:
- Assert on the start silence duration until the bot speaks.
- Set a threshold for all silence durations in a conversation.
- Use the “Ignore Silence Duration Timeout” Logic Hook to bypass silence duration for specific bot messages.
VOIP Connector Features
-
Sending Audio files directly
-
Sending Text (auto-conversion from Text to Speech using Voice Profiles)
-
Sending DTMF-Tones (= Buttons in Botium)
-
Measuring silence durations between Bot messages
-
Silence duration assertion