Code Monkey home page Code Monkey logo

Comments (23)

negbie avatar negbie commented on September 20, 2024 1

Yeah probably the best way to start. When you need help with docker open a new issue.

from heplify-server.

negbie avatar negbie commented on September 20, 2024

Hi,
first of all you don't even need mysql when you only want to capture sip and send sip metrics to prometheus or influx. When you want to visualize your calls with the homer gui you need a database. For heplify-server you just need to install mysql and configure heplify-server with the root user and credential. It will create all the databases and tables for you.

About your other questions:
PromAddr this is the address where heplify-server will expose its metrics. Simply use e.g 0.0.0.0:9069
PromTargetIP and PromTargetName are for bigger networks when you want to get metrics for specific proxies or sbc's. Not needed for smaller setups.

AlegIDs are for correlation between different call legs. This is needed for some pbx like asterisk.

from heplify-server.

Julian-Mentasti avatar Julian-Mentasti commented on September 20, 2024

Thanks for your help!

I set up the heplify-server.toml. However, when I run ./heplify-server I get the following:

[listen udp my IP:9060: bind: address already in use]

from heplify-server.

negbie avatar negbie commented on September 20, 2024

I guess kamailio is still running and listening under that port.

from heplify-server.

negbie avatar negbie commented on September 20, 2024

Simply delete it ;)

from heplify-server.

Julian-Mentasti avatar Julian-Mentasti commented on September 20, 2024

Its a new droplet, could have happen in between instances? Ill turn it off. yeah

from heplify-server.

negbie avatar negbie commented on September 20, 2024

You can check with
ss -tulpen
what is listening under 9060

from heplify-server.

Julian-Mentasti avatar Julian-Mentasti commented on September 20, 2024

So I shutdown the kamailio droplet and after running

ss -tulpen

I found two things using 9060

udp    UNCONN     0      0                     :::9060                 :::*      users:(("heplify-server",pid=29733,fd=7)) ino:38672 sk:ffff88007969a040 <->
tcp    LISTEN     0      128                   :::9060                 :::*      users:(("heplify-server",pid=29733,fd=6)) ino:38673 sk:ffff8800370c8800 <->

from heplify-server.

negbie avatar negbie commented on September 20, 2024

This means heplify-server is already running. I guess you've tried to start another one thats why you've got [listen udp my IP:9060: bind: address already in use]

heplify-server will listen for udp and tls traffic. Thats why you see udp and tcp there.

from heplify-server.

negbie avatar negbie commented on September 20, 2024

Just to follow up. Now you have a droplet with heplify-server, mysql and the gui files under /var/www right?

from heplify-server.

Julian-Mentasti avatar Julian-Mentasti commented on September 20, 2024

I have a droplet with heplify-server. I'm setting up mysql at the moment. Where exactly can I find the gui files?

So in theory if I run

sudo ./heplify-mips64 -hs myip:9060 -e -d fragment,rtcp,rtp,sdp -wf /srv/pcapdumps/ -zf

The files should be sent? I guess we cant really see unit mysql is set up

from heplify-server.

negbie avatar negbie commented on September 20, 2024

First of all you don't need to use -wf /srv/pcapdumps/ -zf to send packets to heplify-server.-wf /srv/pcapdumps/ -zf is only useful when you want to backup your traffic into pcap files.

So to test the connection between heplify and heplify-server run on the edgerouter
sudo ./heplify-mips64 -hs myip:9060 -nt tls

and on the debian host
sudo ./heplify-server -dbaddr "" -logstd -loglvl debug

later you can omit those flags because you use the toml config file

from heplify-server.

negbie avatar negbie commented on September 20, 2024

You can also use the installer and simply replace kamailio with heplify-server. But I like your spirit to setup everything by hand ;)

from heplify-server.

Julian-Mentasti avatar Julian-Mentasti commented on September 20, 2024

Hahahaha, yeah the installer seems like the best thing to do, but atleast doing it by hand let me understand things a but better (or so I hope)

I ran sudo ./heplify-mips64 -hs myip:9060 -nt tls on the edgerouter
and sudo ./heplify-server -dbaddr "" -logstd -loglvl debug on the server and this came out on the server:

root@heplify-server:~/binary# ./heplify-server -dbaddr "" -logstd -loglvl debug
2018/07/12 20:49:54.392083 server.go:111: INFO start heplify-server with config.HeplifyServer{HEPAddr:OMITTED:9060", ESAddr:"", MQDriver:"", MQAddr:"", MQTopic:"", PromAddr:"", PromTargetIP:"", PromTargetName:"", HoraclifixStats:false, RTPAgentStats:false, DBShema:"homer5", DBDriver:"mysql", DBAddr:"", DBUser:"root", DBPass:"", DBDataTable:"homer_data", DBConfTable:"homer_configuration", DBTableSpace:"", DBBulk:200, DBTimer:2, DBRotate:true, DBPartLog:"2h", DBPartSip:"1h", DBPartQos:"12h", DBDropDays:0, DBDropOnStart:false, Dedup:false, DiscardMethod:[]string{}, AlegIDs:[]string{}, LogDbg:"", LogLvl:"debug", LogStd:true, Config:"./heplify-server.toml", Version:false}
2018/07/12 20:49:54.392505 server.go:122: CRIT listen udp OMITTED:9060: bind: address already in use
[listen udp OMITTED:9060: bind: address already in use]

I feel as if I may have screwed something up.

from heplify-server.

negbie avatar negbie commented on September 20, 2024

[listen udp OMITTED:9060: bind: address already in use]
Again another heplify-server instance like the one you posted above is already running. You can kill it with
pkill heplify-server -9
or use the systemd service file

from heplify-server.

negbie avatar negbie commented on September 20, 2024

So before you start testing on your debian host make sure nothing is listening under port 9060. Check it with
ss -tulpen
If something is using port 9060 already kill it first.

from heplify-server.

Julian-Mentasti avatar Julian-Mentasti commented on September 20, 2024

Right,

I did that and I hope the following server side after I started a call.

,CID:OMITTED@OMITTED,Vlan:0,}

2018/07/12 20:58:06.987722 decoder.go:94: DBG [hep] packet with timestamp in the future with delta -148.389586ms from nodeID 2002
2018/07/12 20:58:06.987838 decoder.go:115: DBG [hep] &HEP{Version:2,Protocol:17,SrcIP:OMITTED,DstIP:OMITTED,SrcPort:5060,DstPort:7000,Tsec:1531429087,Tmsec:136086,ProtoType:1,NodeID:2002,NodePW:myhep,Payload:SIP/2.0 200 OK
Via: SIP/2.0/UDP OMITTED:7000;branch=z9hG4bK1372726
From: <sip:OMITTED>;tag=1b20a360
To: "1994" <sip:OMITTED>;tag=24B6784D-A7D5D620
CSeq: 1 OPTIONS
Call-ID: OMITTED@OMITTED
Contact: <sip:1994@OMITTED>
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER
Supported: replaces,100rel,100rel,timer,replaces,norefersub,sdp-anat
User-Agent: Polycom/5.4.4.2473 PolycomVVX-VVX_500-UA/5.4.4.2473
Accept-Language: en
Accept: application/sdp,text/plain,message/sipfrag,application/dialog-info+xml
Accept-Encoding: identity
Content-Length: 0

So I'm guessing its working! :D

from heplify-server.

negbie avatar negbie commented on September 20, 2024

Well done heplify and heplify-server speak successfully tls encrypted with each other.

from heplify-server.

negbie avatar negbie commented on September 20, 2024

Keep an eye on this message:
packet with timestamp in the future with delta -148.389586ms

This means you probably need to setup ntp. heplify-server will fix this timestamp for you but its better to have synced ntp hosts.

from heplify-server.

negbie avatar negbie commented on September 20, 2024

It's still a long way to go for a beginner when you want to do everything by hand. My recommendation for you would be:
1.) use docker and play with homer
2.) when you are more comfortable with homer use the installer and replace kamailio with heplify-server
3.) setup everything by hand

For 1 simply do:

from heplify-server.

Julian-Mentasti avatar Julian-Mentasti commented on September 20, 2024

Yeah, Im going to create a clean server after this one is done, and I should add ntp.

Thanks for the advice! I will look at docker.

I set up SQL and put the access in the heplify-server.toml. That seems to be working. If I want to have the visual output, where can I find the gui to put in /var/www. I cant find it for the life of me.

Thanks a lot for all your help.

from heplify-server.

negbie avatar negbie commented on September 20, 2024

To setup the gui part you need the ui from here
https://github.com/sipcapture/homer-ui
and the api from here
https://github.com/sipcapture/homer-api

move them to /var/www/html , correct some permissions and edit configuration and preferences.php
After that you need to setup php, php-fpm and apache or nginx. As I said a beginner could be overwhelmed by this ;)

from heplify-server.

Julian-Mentasti avatar Julian-Mentasti commented on September 20, 2024

I've set up ngnix before. But yeah that seems like a lot of room for failure hahaha. Guess its time to mess with docker. Thanks!

from heplify-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.