Преглед изворни кода

dialog: if ACK for 200ok is not coming in 60sec, dialog lifetime is shortened for 10 more sec

- should handle the situation when caller cancels the call but the
  callee answered before getting the cancel
- reported by Alex Balashov
Daniel-Constantin Mierla пре 11 година
родитељ
комит
ca3da467f5
1 измењених фајлова са 7 додато и 0 уклоњено
  1. 7 0
      modules/dialog/dlg_hash.c

+ 7 - 0
modules/dialog/dlg_hash.c

@@ -249,6 +249,13 @@ int dlg_clean_run(ticks_t ti)
 				unlink_unsafe_dlg(&d_table->entries[i], tdlg);
 				destroy_dlg(tdlg);
 			}
+			if(tdlg->state==DLG_STATE_CONFIRMED_NA && tdlg->start_ts<tm-60) {
+				if(update_dlg_timer(&dlg->tl, 10)<0) {
+					LM_ERR("failed to update dialog lifetime in long non-ack state\n");
+				}
+				dlg->lifetime = 10;
+				dlg->dflags |= DLG_FLAG_CHANGED;
+			}
 		}
 		lock_set_release(d_table->locks, d_table->entries[i].lock_idx);
 	}