Browse code

*** empty log message ***

Andrei Pelinescu-Onciul authored on 24/10/2001 19:20:49
Showing 3 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,53 @@
1
+debug=9          # debug level (cmd line: -dddddddddd)
2
+check_via=1      # (cmd. line: -v)
3
+dns=on           # (cmd. line: -r)
4
+rev_dns=yes      # (cmd. line: -R)
5
+fork=no          # (cmd. line: -D)
6
+log_stderror=yes # (cmd line: -E)
7
+# for more info: sip_router -h
8
+
9
+route{
10
+
11
+	if false and forward("mobile69") { log("forwarded ok\n"); break; }
12
+	else log("error forwarding\n");
13
+	
14
+	if false log("if\n")
15
+	else log("else\n");
16
+	
17
+	if { log("test\n"); break; log("test2\n"); } log ("if {}");
18
+	
19
+	if (src_ip=~'(dorian)|(ekina)|(terix)' & method=~'^inv')
20
+				forward(centauri.fokus.gmd.de);
21
+	if src_ip=~"^192\.168\.[0-9]{1,3}\.[0-9]{1,3}$" {
22
+			log(1,"msg. from a private network\n");
23
+			route(1);
24
+			log(1, "after route(1)\n");
25
+			break;
26
+	};
27
+	if src_ip==0.0.0.0/0 {
28
+		setuserpass("andrei:test");
29
+		log(1, " test msg\n"); forward(192.168.46.55);
30
+		setuser("foo");sethostport("bar.com:6000");
31
+		forward(192.168.46.69);drop;
32
+	};
33
+	log("default route[0]\n");
34
+}
35
+
36
+route[1]{
37
+	if src_ip==192.168.46.61 { log("possible loop, dropping\n"); drop; };
38
+	if (src_ip==192.168.46.0/24) { 
39
+			log("routing with rt2\n");route(2); log("we're back\n");
40
+			break;
41
+	};
42
+	if src_ip==0.0.0.0/0 { log(1, "we'll drop this one too\n"); drop; };
43
+	log("default route[1]\n");
44
+}
45
+
46
+route[2]{
47
+	if (method=~'^ACK' and uri=~'.*fokus') forward("fox.iptel.org");
48
+	if ! method=~'^INV' forward(193.175.135.179); /* dorian */
49
+	if method=~'.' { log("spying...\n"); send(dorian,8000);/* raw sip packet */
50
+						forward("fox.iptel.org");
51
+					};
52
+	log("default route[2]\n");
53
+}
0 54
deleted file mode 100644
... ...
@@ -1,20 +0,0 @@
1
-# $Id$
2
-
3
-# format:
4
-#  method_re   sip_uri_re      dest_host
5
-# (warning: re cannot contain space)
6
-
7
-<<<<<<< sip_router.cfg
8
-.			.				  centauri 
9
-=======
10
-#.			.				   centauri
11
-.*			.*				   mobile50 
12
-.			.				   fox.iptel.org
13
->>>>>>> 1.6
14
-^R.*        ^sip:.*@dorian.*   ekina.fokus.gmd.de        
15
-#^INVITE     .*                 ape:5061             # my laptop
16
-.           .                  192.168.46.55
17
-.*			.*andrei		   helios.fokus.gmd.de
18
-
19
-
20
-# end
21 0
new file mode 100644
... ...
@@ -0,0 +1,16 @@
1
+debug=9          # debug level (cmd line: -dddddddddd)
2
+check_via=yes     # (cmd. line: -v)
3
+dns=on           # (cmd. line: -r)
4
+rev_dns=yes      # (cmd. line: -R)
5
+fork=no          # (cmd. line: -D)
6
+log_stderror=yes # (cmd line: -E)
7
+# for more info: sip_router -h
8
+
9
+#modules
10
+loadmodule "modules/print/print.so"
11
+
12
+route{
13
+	print("before forward");
14
+	forward(127.0.0.1,5061);
15
+	print("after forward");
16
+}