Discussion:
[sr-dev] git:5.4:1b517a7e: dialog: ignore 408 on keepalive with cseq 0
Daniel-Constantin Mierla
2021-05-26 06:30:59 UTC
Permalink
Content preview: Module: kamailio Branch: 5.4 Commit: 1b517a7e560f20331aa94accca813825e0e0ff0b
URL: https://github.com/kamailio/kamailio/commit/1b517a7e560f20331aa94accca813825e0e0ff0b
Author: Daniel-Constantin Mierla <***@gmail.com> Committer: Daniel-Constantin
Mierla <***@gmail.com> Date: 2021-05-26T08:28:19+02:00

Content analysis details: (-2.4 points, 5.5 required)

pts rule name description
---- ---------------------- --------------------------------------------------
-1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
mail domains are different
1.0 FORGED_GMAIL_RCVD 'From' gmail.com does not match 'Received'
headers
0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is
CUSTOM_MED
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
provider (miconda[at]gmail.com)
0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and
EnvelopeFrom freemail headers are
different
-1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list
manager

Module: kamailio
Branch: 5.4
Commit: 1b517a7e560f20331aa94accca813825e0e0ff0b
URL: https://github.com/kamailio/kamailio/commit/1b517a7e560f20331aa94accca813825e0e0ff0b

Author: Daniel-Constantin Mierla <***@gmail.com>
Committer: Daniel-Constantin Mierla <***@gmail.com>
Date: 2021-05-26T08:28:19+02:00

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)

---

Modified: src/modules/dialog/dlg_req_within.c

---

Diff: https://github.com/kamailio/kamailio/commit/1b517a7e560f20331aa94accca813825e0e0ff0b.diff
Patch: https://github.com/kamailio/kamailio/commit/1b517a7e560f20331aa94accca813825e0e0ff0b.patch

---

diff --git a/src/modules/dialog/dlg_req_within.c b/src/modules/dialog/dlg_req_within.c
index d48d139965..809834527f 100644
--- a/src/modules/dialog/dlg_req_within.c
+++ b/src/modules/dialog/dlg_req_within.c
@@ -271,6 +271,12 @@ void dlg_ka_cb_all(struct cell* t, int type, struct tmcb_params* ps, int dir)
LM_DBG("skip updating non-confirmed dialogs\n");
goto done;
}
+ if(ps->code==408 && (dlg->cseq[dir].len==0
+ || (dlg->cseq[dir].len==1 && dlg->cseq[dir].s[0]=='\0'))) {
+ LM_DBG("ignore 408 for %s cseq 0\n",
+ ((dir==DLG_CALLER_LEG)?"caller":"callee"));
+ goto done;
+ }
tend = 0;
if(dir==DLG_CALLER_LEG) {
dlg->ka_src_counter++;

Loading...