Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including hep-js with all npm packages installed. Try it out:

var hepJs = require("hep-js")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

hep-js v1.0.20

HEP3 Library for Node.JS

Dependency Status npm


HEP: Javascript/Node implementation of HEP/EEP Encapsulation Protocol

This module provides Node with HEP/EEP packet encapsulation and decapsulation capabilities.

For more information about HEP and SIPCAPTURE Projects, please visit


npm install hep-js

Example Usage:

const HEPjs = require('hep-js');
var hep_encoder = HEPjs.encapsulate(payload,rcinfo); // returns data buffer
var hep_decoder = HEPjs.decapsulate(buffer); // returns JSON Object {payload,rcinfo}

Example: payload

Via: SIP/2.0/UDP;rport;branch=z9hG4bK484759904 
From: <>;tag=412285373 
To: <>;tag=1d24a28a0bded6c40d31e6db8aab9ac6.4679 
Call-ID: 1003554701 
CSeq: 20 ACK 
Content-Length: 0 

Example: rcinfo

rcinfo = { type: 'HEP',
  version: 3,
  payload_type: 'SIP',
  captureId: '2001',
  capturePass: 'myHep',
  ip_family: 2,
  time_sec: 1433719443,
  time_usec: 979,
  protocol: 17,
  proto_type: 1,
  srcIp: '',
  dstIp: '',
  srcPort: 5060,
  dstPort: 5060 

HEP/EEP Specs:

This Project is sponsored by QXIP BV


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free