IVR demo showing an integration between VoiceIt's API 2.0 and Twilio's API
- Twilio Account -- Twilio Developer Registration
- VoiceIt Account -- VoiceIt Developer Registration
- Heroku Account for hosting app -- Heroku Developer Registration
After installation you will also need to log in to your Twilio account and point a purchased phone number to this new application like shown below. Make sure to set the webhook for when call comes in to the right URL and set the HTTP request to POST.
-
Add the App URL to the Twilio Phone Number POST Webhook (Twilio Console > Phone Number > Phone Number Settings > "A Call Comes In...")
You can call the Twilio number you have pointed to the application and try out the demo, and modify it as desired for your own use case. You can also check out our demo by calling (612) 400-7423.
- Clone this repository via the command
git clone https://github.com/voiceittech/VoiceIt2-Twilio-Demo.git
cd VoiceIt2-Twilio-Demo
npm i
to install NPM package dependencies- To run locally, create a .env file and set the environment variables
API_KEY
andAPI_TOKEN
to your VoiceIt API key and token,VOICEPRINT_PHRASE
to a phrase that you have pre - approved in the VoiceIt console,CONTENT_LANGUAGE
to associated contentLanguage, andDATABASE_URL
from the DB added below. npm start
We are using Postgres for our example, so you may need to install Postgres locally: https://devcenter.heroku.com/articles/heroku-postgresql#local-setup
$ heroku addons:create heroku-postgresql:hobby-dev
$ heroku pg:psql
=> create table users (phone text, userId text);
$ heroku create
$ git push heroku master
$ heroku config:set API_KEY=123456abcdef123456 API_TOKEN=123456abcdef123456 VOICEPRINT_PHRASE='Never forget tomorrow is a new day' CONTENT_LANGUAGE=en-US DATABASE_URL=postgres://