Module: kamailio
Branch: master
Commit: 8888108e75a0f245636dd511e657de9e2957c2d7
URL: 
https://github.com/kamailio/kamailio/commit/8888108e75a0f245636dd511e657de9e2957c2d7

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2026-05-19T11:54:41+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

---

Modified: src/core/receive.c

---

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

---

diff --git a/src/core/receive.c b/src/core/receive.c
index 18013900c74..25125dfccad 100644
--- a/src/core/receive.c
+++ b/src/core/receive.c
@@ -405,6 +405,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