O'Reilly logo

Automate it! - Recipes to upskill your business by Chetan Giridhar

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 voice calls

Receiving voice calls is an important facet to developing apps using cloud telephony. A lot of business cases (as you'd have imagined) are dependent on incoming voice calls. Let's look at handling incoming voice calls using the Twilio APIs.

Getting ready

In this recipe, we use the twilio and flask modules like we used in the previous recipe for SMS. So, no new installations are needed for this section.

How to do it...

  1. We start by creating our configuration file. We need the Twilio AccountSID and AuthToken here as well. We don't need any caller ID in this case as the rented number itself is the caller ID.
  2. Now, let's look at our Flask server, the code for which is given in the following. We call this as voice_inbound.py:
     from flask ...

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