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();