New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

jssip-node-websocket

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jssip-node-websocket

JsSIP.Socket interface for the Node.js based on the websocket module

latest
Source
npmnpm
Version
3.0.0
Version published
Weekly downloads
212
-53.2%
Maintainers
1
Weekly downloads
 
Created
Source

jssip-node-websocket

JsSIP.Socket interface for Node.js based on the websocket module.

The aim of this module is to provide JsSIP with WebSocket support when running in Node.js.

Installation

$ npm install jssip-node-websocket --save

Requirements

  • jssip >= v2.0.0
  • Node.js >= v4.0.0

Usage

const JsSIP = require('jssip');
const NodeWebSocket = require('jssip-node-websocket');

let socket = new NodeWebSocket('wss://foo.example.com');

let ua = new JsSIP.UA(
  {
    uri          : 'sip:alice@example.com',
    password     : 'xxxxxxxx',
    display_name : 'Alice',
    sockets      : [ socket ]
  });

API

The module exports a NodeWebSocket class conforming with the JsSIP.Socket interface.

var socket = new NodeWebSocket(url, [options])

  • url (String): The WebSocket URL.
  • options (Object): An object with fields origin, headers, requestOptions and clientConfig matching the same meaning and format of the parameters given to the websocket.W3CWebSocket class constructor.

F.A.Q.

How to allow invalid TLS certificates?
var socket = new Socket('wss://foo.example.com',
  {
    origin         : 'https://www.example.com',
    requestOptions :
    {
      agent : new https.Agent({ rejectUnauthorized: false })
    }
  });

Author

Iñaki Baz Castillo (@ibc at Github)

License

ISC

FAQs

Package last updated on 03 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts