瀏覽代碼

etc/kamailio.cfg: small polishings

- drop silently traffic from scanners
- removed fork=yes (it is default value)
Daniel-Constantin Mierla 9 年之前
父節點
當前提交
8eb9f9278c
共有 1 個文件被更改,包括 13 次插入13 次删除
  1. 13 13
      etc/kamailio.cfg

+ 13 - 13
etc/kamailio.cfg

@@ -1,6 +1,6 @@
 #!KAMAILIO
 #
-# Kamailio (OpenSER) SIP Server v4.3 - default configuration script
+# Kamailio (OpenSER) SIP Server v4.4 - default configuration script
 #     - web: http://www.kamailio.org
 #     - git: http://sip-router.org
 #
@@ -11,10 +11,10 @@
 #
 # Several features can be enabled using '#!define WITH_FEATURE' directives:
 #
-# *** To run in debug mode: 
+# *** To run in debug mode:
 #     - define WITH_DEBUG
 #
-# *** To enable mysql: 
+# *** To enable mysql:
 #     - define WITH_MYSQL
 #
 # *** To enable authentication execute:
@@ -147,8 +147,8 @@ memlog=5
 
 log_facility=LOG_LOCAL0
 
-fork=yes
-children=4
+# number of SIP routing processes
+children=8
 
 /* uncomment the next line to disable TCP (default on) */
 #disable_tcp=yes
@@ -160,13 +160,12 @@ children=4
 /* add local domain aliases */
 #alias="sip.mydomain.com"
 
-/* uncomment and configure the following line if you want Kamailio to 
+/* uncomment and configure the following line if you want Kamailio to
    bind on a specific interface/port/proto (default bind on all available) */
 #listen=udp:10.0.0.10:5060
 
-/* port to listen to
- * - can be specified more than once if needed to listen on many ports */
-port=5060
+/* port to listen to */
+#port=5060
 
 #!ifdef WITH_TLS
 enable_tls=yes
@@ -333,7 +332,7 @@ modparam("acc", "detect_direction", 0)
 /* account triggers (flags) */
 modparam("acc", "log_flag", FLT_ACC)
 modparam("acc", "log_missed_flag", FLT_ACCMISSED)
-modparam("acc", "log_extra", 
+modparam("acc", "log_extra",
 	"src_user=$fU;src_domain=$fd;src_ip=$si;"
 	"dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")
 modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)
@@ -561,8 +560,9 @@ route[REQINIT] {
 			exit;
 		}
 	}
-	if($ua =~ "friendly-scanner") {
-		sl_send_reply("200", "OK");
+	if($ua =~ "friendly-scanner|sipcli") {
+		# silent drop for scanners - uncomment next line if want to reply
+		# sl_send_reply("200", "OK");
 		exit;
 	}
 #!endif
@@ -712,7 +712,7 @@ route[PRESENCE] {
 	}
 	exit;
 #!endif
-	
+
 	# if presence enabled, this part will not be executed
 	if (is_method("PUBLISH") || $rU==$null) {
 		sl_send_reply("404", "Not here");