Free Sample
+ Collection

Twilio Cookbook: Second Edition

Roger Stringer

Over 70 easy-to-follow recipes, from exploring the key features of Twilio to building advanced telephony apps
RRP $29.99
RRP $49.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781783550654
Paperback334 pages

About This Book

  • Updated to include picture messaging, call queueing, and Twilio Client; all recommended by Twilio
  • The only book that teaches you how to set up your own conference calling system or how to build a PBX for your company
  • Each recipe is a carefully organized sequence of instructions to complete the task as efficiently as possible

Who This Book Is For

If you are a developer and want to learn about integrating Twilio's API into your websites for telephone solutions, then this book is for you. Basic knowledge of PHP and MySQL is expected.

Table of Contents

Chapter 1: Into the Frying Pan
Adding two-factor voice authentication to verify users
Using Twilio SMS to set up two-factor authentication for secure websites
Adding order verification
Adding the Click-to-Call functionality to your website
Recording a phone call
Setting up a company directory
Setting up Text-to-Speech
Chapter 2: Now We're Cooking
Tracking account usage
Screening calls
Buying a phone number
Setting up a voicemail system
Building an emergency calling system
Chapter 3: Conducting Surveys via SMS
Why use PDO instead of the standard MySQL functions?
Letting users subscribe to receive surveys
Building a survey tree
Sending a survey to your users
Adding tracking for each user
Listening to user responses and commands
Building a chart of responses
Chapter 4: Building a Conference Calling System
Scheduling a conference call
Sending an SMS to all participants at the time of the call
Starting and recording a conference
Joining a conference call from the web browser
Monitoring the conference call
Muting a participant
Chapter 5: Combining Twilio with Other APIs
Searching for local businesses via text
Getting the local weather forecast
Searching for local movie listings
Searching for classifieds
Getting local TV listings
Searching Google using SMS
Searching the stock market
Getting the latest headlines
Chapter 6: Sending and Receiving SMS Messages
Sending a message from a website
Replying to a message from the phone
Forwarding SMS messages to another phone number
Sending bulk SMS to a list of contacts
Tracking orders with SMS
Sending and receiving group chats
Sending SMS messages in a phone call
Monitoring a website
Chapter 7: Building a Reminder System
Scheduling reminders via text
Getting notified when the time comes
Retrieving a list of upcoming reminders
Canceling an upcoming reminder
Adding another person to a reminder
Chapter 8: Building an IVR System
Setting up IVRs
Screening and recording calls
Logging and reporting calls
Looking up HighriseHQ contacts on incoming calls
Getting directions
Leaving a message
Sending an SMS to your contacts
Chapter 9: Building Your Own PBX
Getting started with PBX
Setting up a subaccount for each user
Letting a user purchase a custom phone number
Allowing users to make calls from their call logs
Allowing incoming phone calls
Allowing outgoing phone calls
Deleting a subaccount
Chapter 10: Digging into OpenVBX
Building a call log plugin
Building a searchable company directory
Collecting Stripe payments
Tracking orders
Building a caller ID routing plugin
Testing call flows
Chapter 11: Sending and Receiving Picture Messages
Receiving MMS messages
Sending picture messages from a website
Making the picture message gallery
Filtering picture messages
Blacklisting and whitelisting the submissions
Chapter 12: Call Queuing
Adding incoming callers to a call queue
Obtaining the average wait time for call queues
Setting a maximum queue size
Connecting the first caller in the queue
Chapter 13: Working with Twilio Client
Setting up the client
Receiving incoming calls in the browser
Making outgoing calls from the browser
Making browser-to-browser calls
Displaying availability

What You Will Learn

  • Add two-factor authentication to your web apps to verify your users
  • Explore how to generate usage records and set up voice mails and emergency calling systems
  • Conduct surveys using SMS and make your account more client friendly
  • Build a fully functional conference calling system
  • Use APIs to build a local search system to find businesses, movies, and weather forecasts
  • Delve into SMS messaging and learn how to set up order tracking, bulk SMS sending, and a group chat system
  • Set up an appointment reminder using SMS
  • Build an Interactive Voice Response menu system
  • Construct your first PBX system
  • Understand OpenVBX plugins to extend its existing functionality
  • Utilize Twilio's new picture messaging, and build a collaborative Picture Message Gallery
  • Use Twilio client to make calls from your browser
  • Discover how to handle multiple incoming callers

In Detail

Have you ever wanted to integrate phone features into a project you were working on? Maybe you wanted to send SMS messages to your customers about the latest sales? Maybe you want to set up a company directory with voice mail? Or maybe you want to add two-factor authentication to your web sites to verify your users? Since Twilio was launched in 2007, developers have had an easy and efficient way to do these tasks. The power of Twilio’s API is huge and lets you add any type of phone solution to your website from two-factor authentication to verify your users, to setting up a company directory and a voice mail system. The possibilities are endless.

This book is a must have for Twilio development, providing you with a number of clear step-by-step exercises. It helps you take advantage of the real power of the Twilio API, and gives you a good foundation in using it in your websites.

This book examines the Twilio API, and breaks down the mystery and confusion that surrounds adding telephone functionality to your websites. As you go through the recipes, you will learn how to take advantage of the Twilio API quickly and painlessly.

You will learn how to build your own IVR system, company directory, and voicemail box, and also how to set up a two-factor authentication system to verify users, track orders via SMS, send surveys using SMS, allow users to buy phone numbers, set up and delete sub-accounts, and check to see if a human is answering a phone call. We will also combine Twilio with other APIs to build a handy local search system such as a local business search, movie listings search, and web search. We’ll also dive into call queues and how to handle multiple incoming callers to agents. If you want to discover the endless benefits of Twilio, then this book is for you.


Read More