All Projects → twilio → twilio-voice-notification-app

twilio / twilio-voice-notification-app

Licence: Apache-2.0 License
Reference app built in ReactJS that demonstrates how to leverage Twilio Programmable Voice and Twilio SDKs to create a voice notification system.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to twilio-voice-notification-app

Audioswitch
An Android audio management library for real-time communication apps.
Stars: ✭ 69 (+228.57%)
Mutual labels:  twilio, voice
Call Forwarding Node
A sample implementation of advanced call forwarding using Twilio, Node.js and Express.js.
Stars: ✭ 6 (-71.43%)
Mutual labels:  twilio, voice
Twilio Java
A Java library for communicating with the Twilio REST API and generating TwiML.
Stars: ✭ 371 (+1666.67%)
Mutual labels:  twilio, voice
somleng
Open Source Implementation of Twilio's REST API
Stars: ✭ 33 (+57.14%)
Mutual labels:  twilio, voice
twilio-voice.js
Twilio's JavaScript Voice SDK
Stars: ✭ 21 (+0%)
Mutual labels:  twilio, voice
Twilio
Twilio notifications channel for Laravel
Stars: ✭ 141 (+571.43%)
Mutual labels:  notifications, twilio
Twilio Csharp
Twilio C#/.NET Helper Library for .NET Framework 3.5+ and supported .NET Core versions
Stars: ✭ 541 (+2476.19%)
Mutual labels:  twilio, voice
useful-twilio-functions
A set of useful Twilio Functions.
Stars: ✭ 53 (+152.38%)
Mutual labels:  twilio, voice
twilio-client.js
Twilio’s Programmable Voice JavaScript SDK
Stars: ✭ 63 (+200%)
Mutual labels:  twilio, voice
Dracker
An iOS and React App to track debt and send/receive payments.
Stars: ✭ 22 (+4.76%)
Mutual labels:  notifications, twilio
vortex
Revolt voice server
Stars: ✭ 61 (+190.48%)
Mutual labels:  voice
NotificationExplorer
See what notifications exist at runtime
Stars: ✭ 43 (+104.76%)
Mutual labels:  notifications
ack-nestjs-mongoose
NestJs Boilerplate. Authentication (OAuth2), Mongoose, MongoDB , Configuration, Multi Languages (i18n), etc. Advance Example 🥶. NestJs v8 🥳🎉. Production Ready 🚀🔥
Stars: ✭ 81 (+285.71%)
Mutual labels:  nestjs
phone-captcha
📱 Block robocalls with captcha for phone calls
Stars: ✭ 32 (+52.38%)
Mutual labels:  twilio
devhub
TweetDeck for GitHub - Filter Issues, Activities & Notifications - Web, Mobile & Desktop with 99% code sharing between them
Stars: ✭ 8,064 (+38300%)
Mutual labels:  notifications
zeldaPlay
A Single Page Application to help zeldaPlay players to track their characters and progress
Stars: ✭ 95 (+352.38%)
Mutual labels:  nestjs
nestjs-graphql-serverless
Boilerplate for using NestJS with GraphQL (Code-First) on serverless environment (AWS Lambda)
Stars: ✭ 64 (+204.76%)
Mutual labels:  nestjs
mapped-types
Configuration module for Nest framework (node.js) 🐺
Stars: ✭ 192 (+814.29%)
Mutual labels:  nestjs
nestlogger
Logger library for NestJs services
Stars: ✭ 28 (+33.33%)
Mutual labels:  nestjs
nest-prisma-rest-api-boilerplate
Nest + Prisma + TypeScript | REST API Starter repository
Stars: ✭ 24 (+14.29%)
Mutual labels:  nestjs
Twilio

Voice Notifications powered by Twilio

twilio

Table of Contents

About

This web-based reference app built in ReactJS and demonstrates how to leverage Twilio Programmable Voice and Twilio SDKs to create a voice notification system to make calls to your customers to deliver time-sensitive messages. This reference app can be used as a starting point, whether you are building a voice notification solution for Emergency Alerts or Sales & Marketing use cases.

Access to the source code should help you understand how to use the Twilio platform “building blocks” and Programmable Voice APIs to build an application for your own notification use case and accelerate your development.

How it works

This fully functional reference app allows you to send voice notifications to hundreds of recipients. All you need to do is specify a notification name for reference, write down the message, and upload a list of the recipients’ phone numbers in a .txt file. That’s it!

Once you broadcast the voice notification, the application will start placing outbound calls to deliver your message and listen for call updates in real-time using Twilio Voice Webhooks. Changes in call status are received asynchronously in the form of status callbacks and results are stored in the database as soon as they occur. The application is polling data from the database every 5 seconds to display progress and call updates in the UI.

For a more detailed exploration of the technology involved, please refer to the Technical Overview.

Technology stack

Features

  • Send voice notifications to up to 500 recipients (configurable)
  • Read message to recipients by using the text-to-speech capabilities
  • Make a phone call to test the notification before sending to the complete list of recipients
  • Automatically detect invalid and duplicated recipients phone numbers
  • Track delivery progress of outbound calls in real-time
  • Performance reports available for download in JSON format

Please note that using the application will incur in charges for Programmable Voice minutes.

Setup

Requirements

  • Node.js v10+
  • NPM v6+ (comes installed with newer Node versions)
  • A PostgreSQL server (local or cloud)

Twilio Account Settings

Variable Description
Account Sid Twilio Account Sid. This information can be found on your Account Dashboard in the Twilio Console
Auth Token Twilio Auth Token. This information can be found on your Account Dashboard in the Twilio Console
Phone Number A Twilio phone number. You can buy one on your Account Dashboard in the Twilio Console

Application Settings

Variable Description
Passcode Passcode to protect your Voice Notification App. This will be required to use the application

Local Development

1. Clone the repository

$ git clone [email protected]:twilio/twilio-voice-notification-app.git

2. Install Dependencies

$ npm install

This application uses Twilio credentials to create the Call resources. It also requires a PostgreSQL database for storing the notifications and related call data. Add the following parameters to your .env file (use .env.example as a reference):

PASSCODE=XXXXXX
DATABASE_URL=postgres://username:password@hostname:port/dbname
ACCOUNT_SID=ACXXXXXXXXXXXXXXXXXXXXXXX
AUTH_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXX

Please note that you may need to install PostgreSQL and start it up or leverage some DBaaS provider to create a free cloud database (such as https://www.elephantsql.com)

3. Install Dependencies

$ npm start

The first time you run the app, it will create the database schemas, tables and relationships. In addition, this command will run the NodeJS server and will expose the ReactJS application via ngrok. An ngrok server is required so that Twilio can locate your server and invoke the webhooks on every call status update.

Alternatively, you can start UI and Server separately for a more granular development experience:

$ npm run start:ui $ npm run start:server

Tests

Run unit tests locally with the following command $ npm test

Cloud deployment

Additionally to trying out this application locally, you can deploy it to a host service. Here you have some 1-click deploy alternatives.

Service
Heroku Deploy

Please notice that some free plans might have limitations. We encourage you to research about the hosting services and plans before using them.

Development considerations

Twilio

  • The time it takes to complete delivering all the messages depends on the number of recipients, as well as, the Calls Per Second (CPS) setting on your Twilio account. Twilio accounts default to throttling 1 Call Per Second. You can increase your account's CPS threshold under your Voice Settings in the console
  • Twilio has API concurrency limits. If you send too many concurrent calls, Twilio might respond to your requests with Error 429 - Too many requests. Refer to this guide for best practices for avoiding Error 429 responses.
  • Twilio protects your account from fraud and abuse with Voice Dialing Geo Permissions to allow only legitimate calls. Voice Dialing Geographic Permissions control which countries and subsets of phone numbers you are able to dial out to from your Twilio project. Please note that the destinations you need to call should be enabled. You can manage call destinations from Twilio Console Voice Geographic Permission.

Cloud

Heroku free account

  • This reference app can be deployed to Heroku in minutes. Please note that the Heroku free tier account has limits and is not suited for processing and storing large volumes of data. Before using Heroku for production purposes, consider upgrading to one of their paid plans.
  • Heroku provides a PostgreSQL database for free which has a limit of 10,000 database row insertions. After this limit is reached, the DB is made read-only. This means you won’t be able to send new notifications, but you will still be able to access the application and review your voice notification history. To continue sending more notifications under the same deployed application, you will need to upgrade the plan. Alternatively, if you have a PostgreSQL database server hosted somewhere and want to use it instead of the one provided by Heroku, you can edit the DATABASE_URL variable in Heroku application settings and set your own PostgreSQL database connection.

Security

This reference app requires a passcode to control the access to the application. Please note that this represents very basic protection and you should replace it with an authentication mechanism of your choice (OAuth, JWT, etc).

Other

Resources

Open Contribution

This project is open source and welcomes contributions. All contributions are subject to our Code of Conduct.

License

Apache 2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].