IVRs (interactive voice response) are automated phone systems that can facilitate communication between callers and businesses. In this tutorial you will learn how to screen and send callers to voicemail if an agent is busy.
This project is built using Ruby on Rails and NodeJS Frameworks.
-
First clone this repository and
cd
into it.$ git clone git://github.com/TwilioDevEd/ivr-recording-rails.git $ cd ivr-recording-rails
-
Install Rails the dependencies.
$ bundle install
-
Install Webpack the dependencies.
$ npm install
-
Create database and run migrations.
Make sure you have installed PostgreSQL. If on a Mac, I recommend Postgres.app
$ bundle exec rails db:setup
-
Edit db/seeds.rb and seed the database.
$ bundle exec rails db:seed
-
Make sure the tests succeed.
$ bundle exec rails test
-
Start the server.
$ bundle exec rails s
-
Check it out at http://localhost:3000
-
Expose the application to the wider Internet using ngrok.
$ ngrok http 3000
-
Provision a number with voice capabilities under the Manage Numbers page on your account. Set the Voice URL for the number to
http://<your-ngrok-subdomain>.ngrok.io/ivr/welcome
. -
Grab your phone and call your newly-provisioned number!
- No warranty expressed or implied. Software is as is. Diggity.
- MIT License
- Lovingly crafted by Twilio Developer Education.