Receiving incoming calls in the browser
Now that you know how to place and disconnect calls from the browser, it's time for your browser to start receiving incoming calls. By the end of this recipe, you will be able to make a call into your browser from your phone.
Getting Started
We're going to set up our Twilio Client app to accept incoming calls. This involves making changes to our Twilio app in our Twilio account.
To begin receiving incoming calls, we have to set up the Twilio Client app by performing the following steps:
Give the browser session a client name. The browser will use this name when it registers itself with Twilio.
Set up Twilio Client to notify your browser session about incoming connections.
Write a TwiML code that directs incoming calls to your browser session.
The complete code for this recipe can be found in the Recipe1
folder under Code
.
How to do it…
We will be implementing the following steps to set up our own app to allow incoming calls into our browser:
Firstly, since this...