I'm building v5.1.4 packages with that commit cherry-picked. I will deploy as soon as I have run a few tests in lab. I have noticed that the issue happens only on low traffic, so it matches your theory of the value going "below 0"...
I was thinking if running a script every second gathering on both nodes:
``` kamctl rpc dlg.stats_active kamctl rpc dlg.list | grep h_entry | sort | wc -l kamctl rpc stats.get_statistics all | grep -e "dialog:active" -e "dialog:early" | tr -d " " | tr -d "\n" ```
I will also enable debug logs on `kamailio2` node (has slightly less traffic than `kamailio1`) maybe that helps too.
Thank you! I'll report back results tomorrow.