Module: kamailio
Branch: 6.1
Commit: f7c10b35c9aa990188d18316c7f9c5df7ec1c89f
URL: 
https://github.com/kamailio/kamailio/commit/f7c10b35c9aa990188d18316c7f9c5df7ec1c89f

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2026-05-26T12:31:14+02:00

core: execute event_route[core:receive-parse-error] on receive for parsing 
madatory headers failure

- stop processing of the message if drop is used

(cherry picked from commit 8888108e75a0f245636dd511e657de9e2957c2d7)

---

Modified: src/core/receive.c

---

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

---

diff --git a/src/core/receive.c b/src/core/receive.c
index 0da62423851..d273880b7fa 100644
--- a/src/core/receive.c
+++ b/src/core/receive.c
@@ -397,6 +397,9 @@ int receive_msg(char *buf, unsigned int len, receive_info_t 
*rcv_info)
                                < 0)) {
                LOG(cfg_get(core, core_cfg, sip_parser_log),
                                "parsing relevant headers failed\n");
+               if(sr_core_ert_run(msg, SR_CORE_ERT_RECEIVE_PARSE_ERROR) < 0) {
+                       goto error02;
+               }
        }
        LM_DBG("--- received sip message - %s - call-id: [%.*s] - cseq: 
[%.*s]\n",
                        (msg->first_line.type == SIP_REQUEST) ? "request" : 
"reply",

_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to