Module: kamailio
Branch: master
Commit: 76b7beef6d089272b749aa53f29e100711aa4c50
URL:
https://github.com/kamailio/kamailio/commit/76b7beef6d089272b749aa53f29e100…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-01-24T10:31:07+01:00
sl: do not send error reply if message marked with delayed-reply flag
---
Modified: src/modules/sl/sl.c
Modified: src/modules/sl/sl_funcs.c
---
Diff:
https://github.com/kamailio/kamailio/commit/76b7beef6d089272b749aa53f29e100…
Patch:
https://github.com/kamailio/kamailio/commit/76b7beef6d089272b749aa53f29e100…
---
diff --git a/src/modules/sl/sl.c b/src/modules/sl/sl.c
index 83eb8bac0d3..ef0f0b56f3d 100644
--- a/src/modules/sl/sl.c
+++ b/src/modules/sl/sl.c
@@ -340,6 +340,10 @@ static int ki_send_reply_error(sip_msg_t *msg)
LM_INFO("message marked with final-reply flag\n");
return -2;
}
+ if(msg->msg_flags & FL_DELAYED_REPLY) {
+ LM_INFO("message marked with delayed-reply flag\n");
+ return -3;
+ }
if(sl_bind_tm != 0 && tmb.t_reply_error != NULL) {
ret = tmb.t_reply_error(msg);
diff --git a/src/modules/sl/sl_funcs.c b/src/modules/sl/sl_funcs.c
index 29ef6835e22..5f9ac40991f 100644
--- a/src/modules/sl/sl_funcs.c
+++ b/src/modules/sl/sl_funcs.c
@@ -416,6 +416,10 @@ int sl_reply_error(struct sip_msg *msg)
LM_INFO("message marked with final-reply flag\n");
return -2;
}
+ if(msg->msg_flags & FL_DELAYED_REPLY) {
+ LM_INFO("message marked with delayed-reply flag\n");
+ return -3;
+ }
ret = err2reason_phrase(
prev_ser_error, &sip_error, err_buf, sizeof(err_buf), "SL");