sipcapture / homer

HOMER - 100% Open-Source SIP, VoIP, RTC Packet Capture & Monitoring
https://sipcapture.org
GNU Affero General Public License v3.0
1.58k stars 239 forks source link

Heplify-server doesn't insert HEP packets from Kamailio siptrace #622

Closed hopefulGiupplo closed 7 months ago

hopefulGiupplo commented 7 months ago

Hello, I have set up an environment with Kamailio 5.6.0, and wanted to use Homer7 via the siptrace module. The problem is that the heplify server seems to receive the packets sent by Kamailio, but doesn't insert them in the postgres database.

Some more information:

My kamailio setup:

# ----- siptrace params -----
#!ifdef WITH_HOMER
modparam("siptrace", "duplicate_uri", "sip:MY_HOMER_MACHINE:9060")
modparam("siptrace", "send_sock_address", "sip:MY_KAMAILIO_MACHINE:5060")
modparam("siptrace", "hep_mode_on", 1)
modparam("siptrace", "hep_version", 3)
modparam("siptrace", "trace_to_database", 0)
modparam("siptrace", "trace_mode", 5)
modparam("siptrace", "trace_on", 1)
#!endif

Routing logic:

request_route {
    #!ifdef WITH_HOMER
    sip_trace_mode("t");
    hlog("Logging info to Homer.");
    #!endif
...
}

I'm uploading homer.pcap (github doesn't support pcap extension, so it will be linked from google drive), that is the result of a tcpdump listening to port 9060 on Homer's VM, and the logs from the Heplify-server. Thank you for your assistance. heplify-server.log homer.pcap

github-actions[bot] commented 7 months ago

Please star this repository to motivate the developers and to get higher priority! :star:

lmangani commented 7 months ago

My first bet is on trace_mode being the issue. Why is it set to 5?

https://www.kamailio.org/docs/modules/5.6.x/modules/siptrace.html#siptrace.p.trace_mode

hopefulGiupplo commented 7 months ago

It was set to 5 because we wanted to activate options 1 and 4, and documentation led us to believe it was a bit-based choice. Anyways, now I set it to 1 and the tables are still empty. I'm attaching the new pcap traces and the heplify-server logs. heplify-server.log Homer tcpdump listening on port 9060 Kamailio tcpdump listening on port 5060

hopefulGiupplo commented 7 months ago

I managed to fix it, thank you for your help