Browse code

dialog: ignore 408 on keepalive with cseq 0

- some UAs do not reply at all

(cherry picked from commit 7aa8056a5e3a9804133cb9ff79640d8116be63da)
(cherry picked from commit 6d71c9399027f2ed41cd6eae576d862440bd4fd4)
(cherry picked from commit 1b517a7e560f20331aa94accca813825e0e0ff0b)

Daniel-Constantin Mierla authored on 06/05/2021 10:27:05 • Henning Westerholt committed on 22/10/2021 11:54:40
Showing 1 changed files
... ...
@@ -271,6 +271,12 @@ void dlg_ka_cb_all(struct cell* t, int type, struct tmcb_params* ps, int dir)
271 271
 			LM_DBG("skip updating non-confirmed dialogs\n");
272 272
 			goto done;
273 273
 		}
274
+		if(ps->code==408 && (dlg->cseq[dir].len==0
275
+					|| (dlg->cseq[dir].len==1 && dlg->cseq[dir].s[0]=='\0'))) {
276
+			LM_DBG("ignore 408 for %s cseq 0\n",
277
+					((dir==DLG_CALLER_LEG)?"caller":"callee"));
278
+			goto done;
279
+		}
274 280
 		tend = 0;
275 281
 		if(dir==DLG_CALLER_LEG) {
276 282
 			dlg->ka_src_counter++;