1.0.9 • Published 3 years ago

hepgen.js v1.0.9

Weekly downloads
5
License
MIT
Repository
github
Last release
3 years ago

HEPGEN.JS

Barebone HEP Packet Generator for SIP-less Devs and Unit Testing, supporting UDP or TCP transport.

npm.io

Configure

Edit config.js and create your HEP scenario with the following structure:

var config = {
        HEP_SERVER: '127.0.0.1',
        HEP_PORT: 9060,
        HEP_ID: '2001',
        HEP_AUTH: 'myHep',
        MESSAGES: [
          {
      		  rcinfo: { <HEP_HEADER> },
      		  pause: 0,
            payload: <sip message>
          },
          {
      		  rcinfo: { <HEP_HEADER> },
      		  pause: 1000,
            payload: <sip message>
          }
        ]
}

See config.json for a working example using SIP OPTIONS and a fictional Syslog

Install

npm install -g hepgen.js

Run

Replace 127.0.0.1 and 9060 with the actual IP and PORT of your HEP Server (udp by default):

hepgen.js -s 127.0.0.1 -p 9060 -c "./config/b2bcall_rtcp.js"

To turn on tcp transport add -t tcp to your command:

hepgen.js -s 127.0.0.1 -p 9060 -c "./config/b2bcall_rtcp.js" -t tcp

Custom Config

hepgen.js -c "./config/options.js"

Custom Config + Loki

hepgen.js -a my.loki.host -c "./config/b2bcall_rtcp_logs.js"

Custom from PCAP TEXT

hepgen.js -s 127.0.0.1 -p 9063 -P "./path/to/SIP.pcap-txt"

Debug

hepgen.js -d
1.1.1

8 months ago

1.1.0

8 months ago

1.0.9

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago