All Projects → twilio → twilio-voice.js

twilio / twilio-voice.js

Licence: other
Twilio's JavaScript Voice SDK

Programming Languages

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

Projects that are alternatives of or similar to twilio-voice.js

twilio-voice-notification-app
Reference app built in ReactJS that demonstrates how to leverage Twilio Programmable Voice and Twilio SDKs to create a voice notification system.
Stars: ✭ 21 (+0%)
Mutual labels:  twilio, voice
twilio-client.js
Twilio’s Programmable Voice JavaScript SDK
Stars: ✭ 63 (+200%)
Mutual labels:  twilio, voice
somleng
Open Source Implementation of Twilio's REST API
Stars: ✭ 33 (+57.14%)
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
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
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
useful-twilio-functions
A set of useful Twilio Functions.
Stars: ✭ 53 (+152.38%)
Mutual labels:  twilio, voice
terraform-provider-twilio
Terraform provider for Twilio. 🌎☎️ Preserved for archaeological fun. Please see the official Twilio TF provider @ https://github.com/twilio/terraform-provider-twilio.
Stars: ✭ 32 (+52.38%)
Mutual labels:  twilio
serverless-api
Node.js library to manage deploy Serverless Functions
Stars: ✭ 14 (-33.33%)
Mutual labels:  twilio
twilio-chat-demo-android
Chat API Demo Application for Android
Stars: ✭ 64 (+204.76%)
Mutual labels:  twilio
speaker.app
Source code for https://speaker.app, a batteries-included, web-based, quasi-decentralized, WebRTC networking platform, with a primary focus on audio and screen-sharing, and a secondary focus on chat messages and peripheral features.
Stars: ✭ 26 (+23.81%)
Mutual labels:  voice
spokestack-tray-android
A UI component that makes it easy to add voice interaction to your app.
Stars: ✭ 13 (-38.1%)
Mutual labels:  voice
personal-wealth-portfolio-mgt-bot
WARNING: This repository is no longer maintained ⚠️ This repository will not be updated. This repository will be kept available in read-only mode.
Stars: ✭ 43 (+104.76%)
Mutual labels:  twilio
botkit-sms
Twilio Programmable SMS implementation for Botkit.
Stars: ✭ 18 (-14.29%)
Mutual labels:  twilio
SwiftyWave
Siri Waves View in Swift
Stars: ✭ 66 (+214.29%)
Mutual labels:  voice
ruby-whatsapp-bots
A repo of WhatsApp bots built in Ruby
Stars: ✭ 18 (-14.29%)
Mutual labels:  twilio
Unity-Text-to-Speech
Sample app used to demonstrate the use of Microsoft Cognitive Services Text-to-Speech APIs (aka Speech Synthesis) from within Unity.
Stars: ✭ 67 (+219.05%)
Mutual labels:  voice
hermes-audio-server
An open source implementation of the audio server part of the Hermes protocol
Stars: ✭ 23 (+9.52%)
Mutual labels:  voice
twilio-video-room-monitor.js
A browser-based tool that displays information and metrics about Twilio Video JavaScript applications
Stars: ✭ 22 (+4.76%)
Mutual labels:  twilio

Migration from twilio-client.js 1.x

This product, Twilio's JavaScript Voice SDK, is the next version of Twilio's Javascript Client SDK. It is now in GA and we recommend all customers migrate in order to continue receiving future feature additions. For help on migrating from 1.x, see our migration guide.

@twilio/voice-sdk

Travis Build Status NPM

Twilio's Voice SDK allows you to add real-time voice and PSTN calling to your web apps.

Technical Support

If you need technical support, contact [email protected].

Installation

NPM

We recommend using npm to add the Voice SDK as a dependency.

npm install @twilio/voice-sdk --save

Using this method, you can import the Voice SDK using ES Module or TypeScript syntax:

import { Device } from '@twilio/voice-sdk';

Or using CommonJS:

const Device = require('@twilio/voice-sdk').Device;

CDN

As of 2.0, the Twilio Voice SDK is no longer hosted via CDN.

GitHub

Although we recommend using npm to add the Voice SDK as a dependency, you can also get the Twilio Voice SDK code from GitHub and include it in your project directly. To do so, navigate to "Tags" and find the most recent release, or the particular release version you'd like to use.

Note: releases tagged with "-rc" are "Release Candidate" versions and are still being tested. Unless you specifically know that you want to use a release candidate version, you should not use a release with "-rc" in the name.

Download either the zip or the tar.gz and then extract the files. For example, if you downloaded the tarball for the 2.0.0 release, you could then extract the files with the tar command:

tar -xvzf twilio-voice.js-2.0.0.tar.gz
cd twilio-voice.js-2.0.0

Once you've extracted the folder, the twilio.js and twilio.min.js files that you can include in your project will be in the /dist directory. twilio.min.js is the minified version of the code.

You can copy either the twilio.js or the twilio.min.js file into your project and then provide a link to it in your html. For example:

<script type="text/javascript" src="twilio.min.js"></script>

Using this method, you can access the SDK through the browser global:

const Device = Twilio.Device;

Testing

Running unit tests requires no setup aside from installation (above). You can run unit tests via:

npm run test:unit

Integration tests require some set up:

  1. If the account you want to use doesn't already have a TwiML app set up, create one using the TwiML code below.
  2. Copy config.example.yaml to config.yaml, replacing the placeholder information with valid credentials.
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Dial>
    <Client>
      <Identity>{{To}}</Identity>
      <Parameter name="duplicate" value="12345" />
      <Parameter name="duplicate" value="123456" />
      <Parameter name="custom + param" value="我不吃蛋" />
      <Parameter name="foobar" value="some + value" />
      <Parameter name="custom1" value="{{Custom1}}" />
      <Parameter name="custom2" value="{{Custom2}}" />
      <Parameter name="custom3" value="{{Custom3}}" />
    </Client>
  </Dial>
</Response>

Integration tests can be run via:

npm run test:integration

These tests will run via karma, one at a time, in your system's default Chrome and then Firefox.

Network tests have been split out into their own docker processes, and can be run via

npm run test:docker

Content Security Policy (CSP)

Use the following policy directives to enable CSP that is compatible with twilio-voice.js.

script-src https://media.twiliocdn.com https://sdk.twilio.com
media-src mediastream https://media.twiliocdn.com https://sdk.twilio.com
connect-src https://eventgw.twilio.com wss://chunderw-vpc-gll.twilio.com https://media.twiliocdn.com https://sdk.twilio.com

If you are providing a non-default value for Device.ConnectOptions.edge parameter, you need to add the Signaling URI wss://chunderw-vpc-gll-{regionId}.twilio.com in your connect-src directive where regionId is the Region ID as defined in this page. See examples below.

If Device.ConnectOptions.edge is ashburn

connect-src https://eventgw.twilio.com https://media.twiliocdn.com https://sdk.twilio.com wss://chunderw-vpc-gll-us1.twilio.com

If Device.ConnectOptions.edge is ['ashburn', 'sydney', 'roaming']

connect-src https://eventgw.twilio.com https://media.twiliocdn.com https://sdk.twilio.com wss://chunderw-vpc-gll-us1.twilio.com wss://chunderw-vpc-gll-au1.twilio.com wss://chunderw-vpc-gll.twilio.com

If you are providing a home region grant into your Twilio access token, you need to add the insights endpoint in your connect-src directive using eventgw.{homeRegion}.twilio.com format. Below is an example if your home region grant is sg1.

connect-src https://eventgw.sg1.twilio.com wss://chunderw-vpc-gll.twilio.com https://media.twiliocdn.com https://sdk.twilio.com

License

See LICENSE.md

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].