Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sipcapture/hepgen.js
Barebone HEP Generator for SIP-less Devs
https://github.com/sipcapture/hepgen.js
hep javascript nodejs npm
Last synced: 3 months ago
JSON representation
Barebone HEP Generator for SIP-less Devs
- Host: GitHub
- URL: https://github.com/sipcapture/hepgen.js
- Owner: sipcapture
- License: mit
- Created: 2015-11-25T17:04:25.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-09-27T20:30:03.000Z (9 months ago)
- Last Synced: 2024-02-28T00:23:02.879Z (4 months ago)
- Topics: hep, javascript, nodejs, npm
- Language: JavaScript
- Homepage: http://sipcapture.org
- Size: 290 KB
- Stars: 9
- Watchers: 18
- Forks: 12
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Lists
- awesome-hep - HEPgen.js - HEPgen is a NodeJS HEP Packet Generator for SIP-less Devs and Unit Testing (Contribution Guidelines / Tools)
README
# HEPGEN.JS
Barebone HEP Packet Generator for SIP-less Devs and Unit Testing, supporting UDP or TCP transport.![](http://i.imgur.com/Z3xYbDh.png)
### 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: { },
pause: 0,
payload:
},
{
rcinfo: { },
pause: 1000,
payload:
}
]
}
```
See [config.json](https://github.com/sipcapture/hepgen.js/blob/master/config/default.js) 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. Default transport is `udp`:
```
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 9061 -c "./config/b2bcall_rtcp.js" -t tcp
```To turn on `tls` transport add -t tls to your command:
```
hepgen.js -s 127.0.0.1 -p 9443 -c "./config/b2bcall_rtcp.js" -t tls
```### 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
```### Loop a Call multiple times (Be careful how you use it)
```
hepgen.js -s 127.0.0.1 -p 9060 -c "./config/loop_simple.js" --loop 5 //loop same call 5 times
```