Giter Club home page Giter Club logo

warm-transfer-node's Introduction

Twilio

Warm Transfer

Build Status

Have you ever been disconnected from a support call while being transferred to another support agent? Warm transfer eliminates this problem. Using Twilio powered warm transfers your agents will have the ability to conference in another agent in realtime.

Read the full tutorial here!

Requirements:

Local development

  1. First clone this repository and cd into it.

    git clone [email protected]:TwilioDevEd/warm-transfer-node.git
    cd warm-transfer-node
  2. Copy the sample configuration file and edit it to match your configuration.

    $ cp .env.example .env

You can find your TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN in your Twilio Account Settings. You will also need a TWILIO_NUMBER, which you may find here.

  1. Install dependencies.
$ npm install
  1. Make sure the tests succeed.
$ npm test
  1. Run the application.
$ npm start
  1. Expose your application to the wider internet using ngrok. This step is important because the application won't work as expected if you run it through localhost.
$ ngrok http 3000

Once ngrok is running, open up your browser and go to your ngrok URL. It will look something like this:

http://9a159ccf.ngrok.io

You can read this blog post for more details on how to use ngrok.

  1. 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:

http://<your-ngrok-subdomain>.ngrok.io/conference/connect/client

Configure Voice

  1. Check it out at http://localhost:3000.

That's it!

How to Demo

  1. Navigate to https://<your_ngrok_subdomain>.ngrok.io in two different browser tabs or windows.

    Notes:

    • Remember to use your SSL enabled ngrok URL https. Failing to do this won't allow you to receive incoming calls.

    • The application has been tested with Chrome and Firefox. Safari is not supported at the moment.

  2. In one window/tab click Connect as Agent 1 and in the other one click Connect as Agent 2. Now both agents are waiting for an incoming call.

  3. Dial your Twilio Number to start a call with Agent 1. Your TWILIO_NUMBER environment variable was set when configuring the application to run.

  4. When Agent 1 answers the call from the client, he/she can dial Agent 2 in by clicking on the Dial agent 2 in button.

  5. Once Agent 2 answers the call all three participants will have joined the same call. After that Agent 1 can drop the call and leave both the client and Agent 2 having a pleasant talk.

Meta

  • No warranty expressed or implied. Software is as is. Diggity.
  • MIT License
  • Lovingly crafted by Twilio Developer Education.

warm-transfer-node's People

Contributors

acamino avatar hortega avatar joliveros avatar kathyguerron avatar mosampaio avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.