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. A quick way to get started with voice testing in Botium can be found here
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
Before you begin with configuring Twilio, ensure that your Twilio account has a phone number available for this project that has voice capability, you can purchase additional phone numbers via Twilio as required.
-
Add TwiML Bin
- Access the TwiML Bins page via the Twilio Console
- Enter the name of the TwiML Bin, this is only used for your own reference purposes. Botium recommends naming this as "SipClientOutbound"
- 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>
- When this code is added, Twilio will confirm that it is valid and display a green checkmark at the bottom of the code box. Click Create to create the TwiML Bin.
- Access the TwiML Bins page via the Twilio Console
-
Add the Credential List
- While logged into your Twilio Account, go to Programmable Voice
- Select Credential Lists
- Click the + icon to create a new credential list with the following information
- Username <Phone Number> (this is the phone number being used for this Twilio project)
- Password <Any password string> (record these as they will be used later in Botium)
-
Add IP / CIDR Access Control List
- Inside the Twilio Console, open the SIP Trunking menu
- Click on Authentication and IP Access Control Lists
- Add a new IP range as follows
- CIDR Network Address: <IP address of VOIP worker, provided by Botium/Cyara>
- Range: 32
-
Add a SIP Domain
- Select Domains and click the + Icon to create a new SIP Domain with the following details
- Friendly Name: <Any name for your reference>
- SIP URI: <Any valid SIP URI, this will be used later in the Botium Voip Connector Settings>
- IP Access Control Lists: <The list that was created in Step3>
- A Call Comes In: SipClientOutbound <The TwiML Bin created in Step1>
- SIP Registration: Enable
- Credential Lists: <Select the list created in step2>
-
(Optional) Enable Geo-Permissions
- Some phone numbers within different regions are blocked by default, this means that you won't be able to make calls to such numbers. For these blocked numbers you will need to specifically enable these in the Geo-Permissions page.
Configuring the Botium VOIP Connector for Twilio
Now that the VOIP Gateway is available via Twilio, you can configure Botium to connect to it. Follow the steps below.
- From the Chatbots menu, create a 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 EN(Note: these Asure STT/TTS are for English speech recognition and synthesis, select an appropriate speech profiles for languages other than English)
-
- In the SIP Configuration section enter the following details;
-
SIP Registrar URI: sip:<sip domain>
-
SIP Address: sip:<Phone Number>@<sip domain>
-
SIP Username: <Phone Number, username from credential list>
-
SIP Password: <set password from credential list>
-
-
(Optional) Speech Recognizion / ASR Bot Message Handling
Depending on the ASR provider you use, the results can be sometimes flaky in terms of message counts. We provide methods to handle such behaviours. Use the JOIN method to join messages depending on the silence duration. Use the SPLIT method to split sentences by characters. We recommend to use the JOIN method.
-
(Optional) Silence Duration Timeouts
Usually the Bot Response Timeout is used to check if a Bot Response is received within a certain time, but in the VOIP Connector the Bot Response Timeout is related to the final ASR results (which usually come with delays). We provide two options to assert on the real silence durations: You can assert on the start silence duration until the bot starts to speak or you can set a threshold for all silence durations within a conversation. To ignore the silence duration for a specific bot message, you can use the “Ignore Silence Duration Timeout“ Logic Hook in your Test Case.
-
A successful configuration will look as follows;
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
-
Comments
0 comments
Please sign in to leave a comment.