The Teneo Vonage Voice connector allows your users to interact with your Teneo bot using the telephony channel. The Node.js connector works as a middleware between the Vonage Voice API and the Teneo Interaction Engine (your published bot), facilitating the communication between both APIs.
Vonage’s Voice API includes integrated Speech Recognition and Text to Speech services in over 40 languages, DTMF support, barge-in, and some other features that are specified below.
The source code for this connector can be found on Github.
- Your bot needs to be published and you need to know the Teneo Engine URL.
- You will need a Vonage account with a 'Virtual Phone Number' configured in it. The steps to set up the account, configure billing, and buy a virtual number are described below. !!! Adding funds is required to buy a 'Virtual Phone Number'. $10 will suffice to purchase a number and start testing your application.
- A Heroku account is required to deploy the connector online. Alternatively, to run the connector locally, ngrok is recommended in order to expose your local connector via HTTPS.
To set up communication by phone between a Teneo bot and Vonages's Voice API, follow these steps:
- Sign up for an account here.
- From your new account's dashboard, open “Billing and Payments”. Set up a payment method and add $10 to your funds. This should be enough to purchase a virtual phone number for around $0.90 (monthly), and make calls for a few cents each. Pricing varies per country.
- Open the 'Buy Number' section on your Vonage dashboard. Select your country to obtain cheaper rates, set 'Features' to SMS and Voice, choose Mobile for 'Type', and click 'Search'. Choose a number from the list and click 'Buy'.
- On your Vonage Dashboard, go to 'Applications' and click on 'Create a new application'.
- Give it a name.
- Make sure to enable 'Voice'.
- Then set:
- Answer URL to
HTTP POST: WEBHOOK_FOR_VONAGE + PATH_TO_ANSWER(e.g.
https://teneo-vonage-voice.herokuapp.com/webhooks/answer). Note that PATH_TO_ANSWER defaults to /webhooks/answer.
- Event URL to
HTTP POST: WEBHOOK_FOR_VONAGE(e.g.
Once you create your application, click to see it and make sure to link it to your previously purchased number under 'Link numbers'.
Click the button below to deploy the connector to Heroku:
In the 'Config Vars' section, add the following required information:
- TENEO_ENGINE_URL: Your Teneo Interaction Engine endpoint, which you can obtain from your publication environment in Teneo Studio. Find more details on this step here.
- WEBHOOK_FOR_VONAGE: Application endpoint for deployed vonage-voice-teneo connector (e.g.
https://teneo-vonage-voice.herokuapp.com). !!! Note that there should not be a '/' at the end of this URL!
The following are not required but may also be set:
- LANGUAGE_ASR: Language for ASR, defaults to en-US if not specified. More information can be found here.
- BARGEIN_ASR: Enables/disables barge-in feature for ASR, defaults to false if not specified (possible values: true/false). More information can be found here.
- LANGUAGE_TTS: Language for TTS, defaults to en-US if not specified. More information can be found here.
- STYLE_TTS: Preferred language style for TTS, defaults to 2 if not specified. More information can be found here.
- PORT: Port to run the application on (defaults to 1337 if not specified).
- PATH_TO_ANSWER: Can be left empty. Defaults to /webhooks/answer.
That's it! You should be able to call your Virtual Phone Number and talk to your Teneo bot!