O'Reilly logo

Twilio Best Practices by Tim Rogers

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Receiving incoming calls in the browser

We've now made an outgoing phone call from within the browser, but we're yet to see how receiving a call works.

To demonstrate this, let's build a page where our imaginary technical support team can take calls from customers in their browsers.

In the same directory as before, create a PHP file called tech.php that should contain the following:

<?php // To start, you'll need to include the Twilio PHP library, and particularly // the Capability functionality. Replace this with the path to where you have // the library installed, or the autoload file if you're using Composer. require 'Services/Twilio/Capability.php'; // Add your own API credentials here - we'll need these to generate a token $accountSid = '<your ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required