sipcapture / hepsub Goto Github PK
View Code? Open in Web Editor NEWHEP Pub-Sub API Example
HEP Pub-Sub API Example
I tried to connect the demo agent to homer 7 and registration fails.
Hepsub and homer-app are on the same machine.
Tried couple of formats for host and port parameters (actual IP, local host, with and without quotes) in config file.
Is there something I need to do on homer-app for this to work?
# /usr/local/bin/homer-app --version
VERSION: 1.1.12
Configuration (swapped valid local IP with x.x.x.x:
var config = {
backend: 'http://localhost:9080/api/v3/agent/subscribe',
service: {
"uuid": Math.random().toString(36).substring(7),
"host":"x.x.x.x",
"port": "18088",
"protocol": "http",
"path": "/get",
"type": "cdr",
"ttl": 300,
"node": "test-endpoint",
"gid": 10
},
"debug": true
};
module.exports = config;
# npm start
> [email protected] start /home/kpribic/hepsub
> node helloworld.js
API Server started 18088
REGISTER API ERROR 400 Bad Request
REGISTER API undefined
Trace (swapped valid private IP for x.x.x.x):
POST /api/v3/agent/subscribe HTTP/1.1
connection: keep-alive
accept: text/html,text/javascript,application/json,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
cookie:
accept-encoding: gzip,deflate,sdch
pragma: no-cache
cache-control: no-cache
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36
host: localhost:9080
content-type: application/json
content-length: 169
{"uuid":"733b6a20-40ea-11ea-9bff-35c722e7c733","host":"x.x.x.x","port":18088,"protocol":"http","path":"/get","type":"cdr","ttl":300,"node":"test-endpoint","gid":10}
HTTP/1.1 400 Bad Request
Access-Control-Allow-Origin: *
Content-Encoding: gzip
Content-Type: application/json; charset=UTF-8
Vary: Origin
Vary: Accept-Encoding
Date: Mon, 27 Jan 2020 09:50:28 GMT
Content-Length: 93
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.