Giter VIP home page Giter VIP logo

parsip's Introduction

parSIP

A straight-forward SIP/SDP parsing module for Node/JS

Usage

SIP to JSON

var parsip = require('parsip');
var sip_message = "..." // Valid SIP Message here
var sip = parsip.getSIP(sip_message);

SDP to JSON

if (sip.headers['Content-Type'][0].raw == 'application/sdp'){
  var sdp = parsip.getSDP(sip.body);
}

VQ PUBLISH to JSON

if (sip.headers['Content-Type'][0].raw == 'application/vq-rtcpxr'){
  var vqj = parsip.getVQ(sip.headers.Packetloss[0].raw);
}
{ NLR: '0.0', JDR: '0.0' }

X-RTP-Stat to JSON

if (sip.headers['X-Rtp-Stat'][0].raw){
	var xrtp = parsip.getVQ(sip.headers['X-Rtp-Stat'][0].raw);
}
{ EX: 'BareSip',
  CS: '1000',
  CD: '29',
  PR: '1463',
  PS: '1490',
  PL: '0,0',
  PD: '0,0',
  JI: '3.0,3.0',
  IP: '3.4.5.6:48926,1.2.3.4:12856',
  EN: 'PCMA/8000',
  DE: 'PCMA/8000' }

JWT to JSON

var jwt = parsip.getJWT(sip.body.identity);

License

ParSIP is released under the MIT License

Acknowledgement

Based on elements from the awesome jsSIP and SDP-Tranform packages

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.