Consider the simple timeout scenario: ``` Messages INVITE ----------> 1 407 <---------- 1 ACK ----------> 1 INVITE ----------> 1 100 <---------- 1 180 <---------- 0 183 <---------- 0 408 <---------- 1 ACK ----------> 1 ``` In the current implementation, running _kamctl fifo get_statistics tmx:_ on a fresh kamailio prints: ``` ... tmx:local_replies = 2 tmx:received_replies = 1 tmx:relayed_replies = 18446744073709551615 ``` After this patch: ``` ... tmx:local_replies = 2 tmx:received_replies = 1 tmx:relayed_replies = 0 ``` Fix the above by counting the relayed_total and substracting the relayed_local. You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/420
-- Commit Summary --
* tmx: Fix relayed_replies counter
-- File Changes --
M modules/tm/t_reply.c (5) M modules/tm/t_stats.c (1) M modules/tm/t_stats.h (6) M modules/tmx/tmx_mod.c (7)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/420.patch https://github.com/kamailio/kamailio/pull/420.diff
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/420
Consider the simple basic dialog scenario: ``` Messages INVITE ----------> 1 407 <---------- 1 ACK ----------> 1 INVITE ----------> 1 100 <---------- 1 180 <---------- 1 183 <---------- 0 200 <---------- 1 ACK ----------> 1 Pause [ 7000ms] 1 BYE ----------> 1 200 <---------- 1 ``` In the current implementation, running _kamctl fifo get_statistics tmx:_ on a fresh kamailio prints: ``` ... tmx:local_replies = 1 tmx:received_replies = 2 tmx:relayed_replies = 1 ``` After this patch: ``` ... tmx:local_replies = 1 tmx:received_replies = 2 tmx:relayed_replies = 3 (2 x 200 + 1 x 180) ```
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/420#issuecomment-160104670
IMHO, the _tmx:received_replies_ are not counded right also; right now the counter shows only completed_6xx/5xx/4xx/3xx/2xx. I think it should be 0 for the first scenario(i.e. no received reply, only local generated ones) and 3 for the second scenario(2 x 200 + 1 x 180 received). I'm thinking of a solution for this also.
What do you think would be the right values for those scenarios?
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/420#issuecomment-160105495
It can be the number of replies received and then relayed, leaving the local replies counter for the replies that are generated locally. Then the difference between received replies and relayed replies will show how many replies were absorbed by kamailio (e.g., for branch aggregation).
You can merge this pull request and if you have new updates, then you can make a new one. Thanks!
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/420#issuecomment-160115874
Merged #420.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/420#event-476272618