Skip to content

signalwire/signalwire-node

Repository files navigation

SignalWire SDK for Node.js and JavaScript

CI

This package provides a client for Signalwire services and supports different Javascript environments.

Packages

Project Description README CHANGELOG Version
Node.js SignalWire in Node.js README.md CHANGELOG.md NPM
JavaScript SignalWire in the browser! README.md CHANGELOG.md NPM
React Native SignalWire in a React Native App README.md CHANGELOG.md NPM

Refer to the README of each package for further details.

Hangup Error Handling

The SDK now properly reports error causes when calls are terminated due to exceptions. When an error occurs during call setup or negotiation, the verto.bye message will include specific error information instead of the generic NORMAL_CLEARING cause.

Error Payload Examples

Normal Call Clearing

{
  "method": "verto.bye",
  "params": {
    "sessid": "session-id",
    "dialogParams": {
      /* ... */
    },
    "cause": "NORMAL_CLEARING",
    "causeCode": 16
  }
}

Error Setting Remote SDP

{
  "method": "verto.bye",
  "params": {
    "sessid": "session-id",
    "dialogParams": {
      /* ... */
    },
    "cause": "NORMAL_CLEARING",
    "causeCode": 50004
  }
}

Error Sending Answer

{
  "method": "verto.bye",
  "params": {
    "sessid": "session-id",
    "dialogParams": {
      /* ... */
    },
    "cause": "NORMAL_CLEARING",
    "causeCode": 50001
  }
}

Error Sending Attach

{
  "method": "verto.bye",
  "params": {
    "sessid": "session-id",
    "dialogParams": {
      /* ... */
    },
    "cause": "NORMAL_CLEARING",
    "causeCode": 50002
  }
}

Error Cause Codes

  • REMOTE_SDP_ERROR_CAUSE_CODE 50004: Failed to set the remote session description during WebRTC negotiation
  • EXECUTE_ANSWER_ERROR_CAUSE_CODE 50001: Failed to send an answer message to the server
  • EXECUTE_ATTACH_ERROR_CAUSE_CODE 50002: Failed to send an attach message to the server
  • EXECUTE_INVITE_ERROR_CAUSE_CODE 50003: Failed to send an invite message to the server

All error causes use the special error code 666 to distinguish them from standard telephony cause codes.

License

Copyright © 2018-2019 SignalWire. It is free software, and may be redistributed under the terms specified in the MIT-LICENSE file.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 19