Live Call Routing

Route incoming phone calls to the right person with the on-call schedules and escalation policies you already use. Add real-time conversations to your support workflow!

CompanyEstimated TimeVendor DocsOpen Source

7 minutes

What is Twilio Live Call Routing Integration?

Twilio is a cloud communications platform for building SMS, Voice & Messaging applications on an API built for global scale.

With Twilio Live Call Routing, PagerTree users can:

  • Purchase and manage global phone numbers using Twilio.

  • Route incoming phone calls to PagerTree teams with on-call schedules and escalation layers.

  • Have the caller leave a voicemail if for some reason the on-call can’t answer.

  • Customize “hold music” and “voicemail message”.

Additionally, live call routing can be configured to route to multiple teams. When configured to route to multiple teams, callers will be presented with team options. For example: “Press 1 for Devops, Press 2 for Network Operations, Press 3 for Security”.

How it works

Twilio users can route incoming phone calls to on-call customer support.

  • When a new call comes in from Twilio, an alert is created in PagerTree automatically.

Integration Walkthrough

In this integration tutorial we will show you how to route an incoming phone call from Twilio into PagerTree. The estimated time for this integration is 7 minutes. We assume that you already have a PagerTree and Twilio account setup.

In Twilio - Create API Credentials

  1. Open a text editor, as we’ll need to copy several pieces of data.

  2. In the top right menu bar, navigate to Account -> Keys & Credentials -> API Keys & tokens.

  3. Ensure the United States (US1) Region is selected and click Create API key button.

  4. Give your key the following:

    1. Friendly name - Something you will easily remember

    2. Region - This must be United States (US1)

    3. Key type - Standard

  5. Copy the SID and Secret to your text editor.

  6. Check the "Got it! I have saved my API..." and click Done.

  7. Your text editor should now have the API Key SID and Secret.

Find the Twilio Account SID

Please note the API Key SID is different from the Account SID, so do not get them confused.

  1. From the Twilio dashboard, under account info, copy the Account SID. (It should begin with "AC")

  2. Your text editor should now have:

    1. API Key SID and Secret

    2. Account SID

In PagerTree - Create the Integration

  1. Create the integration by clicking the Twilio Live Call Routing logo.

  2. In the Options section, edit each option accordingly

    1. Paste the API Key SID you copied earlier to the Twilio API Key field. (Should start with "SK")

    2. Paste the API Secret you copied earlier to the Twilio API Secret field.

    3. Paste the Account SID you copied earlier to the Twilio Account SID field. (Should start with "AC")

  3. Click “Create”

In Twilio - Configure a Phone Number

  1. If you haven’t already, upgrade to a paid Twilio account.

  2. If you haven’t already, buy a phone number.

  3. Navigate to your purchased number Develop -> Phone Numbers -> Manage -> Active Numbers.

  4. Select the phone number that will be used for Live Call Routing.

  5. On the Phone Number Configure Tab, under Voice & Fax -> A Call Comes In

    1. Paste the PagerTree Endpoint URL you copied earlier

    2. Ensure the type is Webhook

    3. Ensure the action is HTTP POST

    4. Click Save

You have successfully completed the Twilio (Live Call Routing) Integration.

Prompt the caller for a team selection

You can set the destinations of the Live Call Routing integration to be multiple teams. When this is done, the caller will be prompted to select the team they wish to connect to. The team name will be used when reading the presentable options. Team names will be read in alphabetical order.

Push 1 for Customer Support. Push 2 for DevOps -

Integration Options


Welcome Recording

A recording that will be played first to caller (ex: "Hello, you have reached the Devop's on-call support line.")

Before Wait Music Recording

A recording to be played before wait music music.

Wait Music Recording

A recording or wait music to be played while the caller waits for someone to acknowledge the alert.

Before Connect Recording

A recording played before connecting the caller to the acknowledger.


Record a voicemail when no one acknowledges the call (see Configure Twilio Media Access)?


Voicemail Greeting Recording

A recording to be played when no one answers.

After Voicemail Greeting Recording

A recording played after the caller leaves a voicemail.

Voicemail Emails

A list of emails to send a notification to when the caller leaves a voicemail (see Configure Twilio Media Access).

Force Caller Input

Should PagerTree force caller input even if there is only one team assigned as a destination?


Configure Twilio Media Access

If you elect to enable the voicemail option, you will likely want to disable authentication for media access in Twilio. By doing so, users can access the voicemail recording without logging in to Twilio.

To disable HTTP Basic Authentication for media access in Twilio:

  1. Navigate to Develop -> Voice -> Settings -> General.

  2. Under the HTTP Basic Authentication for media access section, select Disabled.

  3. Scroll to the bottom of the page and click Save.

Special uses with routers

The Twilio Live Call Routing can be used with *limited* router functionality for dynamic selection of teams to be present to the caller.

  • When using this configuration, set the destinations of the integration to be only the router.

  • You can only use the assign action.

  • Team options will be read out in the order they are assigned (not alpha order)

Example - Time of day router to present different teams to the caller

  - match:
          timeformat: 'hh:mm a'
          timezone: 'America/New_York'
          starttime: '12:00 pm'
          endtime: '12:00 am'
    - type: assign
      receiver: tem_aaaaa # Team A
    - type: assign
      receiver: tem_bbbbb # Team B
  - match:
          timeformat: 'hh:mm a'
          timezone: 'America/New_York'
          starttime: '12:00 am'
          endtime: '12:00 pm'
    - type: assign
      receiver: tem_ccccc # Team C
    - type: assign
      receiver: tem_ddddd # Team D

Last updated