Module: kamailio
Branch: master
Commit: 313265ace229ed5d6ebd75ff6eff959e78820880
URL:
https://github.com/kamailio/kamailio/commit/313265ace229ed5d6ebd75ff6eff959…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-11-10T09:27:16+01:00
dialog: use a variable for timeout of dialogs in end state
---
Modified: src/modules/dialog/dialog.c
Modified: src/modules/dialog/dlg_hash.c
---
Diff:
https://github.com/kamailio/kamailio/commit/313265ace229ed5d6ebd75ff6eff959…
Patch:
https://github.com/kamailio/kamailio/commit/313265ace229ed5d6ebd75ff6eff959…
---
diff --git a/src/modules/dialog/dialog.c b/src/modules/dialog/dialog.c
index c65e95b9f2..3fc51f9b9f 100644
--- a/src/modules/dialog/dialog.c
+++ b/src/modules/dialog/dialog.c
@@ -109,6 +109,7 @@ static int _dlg_track_cseq_updates = 0;
int dlg_ka_failed_limit = 1;
int dlg_early_timeout = 300;
int dlg_noack_timeout = 60;
+int dlg_end_timeout = 300;
int dlg_enable_dmq = 0;
@@ -309,6 +310,7 @@ static param_export_t mod_params[]={
{ "event_callback", PARAM_STR, &dlg_event_callback },
{ "early_timeout", PARAM_INT, &dlg_early_timeout },
{ "noack_timeout", PARAM_INT, &dlg_noack_timeout },
+ { "end_timeout", PARAM_INT, &dlg_end_timeout },
{ 0,0,0 }
};
diff --git a/src/modules/dialog/dlg_hash.c b/src/modules/dialog/dlg_hash.c
index 1f108f0f8a..df25d933cf 100644
--- a/src/modules/dialog/dlg_hash.c
+++ b/src/modules/dialog/dlg_hash.c
@@ -50,6 +50,7 @@ extern int dlg_enable_dmq;
extern int dlg_early_timeout;
extern int dlg_noack_timeout;
+extern int dlg_end_timeout;
/*! global dialog table */
struct dlg_table *d_table = 0;
@@ -249,7 +250,7 @@ int dlg_clean_run(ticks_t ti)
tdlg->dflags |= DLG_FLAG_CHANGED;
}
if(tdlg->state==DLG_STATE_DELETED && tdlg->end_ts>0
- && tdlg->end_ts<tm-300) {
+ && tdlg->end_ts<tm-dlg_end_timeout) {
/* dialog in deleted state older than 5min */
LM_NOTICE("dialog in delete state is too old (%p ref %d)\n",
tdlg, tdlg->ref);