drachtio / drachtio-server

A SIP call processing server that can be controlled via nodejs applications
https://drachtio.org
MIT License
247 stars 94 forks source link

Drachtio-Server not sending HEP messages to heplify-server #387

Closed alonlaguna closed 1 week ago

alonlaguna commented 1 week ago

I am trying to monitor my Drachtio server via Homer. I added <capture-server port="9060" hep-version="3" id="101">HEPLIFY-SERVER-HOSTNAME</capture-server> to my drachtio.conf. I tried to check via tcpdump that anything is being sent on port 9060, but there is absolutely no traffic, even though I see SIP traffic in my Drachtio.logs. I also don't see any errors in my Drachtio.logs. I also tried to telnet to the HEPLIFY-SERVER-HOSTNAME on port 9060 from the drachtio server and succeeded. Any ideas what I am doing wrong. The documentation just mentions the capture-server xml configuration.

Catharsis68 commented 1 week ago

Hey, so we are running the drachtio-server in a kubernetes cluster and pass during startup the following arguments

drachtio --homer heplify-server:9060 --homer-id 10 --prometheus-scrape-port 8088 ...

--homer heplify-server this is the kubernetes service name of our heplify server => will be resolved by kubernetes --homer-id --prometheus-scrape-port 8088 enable prometheus metrics - we expose port 8088 with a PodMonitor

In addition, this must match the configuration of your homer ConfigMap https://github.com/sipcapture/homer-app/blob/master/CONFIGURE.md

{
 "hep_relay": {
    "help": "UDP socket to send HEP data on",
    "host": "heplify-server",
    "port": 9060
  },
}

heplify-server ConfigMap https://github.com/sipcapture/homer/wiki/HEPLIFY-SERVER-Settings

... 
 heplify-server.toml: |
    HEPAddr               = "0.0.0.0:9060"
    HEPTCPAddr            = ""
    HEPTLSAddr            = "0.0.0.0:9060"
alonlaguna commented 1 week ago

Thank you sooo much. This worked. For some reason my XML arguments did not work, but working via the command line does. I also am working in Kubernetes and added the args that you listed to my deployment.yaml.