From 7bc7a0cba5ebc530dbd52df7647b2736db93f3b3 Mon Sep 17 00:00:00 2001 From: lazedo Date: Thu, 29 Oct 2015 14:49:51 +0000 Subject: [PATCH] message role fixes --- kamailio/default.cfg | 7 ++++++- kamailio/message-role.cfg | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/kamailio/default.cfg b/kamailio/default.cfg index 5fe1a8b..fffafa1 100644 --- a/kamailio/default.cfg +++ b/kamailio/default.cfg @@ -434,7 +434,6 @@ route[HANDLE_MESSAGE] #!ifdef MESSAGE-ROLE if (is_method("MESSAGE")) { xlog("L_INFO", "$ci|MESSAGE from $fu to $tu"); - t_on_reply("MESSAGE_REPLY"); if (isflagset(FLAG_INTERNALLY_SOURCED) || src_ip == myself) { xlog("L_INFO", "$ci| routing MESSAGE to external from $fu to $tu"); if (registered("location")) { @@ -653,6 +652,12 @@ onreply_route[EXTERNAL_REPLY] setflag(FLAG_IS_REPLY); route(DOS_PREVENTION); #!endif + + #!ifdef MESSAGE-ROLE + if (is_method("MESSAGE")) { + route(MESSAGE_REPLY); + } + #!endif } onreply_route[INTERNAL_REPLY] diff --git a/kamailio/message-role.cfg b/kamailio/message-role.cfg index ebf8855..d6ba301 100644 --- a/kamailio/message-role.cfg +++ b/kamailio/message-role.cfg @@ -27,7 +27,7 @@ event_route[kazoo:consumer-event-message-route] uac_req_send(); } -onreply_route[MESSAGE_REPLY] +route[MESSAGE_REPLY] { if( $(sht(msg=>$ci)) == $null) { exit();