Hello,
I agree that this stats handling is a bit non-intuitive.
Basically, the reasoning behind the implementation was, to count certain, well-known
return codes with individual counters and have a generic NXX counter for the rest.
Taking the 5xx codes as example, the 500 counter just gives you this value, and the 5XX
counter the rest. If you want to get all 5xx codes counts, you need to take the sum of 500
and 5XX counter. Similar logic also applies to the other counters in this module.
Hope this makes it clear. Extensions to the docs are of course always welcome, just open a
pull-request.
Cheers,
Henning
--
Henning Westerholt -
https://skalatan.de/blog/
Kamailio services -
https://gilawa.com
-----Original Message-----
From: sr-users <sr-users-bounces(a)lists.kamailio.org> On Behalf Of Alessio Garzi
Sent: Monday, September 20, 2021 5:10 PM
To: Kamailio (SER) - Users Mailing List <sr-users(a)lists.kamailio.org>
Subject: [SR-Users] Question on the SL Module
Hello Kama ML,
today I stumbled on function "update_sl_stats()" inside sl_stats.c and noticed
that some response codes are treated differently.
For example here:
https://github.com/kamailio/kamailio/blob/a9ef78b7f43616f2ceaa26df97eff68eb…
since we have a "break;" statement, when a 500 code is received, the 5XX counter
is not incremented even if a 500 code belongs to the 5XX family.
We have the same behaviour for other response codes and it really seems
that it's not a bug and the author really wanted it.
The docs are not so helpful and they don't explain much in detail how
counters are built.
I just want to have confirmation this is how it must work and I wonder
if it's the case to write something about it into the docs.
Thanks
Alessio
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
* sr-users(a)lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
*
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users