Use Twilio to track the effectiveness of your different marketing campaigns. Learn how call tracking helps organizations in these Twilio customer stories.
This project is configured to use a TwiML App, which allows us to easily set the voice URLs for all Twilio phone numbers we purchase in this app.
Create a new TwiML app at https://www.twilio.com/user/account/apps/add and use
its Sid as the TWIML_APPLICATION_SID environment variable wherever you run
this app.
You can learn more about TwiML apps here.
- Java Development Kit version 8
- PostgreSQL
- A Twilio account - sign up
This application should give you a ready-made starting point for writing your own appointment reminder application. Before we begin, we need to collect all the config values we need to run the application:
| Config Value | Description |
|---|---|
| Account Sid | Your primary Twilio account identifier - find this in the Console. |
| Auth Token | Used to authenticate - just like the above, you'll find this here. |
| Phone number | A Twilio phone number in E.164 format - you can get one here |
After the above requirements have been met:
-
Clone this repository and
cdinto its directory:git clone git@github.com:TwilioDevEd/call-tracking-servlets.git cd call-tracking-servlets -
Create the database.
createdb call-tracking-servlets
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.
-
Copy the sample configuration file and edit it to match your configuration.
cp .env.example .env
See Twilio Account Settings to locate the necessary environment variables.
-
Execute the migrations.
./gradlew flywayMigrate
-
Run the application.
./gradlew appRun
-
Check it out at http://localhost:8080
Additionally, in order to let Twilio Phone numbers use the callback endpoint we exposed, our development server will need to be publicly accessible. We recommend using ngrok to solve this problem.
- No warranty expressed or implied. Software is as is. Diggity.
- MIT License
- Lovingly crafted by Twilio Developer Education.