diff --git a/kamailio/presence-role.cfg b/kamailio/presence-role.cfg index be4a015..01c0f79 100644 --- a/kamailio/presence-role.cfg +++ b/kamailio/presence-role.cfg @@ -48,6 +48,20 @@ route[HANDLE_SUBSCRIBE] exit; } + if ($tU == $null) { + xlog("L_INFO", "$ci|stop|ignoring subscribe with empty TO username from a $ua"); + sl_send_reply(400, "Missing TO username"); + t_release(); + exit; + } + + if ($fU == $null) { + xlog("L_INFO", "$ci|stop|ignoring subscribe with empty FROM username from a $ua"); + sl_send_reply(400, "Missing FROM username"); + t_release(); + exit; + } + handle_subscribe(); ##RabbitMQ