From f1d63bebf6e542ae57817bbc5e5653672cc5d8f1 Mon Sep 17 00:00:00 2001 From: Sergey Safarov Date: Thu, 31 Jan 2019 10:59:23 +0300 Subject: [PATCH] Added "portsip.com" scanners block by SDP line --- kamailio/default.cfg | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/kamailio/default.cfg b/kamailio/default.cfg index bf51561..31eb2a7 100644 --- a/kamailio/default.cfg +++ b/kamailio/default.cfg @@ -290,6 +290,9 @@ loadmodule "debugger.so" modparam("debugger", "mod_hash_size", 5) modparam("debugger", "mod_level_mode", 1) +####### SDPOPS ###### +loadmodule "sdpops.so" + ####### Routing Logic ######## route { @@ -408,6 +411,13 @@ route[SANITY_CHECK] xlog("L_WARN", "$ci|end|dropping message with user-agent $ua from $si:$sp\n"); exit; } + + if(sdp_get_line_startswith("$avp(sanity_sline)", "s=")) { + if ($avp(sanity_sline) == "s=portsip.com") { + xlog("L_WARN", "$ci|end|dropping message with '$avp(sanity_sline)' string in SDP\n"); + exit; + } + } } route[CLASSIFY_SOURCE]