It’s never been so easy to set up your own call center and be in touch with your customers. With Twilio you can manage queues, assign agents and even get metrics about how the queues are working. All of it with little amount of code. In this tutorial we will show you how to accept incoming calls, place them into a queue, and then connect live agents to these callers, using Twilio Voice API, and the Flask framework for Python.

Tutorial requirements

To follow this tutorial you need the following components:

  • Python 3.6 or newer. If your operating system does not provide a Python interpreter, you can go to python.org to download an installer.
  • ngrok. We will use this handy utility to connect the Flask application running on your system to a public URL that Twilio can connect to. This is necessary for the development version of the call queue service because your computer is likely behind a router or firewall, so it isn’t directly reachable on the Internet. If you don’t have ngrok installed, you can download a copy for Windows, MacOS or Linux.
  • A Twilio account. If you are new to Twilio create a free account now. If you use this link to sign up, you will receive $10 in credit when you upgrade to a paid account.

Buy a Twilio phone number

Before we dig into code, we need a phone number where customers and agents can call your company. Twilio provides an easy way to buy phone numbers where you can pick numbers from different locations and even choose a phone number based on a phrase. From your Twilio Console, select Phone Numbers and then click on Buy Number. Your new number will be available on Active Numbers.

Buy a phone number

Twilio provides a default voice message by default. You can call your brand new number to listen to it and make sure that everything is working fine. Leave this tab open, we’ll be back to it soon.

#code #tutorials and hacks #python

Implement a Support Helpline with Queuing using Python and Twilio
1.45 GEEK