sipcapture / homer

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

Incorrect "Session Duration Time" #606

Closed inatelso closed 1 year ago

inatelso commented 1 year ago

Hi Homer Team,

We installed Homer v7 on CentOS 7 (Docker install), and our heplify client is an Asterisk v15.7.2, also on CentOS 7. This asterisk acts as a proxy, receives calls from others Asterisk (same LAN), and forward these calls to VoIP Providers (through Internet). The Homer works fine, but I see many calls with long duration (for example more than 600 seconds), with 'Session Duration Time' equals as 520–530 seconds maximum.

I reviewed the flow, and it isn't complete. Some calls don't have the BYE, 200 (SDP) or ACK. So, I understand that Asterisk (heplify client) doesn't send the SIP packet or SIP packets are lost. Another reason can be the high traffic supported by the Asterisk (more than 400 000 calls per day). I supposed.

Any recommendation or action to take?

I hope to hear from you soon.

Sincerely

Mauro

Call_One Call_Three Call_Two

github-actions[bot] commented 1 year ago

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

lmangani commented 1 year ago

If you have packet loss and you are aware of it, troubleshooting errors in homer will be biased. I would suggest switching your heplify to deliver packets using tcp and see if you get a more reliable situation. once you have all messages, make sure you take query limit into account for session returning a large number of messages.

inatelso commented 1 year ago

Hi Lorenzo,

I found these lines in heplify.log: 2023/08/10 12:42:01.536230 sniffer.go:535: INFO Stats {received dropped-os dropped-int}: {17259721 0 0} 2023/08/10 12:42:01.536302 util.go:100: INFO Packets since last minute IPv4: 6035, IPv6: 0, UDP: 5957, TCP: 0, SCTP: 0, RTCP: 3000, RTCPFail: 3, DNS: 0, HEP: 0, duplicate: 0, fragments: 0, unknown: 6 2023/08/10 12:42:02.854794 publisher.go:63: INFO Packets since last minute sent: 6042

What's the meaning of 'RTCPFail' and 'unknown'?

About packets using tcp, how can I do that?

Sincerely, Mauro

inatelso commented 1 year ago

Hi,

I've configured the heplify to deliver packets using tcp. But, the homer doesn't show all flow sip, the majority of cases are without BYE. My question is, what parameter establish the value of the session duration time? If the calls don't have the method BYE.

Mauro

lmangani commented 1 year ago

homer does not track sessions and only estimates the session duration based on the signaling events it has available. No BYE means no way to calculate a duration, so that's the challenge you have to address. If you have very long duration calls or lots of messages increase the limit values..

inatelso commented 1 year ago

I understood, Lorenzo. I'm going to do a lab. Any comment or information, I write again. Thanks!

Mauro