Skip to content

Flask app to link your VoiceFlow project with your Twilio phone number and create an IVR.

License

Notifications You must be signed in to change notification settings

daiangan/voiceflow-twilio-ivr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VoiceFlow - Twilio IVR

VoiceFlow - Twilio IVR

This is a Flask app to link your VoiceFlow project with your Twilio phone number and create an IVR.


Go to VoiceFlow and grab your Project VERSION_ID and your API_KEY from the Integration tab.
Voiceflow keys

Add them to your Python environment variables with the names:

VF_PROJECT_VERSION_ID
VF_API_KEY

Deploy your Flask app (out of this scope) and copy your app URL.

Then go to Twilio and paste your app's URL as the webhook for the incoming calls to your phone number.

Twilio webhook set up


Settings

Change the following variables to your best options in app.py:

language = 'en-US'
voice = 'alice'
timeout = 5

You also need to add a VoiceFlow variable named choices. This is important for the choices mapping to phone keypad input (more details in Features below).


Features

  1. The script will handle VF choices block to let you input each choice as number options in the phone dial pad, and of course, keeping the voice input available.
    Choices mapping
    Do not forget to add the choices variable to your VF project.

  2. To forward a call, just use the text call_forwarding: followed by the phone number to redirect the call.
    For example:
    Call forwarding feature


Known issues:

  • Audio support: The issue is that when you upload a file to VF using the Audio block, the URL you get in the API is pointing to an application/octet-stream MIME type and Twilio API does not support that kind of audio files.
    A possible solution could be just place the URL to your correct encoded audio file in VF.


About this project

This project was created by:
Daian Gan
Github: daiangan
E-mail: daian@ganmedia.com
Website: https://daiangan.com

About

Flask app to link your VoiceFlow project with your Twilio phone number and create an IVR.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages