/HFP

HEP Fidelity Proxy

Primary LanguageGo

image

HEP Fidelity Proxy

Reliable way of relaying all your HEP to any HEP remote server that is behind unreliable networks.

It is buffered TCP proxy with option of storing HEP locally in cases of backend HEP server unavailability and replaying of that HEP after HEP server becomes reachable again. It can be beneficial in highly distributed voice networks to reliably deliver your HEP to its destination without additional infrastructure. It can be deployed locally to every HEP generating node within one premesis/DC/location acting as addon (1:1) approach or HEP generating nodes can connect to one HFP that will reliably proxy HEP generated within one premesis/DC/location (N:1)

From version 0.2 two modes of operation are supported.

  • Strict reliable HEP proxy mode without processing for high-performance
  • Reliable processing HEP proxy mode for filtering purposes to filter HEP by IP whether it is from HEP source or destination fields. It is engaged when "ipf" switch is configured

Usage

./hfp -l :9060 -r (HEP TCP server we want to reliably proxy HEP)

Options:
  -l string
    	Local HEP listening address (default ":9060")
  -r string
    	Remote HEP address (default "192.168.2.2:9060")
  -ipf string
    	IP filter address from HEP SRC or DST chunks. Option can use multiple IP as comma sepeated values. Default is no filter without processing HEP acting as high performance HEP proxy
  -ipfa string
    	IP filter Action. Options are pass or reject (default "pass")
  -d string
    	Debug options are off or on (default "off")
  -prom string
    	Prometheus metrics port (default "8090")
  -v  
      Prints current HFP version

Build

Manual

Building HFP requires go 1.15+

make
Docker
docker build -t sipcapture/HFP .
docker run -ti --rm sipcapture/HFP -l :9062 -r 1.2.3.4:9062 (optional: -ipf <comma separated IP addresses> -ipfa <action for "ipf" list> -d <on> -prom <Prometheus port>)

Run

image

Flow Diagrams

image

Metrics

Metrics are accessable on port 8090 unless port is changed by option flag. Example: http://HFP:8090/metrics

Prometheus metrics in grafana

Screenshot 2021-09-08 at 12 42 45

Screenshot 2021-09-08 at 12 44 29

Note

HEP parser and decoder used from https://github.com/sipcapture/heplify-server Heplify-server project