Module: kamailio
Branch: 5.3
Commit: 7b90c4e610b3d07b40b3eb883623981294732652
URL:
https://github.com/kamailio/kamailio/commit/7b90c4e610b3d07b40b3eb883623981…
Author: Stefan Mititelu <stefan.mititelu92(a)gmail.com>
Committer: Stefan Mititelu <stefan.mititelu92(a)gmail.com>
Date: 2020-03-11T10:06:25+02:00
dialog: update event route statistics
If dialog was deleted while running the event route, update statistics
for early and active dialogs.
(cherry picked from commit c6faf3af06129f636f86f9919f0b9db84ca0dab6)
---
Modified: src/modules/dialog/dlg_handlers.c
---
Diff:
https://github.com/kamailio/kamailio/commit/7b90c4e610b3d07b40b3eb883623981…
Patch:
https://github.com/kamailio/kamailio/commit/7b90c4e610b3d07b40b3eb883623981…
---
diff --git a/src/modules/dialog/dlg_handlers.c b/src/modules/dialog/dlg_handlers.c
index 71f29e24fc..48899e3215 100644
--- a/src/modules/dialog/dlg_handlers.c
+++ b/src/modules/dialog/dlg_handlers.c
@@ -1810,6 +1810,16 @@ int dlg_run_event_route(dlg_cell_t *dlg, sip_msg_t *msg, int
ostate, int nstate)
if (dlg0==0) {
LM_ALERT("after event route - dialog not found [%u:%u] (%d/%d) (%p)
(%.*s)\n",
h_entry, h_id, ostate, nstate, dlg, evname.len, evname.s);
+ if (nstate == DLG_STATE_DELETED) {
+ if (ostate == DLG_STATE_UNCONFIRMED) {
+ if_update_stat(dlg_enable_stats, failed_dlgs, 1);
+ } else if (ostate == DLG_STATE_EARLY) {
+ if_update_stat(dlg_enable_stats, early_dlgs, -1);
+ if_update_stat(dlg_enable_stats, failed_dlgs, 1);
+ } else if (ostate != DLG_STATE_DELETED) {
+ if_update_stat(dlg_enable_stats, active_dlgs, -1);
+ }
+ }
return -1;
} else {
dlg_release(dlg0);