Awesome Open Source
Awesome Open Source

Advanced Call Forwarding with Node and Express

Build status

Learn how to use Twilio to forward a series of phone calls to your state senators.

Local Development

This project is built using the Express web framework, and runs on Node.

We recommend to install Node through nvm (when possible)

curl -o- | bash \
nvm install node --stable

And yarn through npm.

npm install --global yarn

To run the app locally, follow these steps:

  1. Clone this repository and cd into it.

    git clone \
    cd call-forwarding-node
  2. Install the dependencies with:

    yarn install
  3. Run the migrations:

    yarn run migrate
  4. Seed the database with data:

    yarn run seed

    This will load senators.json and US zip codes into your SQLite database. Please note: our senators dataset is likely outdated, and we've mapped senators to placeholder phone numbers that are set up with Twilio to read a message and hang up.

  5. Expose your application to the internet using ngrok. In a separate terminal session, start ngrok with:

    ngrok http 3000

    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:
  6. Start your development server:

    yarn start

    Once ngrok is running, open up your browser and go to your ngrok URL.

Run the Tests

yarn test


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

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
javascript (68,071
node (952
express (472
voice (87
twilio (49
call (17

Find Open Source By Browsing 7,000 Topics Across 59 Categories