Browse code

kamailio.cfg: do sanity check by default

- use sanity module to catch parsing errors early in config
- replaces error_route from kamailio 1.5

Daniel-Constantin Mierla authored on 28/10/2009 22:38:58
Showing 1 changed files
... ...
@@ -126,6 +126,7 @@ loadmodule "textops.so"
126 126
 loadmodule "uri_db.so"
127 127
 loadmodule "siputils.so"
128 128
 loadmodule "xlog.so"
129
+loadmodule "sanity.so"
129 130
 loadmodule "acc.so"
130 131
 /* uncomment next lines for MySQL based authentication support 
131 132
    NOTE: a DB (like db_mysql) module must be also loaded */
... ...
@@ -265,6 +266,12 @@ route{
265 266
 		exit;
266 267
 	}
267 268
 
269
+	if(!sanity_check("1511", "7"))
270
+	{
271
+		xlog("Malformed SIP message from $si:$sp\n");
272
+		exit;
273
+	}
274
+
268 275
 	# NAT detection
269 276
 	route(NAT);
270 277