Warm Transfer: Transfer support calls from one agent to another using Flask
This project is built using the Flask web framework.
Clone this repository and
Create a new virtual environment.
Install the requirements.
pip install -r requirements.txt
Copy the sample configuration file and edit it to match your configuration.
$ cp .env.example .env
source .env to export the environment variables.
Run the migrations.
Our app uses SQLite, so you probably will not need to install additional software.
python manage.py db upgrade
Expose your application to the wider internet using ngrok.
To actually forward incoming calls, your development server will need to be publicly accessible. We recommend using ngrok to solve this problem.
$ ngrok http 5000
Once you have started ngrok, the public accessible URL will look like this:
Start the development server.
python manage.py runserver
Configure Twilio to call your webhooks.
You will also need to configure Twilio to call your application when calls are received on your
TWILIO_NUMBER. The voice URL should look something like this:
How to Demo
https://<ngrok_subdomain>.ngrok.ioin two different browser tabs or windows.
In one window/tab click
Connect as Agent 1and in the other one click
Connect as Agent 2. Now both agents are waiting for an incoming call.
Dial your Twilio Number to start a call with
Agent 1. Your
TWILIO_NUMBERenvironment variable was set when configuring the application to run.
Agent 1answers the call from the client, he/she can dial
Agent 2in by clicking on the
Dial agent 2 inbutton.
Agent 2answers the call all three participants will have joined the same call. After that,
Agent 1can drop the call and leave both the client and
Agent 2having a pleasant talk.
- No warranty expressed or implied. Software is as is. Diggity.
- MIT License
- Lovingly crafted by Twilio Developer Education.