Learn how to use Twilio to forward a series of phone calls to your state senators.
This project is built using the Spark web framework.
To run the app locally, follow these steps:
-
Clone this repository and
cd
into it.git clone git@github.com:TwilioDevEd/call-forwarding-spark.git cd call-forwarding-spark
-
Copy the sample configuration file and edit it to match your database configuration.
cp .env.example .env
-
Create application database: Make sure you have installed PostgreSQL. If on a Mac, I recommend Postgres.app.
createdb call_forwarding
-
Execute the migrations.
./gradlew flywayMigrate
-
Expose your application to the internet using ngrok. In a separate terminal session, start ngrok with:
ngrok http 9292
Once you have started ngrok, update your TwiML application's voice URL setting to use your ngrok hostname. It will look something like this in your Twilio console:
https://d06f533b.ngrok.io/callcongress/welcome
-
Start your development server:
./gradlew run
Once ngrok is running, open up your browser and go to your ngrok URL.
./gradlew test
- No warranty expressed or implied. Software is as is. Diggity.
- MIT License
- Lovingly crafted by Twilio Developer Education.