An example application implementing an automated phone line using Twilio and Java Servlets.
- Java 8 installed for your operative system.
- A Twilio Account
-
Clone the repository and
cdinto it.git clone git@github.com:TwilioDevEd/ivr-recording-servlets.git cd ivr-recording-servlets -
Create the database.
createdb ivr-recording
The application uses PostgreSQL as the persistence layer. If you don't have it already, you should install it. The easiest way is by using Postgres.app.
-
Set your environment variables
cp .env.example .env -
Execute the migrations.
./gradlew flywayMigrate
-
Run the application.
./gradlew jettyRun
-
Expose the application to the wider Internet using ngrok
ngrok http 8080 -host-header="localhost:8080" -
Provision a number under the Manage Numbers page on your account. Set the voice URL for the number to
http://<your-ngrok-subdomain>.ngrok.io/ivr/welcome.
That's it!
- No warranty expressed or implied. Software is as is. Diggity.
- MIT License
- Lovingly crafted by Twilio Developer Education.