diff --git a/src/modules/sl/sl.c b/src/modules/sl/sl.c index c523e8913b2..4d17130a133 100644 --- a/src/modules/sl/sl.c +++ b/src/modules/sl/sl.c @@ -250,6 +250,11 @@ int send_reply(struct sip_msg *msg, int code, str *reason) struct cell *t; int ret = 1; + if(msg->msg_flags & FL_MSG_NOREPLY) { + LM_INFO("message marked with no-reply flag\n"); + return -2; + } + if(reason->s[reason->len-1]=='\0') { r = reason->s; } else { diff --git a/src/modules/sl/sl_funcs.c b/src/modules/sl/sl_funcs.c index dbc5105d2c2..1e408e653f1 100644 --- a/src/modules/sl/sl_funcs.c +++ b/src/modules/sl/sl_funcs.c @@ -133,6 +133,11 @@ int sl_reply_helper(struct sip_msg *msg, int code, char *reason, str *tag) if (msg->first_line.u.request.method_value==METHOD_ACK) goto error; + if(msg->msg_flags & FL_MSG_NOREPLY) { + LM_INFO("message marked with no-reply flag\n"); + return -2; + } + init_dest_info(&dst); if (reply_to_via) { if (update_sock_struct_from_via(&dst.to, msg, msg->via1 )==-1) @@ -355,6 +360,11 @@ int sl_reply_error(struct sip_msg *msg ) int sip_error; int ret; + if(msg->msg_flags & FL_MSG_NOREPLY) { + LM_INFO("message marked with no-reply flag\n"); + return -2; + } + ret=err2reason_phrase( prev_ser_error, &sip_error, err_buf, sizeof(err_buf), "SL"); if (ret>0) {