Module: kamailio
Branch: 5.2
Commit: fa170b9a40c79539ce1818918298099f5dd88724
URL:
https://github.com/kamailio/kamailio/commit/fa170b9a40c79539ce1818918298099…
Author: Stefan Mititelu <stefan.mititelu92(a)gmail.com>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2020-03-11T09:13:39+01: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/fa170b9a40c79539ce1818918298099…
Patch:
https://github.com/kamailio/kamailio/commit/fa170b9a40c79539ce1818918298099…
---
diff --git a/src/modules/dialog/dlg_handlers.c b/src/modules/dialog/dlg_handlers.c
index ef36db8976..5a1299c47b 100644
--- a/src/modules/dialog/dlg_handlers.c
+++ b/src/modules/dialog/dlg_handlers.c
@@ -1789,6 +1789,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);