Book Image

Twilio Cookbook: Second Edition

By : Roger Stringer
Book Image

Twilio Cookbook: Second Edition

By: Roger Stringer

Overview of this book

Table of Contents (20 chapters)
Twilio Cookbook Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Making browser-to-browser calls


Our final recipe will make calls from one browser client to another.

For this to work, we need to have two different web browser windows open. Of course, each web browser needs to be registered under a separate name. For this example, we'll have one browser window that is registered as Jenny and another one as Tommy.

Getting Started

We're going to set up our client to allow you to talk to other browser sessions as well as make calls from actual physical telephones.

We're storing the client name inside a session in this recipe, so to test it on the same computer, you should make sure that you use two different browsers, for example Chrome and Safari.

The complete code for this recipe can be found in the Recipe1 folder under Code.

How to do it…

This recipe will allow us to set up browser-to-browser calls by performing the following steps:

  1. Download the Twilio Helper Library available at https://github.com/twilio/twilio-php/zipball/master and unzip it.

  2. Upload the Services...