Browse Source

modules/dialog_ng: end dialog on timeout

jaybeepee 10 years ago
parent
commit
285225c30f
1 changed files with 3 additions and 4 deletions
  1. 3 4
      modules/dialog_ng/dlg_handlers.c

+ 3 - 4
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;
     }