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:
A simple website with a form for collecting customer details
A PHP page that initiates a call to the customer who requested it when a member of staff clicks on a link
A short piece of TwiML to power this call
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...