Module: sip-router
Branch: 4.1
Commit: 6125176d04c75d3a3f0b57119696eca2f63c3645
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6125176…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Nov 21 19:09:43 2013 +0100
sl: allow send_reply() in the route block types supported by t_reply() and
sl_send_reply()
- reported by Juha Heinanen, FS#362
(cherry picked from commit c77aaf38eafe1d3549d266feebf76ac0b50738ea)
---
modules/sl/sl.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/modules/sl/sl.c b/modules/sl/sl.c
index ab5e737..fb8a1ee 100644
--- a/modules/sl/sl.c
+++ b/modules/sl/sl.c
@@ -99,7 +99,7 @@ static cmd_export_t cmds[]={
{"sl_reply", w_sl_send_reply, 2, fixup_sl_reply,
REQUEST_ROUTE},
{"send_reply", w_send_reply, 2, fixup_sl_reply,
- REQUEST_ROUTE|BRANCH_ROUTE|FAILURE_ROUTE},
+ REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE},
{"sl_reply_error", w_sl_reply_error, 0, 0,
REQUEST_ROUTE},
{"sl_forward_reply", w_sl_forward_reply0, 0, 0,
@@ -282,6 +282,9 @@ int send_reply(struct sip_msg *msg, int code, str *reason)
}
}
+ if(msg->first_line.type==SIP_REPLY)
+ goto error;
+
LM_DBG("reply in stateless mode (sl)\n");
ret = sl_send_reply(msg, code, r);