Routing Calls and SMS Messages to Your Application

As you implement our phone services, you will need to decide how to route calls and SMS messages to and from your application.

Menus, queues and routes let you define how calls and messages are handled for each of the phone numbers used in your application. For example, an after-hours call to your Technical Support line may be handled by a menu that offers callers various routing options, including, “Press [3] to troubleshoot your problem.” When a caller presses [3], the call is connected to your application, which provides step-by-step troubleshooting help, guiding your customer through further menu options and pre-recorded messages designed to help resolve the issue without speaking to a support person.


Diagram showing how incoming calls are processed

This kind of routing is achieved using menus and routes, which can be configured using settings in the Telephony Toolkit or invoked in real time using API calls to those resources.

This topic discusses different ways you can use Phone.com resources to route calls and SMS messages to your application, and it directs you to topics on setting up Call Handling Rules, Menus, Queues and other Phone.com resources.

Note: If you are looking for information on forming API requests, see Basic Phone.com API Requests and Responses. Also, Get Started with Our API shows you how to begin making calls to the Phone.com API.

Setting Up Your Account to Route Calls and SMS Messages

Before you can make or direct a call to your application, you must define settings for that application in your Phone.com API Developer account settings. Doing this sets your app’s Phone.com API key and API password—both of which you will need to make requests to our API. It also identifies the URL for your application webserver, so that out API server can return HTTP events to your app.

Tools for Routing Calls and SMS Messages

There are a number of Phone.com settings in the Telephony Toolkit that you can use to control how calls and messages are routed. These features can also be implemented through the API.

Routes (Call Handling Rules)

Use routes (known as Call Handling Rules in your account settings) to route incoming calls directly to your application, or on to any of your phone extensions, menus or queues. Once a caller is at a menu or in a queue, you can play greetings or hold music, request keypad (DTMF) input from callers, or direct them to voicemail or another part of your application. Routes can be set for individual phone numbers, on any extension attached to a phone number, or as part of a menu’s settings. You can also set rules to send incoming SMS messages directly to your application. All of these options can be configured using Telephony Toolkit settings.

Using the API, you can build out any of the routing functions mentioned above. You can also enable your customers to add, manage and delete their own routes from your application’s user interface.

Learn about setting routes in the Telephony Toolkit, and how to implement them through the API.

Queues

Our queues service lets you route incoming calls to a select group of phone numbers or extensions within your phone system. Queues are often used in Sales, Support and Service departments where there are more than one person answering calls. The call is placed in the queue, to be answered by the next available agent.

While callers are waiting, you can play hold music or announcements. You can also route callers to voicemail (using menus and routes) after a set period waiting in a queue, or you can use the time they are waiting in the queue to have them interact with an application—say, for example, a survey or a quiz.

Learn about configuring queues in the Telephony Toolkit, and how to implement them through the API.

Integrating Phone Calls Into an Application

Incoming phone calls are generally managed using routes set on either a phone number, an extension, or as part of a menu. You can also schedule outgoing phone calls to be made by your application using the API.

Example:

Your organization, a wide network of rural libraries, often has to close one of their locations without warning due to weather or staffing. Patrons drive far distances to a library only to find that it is closed, and your organization wants to develop an application using the Phone.com API to notify members when their branch is closed. The application cycles through library members who have signed up for closure notifications and initiates an asynchronous call to each of their phone numbers. When your application is notified that a person has answered the call, it then plays a pre-recorded message explaining that the local branch is temporarily closed.

Integrating SMS Messages Into an Application

Incoming SMS messages can be routed directly to your application. You can also schedule and send outgoing messages using our API.

Example:

In the example above, the application made a phone call to notify patrons that their library branch was closed. Your organization now wants to update the app to support text messages, so that members can sign up to get an SMS message instead of a phone call when a location is closed. The application cycles through members as before, and when it encounters a user that has signed up for SMS notifications, it sends an SMS message announcing the closure.

You could also allow library patrons to check whether a facility is open using specific terms in an SMS reply. For example, you might send the SMS message “We're sorry, the [area] branch is closed today due to blizzard conditions. Reply to this message with the word status to receive an update when we're open again.” To process replies from members, you can configure your phone number to forward SMS messages to your application. When your app receives the message with the word status in it, it can then flag a member’s phone number, sending another message when the library opens again.

Planning Your Application

Your application will quite likely be unique in the way it implements call and SMS routing. You will need to identify the workflow and features that you need, and then decide how best to order functions achieve your goals. Note that you must configure routes before trying to call resources through the API. When planning, check our Configuration Checklist to make sure you’ve set up all the systems and resources you will need to use our API.

We encourage you to read more on how menus, queues and routes work, and then decide how best to use our API services in your application.

For detailed information on making API requests, see Basic Phone.com API Requests and Responses and Using Phone.com API Services, Methods and URLs. Also, Get Started with Our API will show you how to begin making calls to the Phone.com API.

Learn More: