Browse code

dialog: ignore 408 on keepalive with cseq 0

- some UAs do not reply at all

Daniel-Constantin Mierla authored on 06/05/2021 10:27:05
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++;