Giter Site home page Giter Site logo

twilio-akiramoto / masked-comms-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aymenn/masked-comms-app

0.0 0.0 0.0 171 KB

Masked communications using Twilio Conversations and Programmable Voice

License: MIT License

Shell 1.14% JavaScript 12.37% TypeScript 86.49%

masked-comms-app's Introduction

About

This is an example masked communicaiton application that demonstrates how build it by using Conversations API and Programmable Voice.

This application supports masking communicaitons between SMS, WhatsApp, and voice participants

Prerequisites

  • Twilio Account
  • 1 or more Twilio phone numbers (either bought or verified) to mask SMS and voice communications
  • Node.js v14 or higher
  • ngrok if running a local server

Getting Started

  1. Copy .env.template to .env
  2. Set your account sid and auth token in the corresponding variables
  3. Set NUMBER_POOL to an array of phone number(s) e.g.

NUMBER_POOL=["+19255551111","+19257775555"]

  1. If using ngrok, start ngrok for port 9000

ngrok http 9000

  1. Configure your phone number's inbound call handler with the url https://your_ngrok_server/proxypoc/inboundCall
  2. Install the app dependency packages

npm install

  1. Start your npm server

npm start

Using

This application provides an endpoint to create a conversation for participants to communicate and a landing page to simplify getting started.

  1. Navigate your browser to http://localhost:9000/
  2. You will see the configured phone numbers and a section titled Create a new proxy session
  3. Enter the numbers of two participant that you wish to connect anonymously
  4. Click Submit
  5. A JSON string is presented which contains an array of the participants added to the conversation. Each participant will have a messaging_binding.proxy_address. This is the address that the participants will send and receive numbers to and from
  6. Have participant A send a message to their proxy_number
  7. Participant B should receive the message from the Participant A's proxy_number
  8. You can also have participant A call the proxy_number. This should set up a call to Participant B and participant B should see Participant A's proxy phone number

Endpoint

/sessions

The sessions endpoint accepts one or more addresses. It creates a Conversation, finds a Proxy number for each participant and adds them to the conversation

/inboundCall

This endpoint receives inbound call events. It will query Twilio Conversations for a matching participant address and connect the other participant to the caller

Number Choosing

The number chooser included is a simple algorithm that picks a number from NUMBER_POOL that isnt used by the given participant's address.

masked-comms-app's People

Contributors

aymenn avatar cweems avatar pathiksoni avatar pbread 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.