Module: kamailio
Branch: master
Commit: c6faf3af06129f636f86f9919f0b9db84ca0dab6
URL:
https://github.com/kamailio/kamailio/commit/c6faf3af06129f636f86f9919f0b9db…
Author: Stefan Mititelu <stefan.mititelu92(a)gmail.com>
Committer: Stefan Mititelu <stefan.mititelu(a)enea.com>
Date: 2020-03-11T10:01:27+02:00
dialog: update event route statistics
If dialog was deleted while running the event route, update statistics
for early and active dialogs.
---
Modified: src/modules/dialog/dlg_handlers.c
---
Diff:
https://github.com/kamailio/kamailio/commit/c6faf3af06129f636f86f9919f0b9db…
Patch:
https://github.com/kamailio/kamailio/commit/c6faf3af06129f636f86f9919f0b9db…
---
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);