Skip to content
This repository was archived by the owner on Aug 2, 2023. It is now read-only.

TwilioDevEd/call-tracking-servlets

Repository files navigation

Twilio

Call Tracking on Java Servlets

Java Servlet CI

Use Twilio to track the effectiveness of your different marketing campaigns. Learn how call tracking helps organizations in these Twilio customer stories.

Read the full tutorial here!

Quickstart

Create a TwiML App

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.

Creating a TwiML App

You can learn more about TwiML apps here.

Set up

Requirements

Twilio Account Settings

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

Local development

After the above requirements have been met:

  1. Clone this repository and cd into its directory:

    git clone git@github.com:TwilioDevEd/call-tracking-servlets.git
    cd call-tracking-servlets
  2. 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.

  3. 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.

  4. Execute the migrations.

    ./gradlew flywayMigrate
  5. Run the application.

    ./gradlew appRun
  6. 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.

Meta

  • No warranty expressed or implied. Software is as is. Diggity.
  • MIT License
  • Lovingly crafted by Twilio Developer Education.

About

Call tracking demo app implemented with Java and Servlets

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages