[SR-Users] Question on the SL Module

Alessio Garzi agarzi at sipwise.com
Mon Sep 20 17:10:13 CEST 2021


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/a9ef78b7f43616f2ceaa26df97eff68eb5348846/src/modules/sl/sl_stats.c#L165


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





More information about the sr-users mailing list