npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

chai-sip

v0.0.113

Published

SIP plugin for Chai

Downloads

5,214

Readme

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.