Giter VIP home page Giter VIP logo

chai-sip's Introduction

chai-sip

Installation

$ npm install chai-sip --save

Introduction

Chai plugin simplifying development of SIP server tests written in Node for CI/CD pipelines. It supports sending SIP requests and assert based on responses.

It also supports test cases where sending of RTP media is required as it will send audio to the destinations in the SDP received for a 200 OK to a sent SIP invite request.

Current version supports

  • Send SIP Invite requests with the following parameters
    • SIP Request URI
    • Custom headers and values
    • Content-type
    • Request body
  • High level API to send SIPRec Invite requests with the following parameters
    • SIP Request URI
    • Custom headers and values
    • Content-type
    • Request body
  • SIP Message requests with the following parameters
    • SIP Request URI
    • Custom headers and values
    • Content-type
    • Request body
  • Build SIP Cancel requests from provisional response
  • Wait for incoming SIP requests
  • High level API to send SIP Bye request within established dialog
  • Callback upon final SIP response
  • Callback upon provisional SIP response
  • Support for proxy authentication using SIP digest authentication
  • Supports SIP over UDP, TCP and TLS transports
  • Supports deployments with multiple proxy hops and record-route

In addtion to be able to send and receive SIP requests it provides the following new asserts:

  • to.be.method() - To assert on a received SIP requests method type, for example request.to.be.method("INVITE")
  • to.be.status() - To assert on a received SIP response status code, for example response.to.be.status(200)

If no headers, content-types and bodies are passed to the request function the plugin will generate default headers and bodies useful for basic test scenarios.

The plugin using sip.js, please have a look at its documentation to understand the configuration options and SIP request and response models and header configuration in more detail.

If you need to troubleshoot your tests and get more information about what is going on set the LOG_LEVEL environment variable to the value verbose, for example:

$ export LOG_LEVEL=verbose

Getting started

Have a look at the examples in this repository.

This project is sponsored by iotcomms.io.

chai-sip's People

Contributors

iotcomms avatar maspholm 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.