Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Twilio Best Practices

You're reading from   Twilio Best Practices Learn how to build powerful real-time voice and SMS applications with Twilio

Arrow left icon
Product type Paperback
Published in Dec 2014
Publisher
ISBN-13 9781782175896
Length 178 pages
Edition 1st Edition
Tools
Arrow right icon
Toc

Table of Contents (10) Chapters Close

The callback request tool


First up, we're going to build a callback request tool that is suitable for any website.

Popular across the Internet, such tools are great for small businesses that want to let their customers get in touch with them without the annoying need to wait on hold.

There are four components of this tool:

  1. A simple website with a form for collecting customer details

  2. A PHP page that initiates a call to the customer who requested it when a member of staff clicks on a link

  3. A short piece of TwiML to power this call

  4. A status callback page that listens for a request from Twilio to let it know that a call was answered so the database can be updated

Let's get started.

Preparing the project

To start, we'll need to get some dependencies in order and prepare a configuration and setup file that can be included in all of our pages.

Installing the Twilio API library

First, we'll install the Twilio PHP library using Composer.

To do that, first install Composer on your machine (if you don't have it...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime