parsip

    1.0.6 • Public • Published

    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

    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

    Install

    npm i parsip

    DownloadsWeekly Downloads

    50

    Version

    1.0.6

    License

    MIT

    Unpacked Size

    463 kB

    Total Files

    15

    Last publish

    Collaborators

    • lmangani