Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
hopefulGiupplo opened this issue Nov 28, 2023 · 4 comments
Closed

Comments

@hopefulGiupplo
Copy link

hopefulGiupplo commented Nov 28, 2023

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:

  • Kamailio sends HEP3/SIP packet to the right socket of heplify-server, and those packets are recognized by wireshark. However, heplify-server logs a WARN saying it receives malformed packets. I'll include my kamailio setup below, but let me know if this should be an issue for the Kamailio mailing list, rather than here.
  • A tcpdump on the homer machine shows that packets arrive, and wireshark can decode the pcap capture without problems
  • the Heplify-server doesn't even try to insert the packets it receives into the postgres database, seems like it ditches them.
  • Using heplify on kamailio machine, instead of siptrace, everything works.

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

Copy link

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

@lmangani
Copy link
Member

lmangani commented Nov 28, 2023

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
Copy link
Author

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
Copy link
Author

I managed to fix it, thank you for your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants