• Home
  • >
  • Call Forwarding with Voicemail

Call Forwarding with Voicemail

Twilio
  • Host on Twilio

This app will show you how to build a call forwarding app that forwards calls during a specific time window and records voicemails if calls are unanswered or outside that time window.

How it works:

  1. Call is placed to your Twilio number
  2. Your app checks the time
  3. If the time is within the defined window, it will forward the call to another phone number
  4. If it is not in the defined time window, it will record a voicemail
Functions
Functions with CLI

Twilio functions is a serverless environment to build and run Twilio applications so you can get to production faster.

Step 1:

Access serverless version of this code on GitHub.

View on GitHub

Step 2:

Use this sample code in Twilio Functions UI to deploy on Twilio infrastructure.

Read instructions
Why use Twilio Functions?
No server management
Scales automatically
Easy to build proof of concepts
Secure by default

Step 1:

Install Node JS

https://nodejs.org/en/download

Step 2:

Install Twilio CLI

Learn more
npm install -g twilio-cli

Step 3:

Install CLI plugins

twilio plugins:install @twilio-labs/plugin-serverless

Step 4:

You need a account SID and auth token to get started.

Get a free API key
twilio login

Step 5:

Download the template and configure

twilio serverless:init example --template=voicemail

Step 6:

Host on Twilio with this command

cd example
twilio serverless:deploy
Why use Twilio Functions?
No server management
Scales automatically
Easy to build proof of concepts
Secure by default
Why use the Twilio CLI?
Fits in your DevOps flow
Version control
Use CLI to run on multiple environments (Dev, Stage, Prod)

Don't see what you want?

There was an issue loading the page.

Please try again in some time.