Skip to content

Convert your OpenAPI definition into a Twilio IVR menu!

License

Notifications You must be signed in to change notification settings

CalemRoelofs/swagger-ivr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swagger IVR

Finding yourself reading a API definitions and thinking "This is too easy, there has to be a harder way!"? 🤔
Sick of the bright colours and utility of Swagger UI and Redoc? 🎨
Wish you could review documentation with nothing but a screenless telephone? ☎️
Then look no further, your prayers have been answered! 🙌🏼

Swagger IVR will convert your OpenAPI definition into a TwiML IVR (Interactive Voice Response) webhook server to build a phone tree that can be dialled into and listened to by anyone!

For a quick demo, call +44 7401 195003, which will be up for as long as there is credit remaining on that Twilio account.

Installation

To run the application locally:

$ npm ci
$ npm run build
$ npm run start

To build and run with Docker:

$ npm ci
$ npm run docker

Usage

Before you start:

  • Swagger IVR uses Twilio's Programmable Voice offering to power the IVR functionality, and as such most of the setup is done over there.
  • When Swagger IVR runs, currently it will parse whatever API definition is saved in ./openapi.yaml in the root of the project.
  • OpenAPI definitions are not resolved or dereferenced currently, so for the best experience use a fully dereferenced OpenAPI definition.
  • Twilio does charge 1c per minute (or per part of a minute, meaning 1 minute and 1 second is still billed at 2 minutes) on incoming calls, so there is some cost to running this yourself.

Setup:

  1. Run Swagger IVR and make it accessible to the internet using something like ngrok.
  2. Buy a voice-enabled phone number from Twilio and configure it to send webhook requests to your URL when a call comes in.
  3. Dial the phone number you have purchased in Step 2.