From 285225c30fbe23c58361966020da1b9d089cca9e Mon Sep 17 00:00:00 2001 From: jaybeepee Date: Wed, 8 Apr 2015 15:17:04 +0200 Subject: [PATCH] modules/dialog_ng: end dialog on timeout --- modules/dialog_ng/dlg_handlers.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/dialog_ng/dlg_handlers.c b/modules/dialog_ng/dlg_handlers.c index f484830a59c..e680473dd01 100644 --- a/modules/dialog_ng/dlg_handlers.c +++ b/modules/dialog_ng/dlg_handlers.c @@ -1212,7 +1212,7 @@ void dlg_onroute(struct sip_msg* req, str *route_params, void *param) { } if ((event == DLG_EVENT_REQ || event == DLG_EVENT_REQACK) - && new_state == DLG_STATE_CONFIRMED) { + && (new_state == DLG_STATE_CONFIRMED || new_state==DLG_STATE_EARLY)) { timeout = get_dlg_timeout(req); if (timeout != default_timeout) { @@ -1294,9 +1294,8 @@ void dlg_ontimeout(struct dlg_tl *tl) { } } - if ((dlg->dflags & DLG_FLAG_TOBYE) - && (dlg->state == DLG_STATE_CONFIRMED)) { - //TODO: dlg_bye_all(dlg, NULL); + if (dlg->state == DLG_STATE_CONFIRMED) { + dlg_bye_all(dlg, NULL); unref_dlg(dlg, 1); return; }