Browse code

- fixed the cfg. files, added a new sip msg

Andrei Pelinescu-Onciul authored on 25/09/2001 23:09:08
Showing 5 changed files
... ...
@@ -1,14 +1,14 @@
1 1
 # config file for centauri
2 2
 
3 3
 route{
4
- src_ip~="testing" log("packet from fokus\n"); route(1);
4
+ src_ip=~"testing" log("packet from fokus\n"); route(1);
5 5
 /* drop all others */
6 6
 
7 7
 }
8 8
 
9 9
 
10 10
 route[1]{
11
-	(src_ip==192.168.46.0/24 or src_ip~="^dorian") forward("fox.iptel.org");
11
+	(src_ip==192.168.46.0/24 or src_ip=~"^dorian") forward("fox.iptel.org");
12 12
 	src_ip=="centauri.fokus.gmd.de" log("Possible loop, dropping\n"); drop
13 13
 	src_ip==0.0.0.0/0 log("forwarding denied\n"); drop
14 14
 }
15 15
new file mode 100644
... ...
@@ -0,0 +1,23 @@
0
+INVITE sip:p2@iptel.org SIP/2.0
1
+Via: SIP/2.0/UDP 193.175.133.193
2
+From: "GMD FOKUS iptlab" <sip:jiri@iptel.org>;tag=b96b0300ed30f1286-2f5d
3
+To: <sip:p2@iptel.org>
4
+Call-ID: b96b0300-88d30f-66da-63aa@195.37.78.190
5
+CSeq: 101 INVITE
6
+Expires: 180
7
+User-Agent: Cisco-SIP-IP-Phone/2
8
+Accept: application/sdp
9
+Contact: sip:jiri@195.37.78.190:5060
10
+Content-Type: application/sdp
11
+Content-Length: 225
12
+
13
+
14
+v=0
15
+o=CiscoSystemsSIP-IPPhone-UserAgent 14474 8233 IN IP4 195.37.78.190
16
+s=SIP Call
17
+c=IN IP4 195.37.78.190
18
+t=0 0
19
+m=audio 18456 RTP/AVP 0 8 18 101
20
+a=rtpmap:0 pcmu/8000
21
+a=rtpmap:101 telephone-event/8000
22
+a=fmtp:101 0-11 
0 23
\ No newline at end of file
... ...
@@ -2,9 +2,9 @@
2 2
 
3 3
 route{
4 4
 
5
-	(src_ip~='(dorian)|(ekina)|(terix)' & method~='^inv') \
5
+	(src_ip=~'(dorian)|(ekina)|(terix)' & method=~'^inv') \
6 6
 				forward(centauri.fokus.gmd.de);
7
-	src_ip~="^192\.168\.[0-9]{1,3}\.[0-9]{1,3}$"  \
7
+	src_ip=~"^192\.168\.[0-9]{1,3}\.[0-9]{1,3}$"  \
8 8
 				log(1,"msg. from a private network\n"); route(1);
9 9
 	src_ip==0.0.0.0/0   log(1, " droping msg\n"); drop;
10 10
 }
... ...
@@ -16,8 +16,8 @@ route[1]{
16 16
 }
17 17
 
18 18
 route[2]{
19
-	(method~='^ACK' and uri~='.*fokus') forward("fox.iptel.org");
20
-	! method~='^INV' forward(193.175.135.179); /* dorian */
21
-	method~='.' log("spying...\n"); send(dorian,8000); \
19
+	(method=~'^ACK' and uri=~'.*fokus') forward("fox.iptel.org");
20
+	! method=~'^INV' forward(193.175.135.179); /* dorian */
21
+	method=~'.' log("spying...\n"); send(dorian,8000); \
22 22
 						forward("fox.iptel.org");
23 23
 }
24 24
new file mode 100644
... ...
@@ -0,0 +1,29 @@
0
+debug=9          # debug level (cmd line: -dddddddddd)
1
+check_via=1      # (cmd. line: -v)
2
+dns=on           # (cmd. line: -r)
3
+rev_dns=yes      # (cmd. line: -R)
4
+fork=no          # (cmd. line: -D)
5
+log_stderror=yes # (cmd line: -E)
6
+# for more info: sip_router -h
7
+
8
+route{
9
+
10
+	(src_ip=~'(dorian)|(ekina)|(terix)' & method=~'^inv') \
11
+				forward(centauri.fokus.gmd.de);
12
+	src_ip=~"^192\.168\.[0-9]{1,3}\.[0-9]{1,3}$"  \
13
+				log(1,"msg. from a private network\n"); route(1);
14
+	src_ip==0.0.0.0/0   setuserpass("andrei:test"); log(1, " test msg\n"); forward(192.168.46.55);setuser("foo");sethostport("bar.com:6000");forward(192.168.46.69);drop;
15
+}
16
+
17
+route[1]{
18
+	src_ip==192.168.46.61  log("possible loop, dropping\n"); drop;
19
+	(src_ip==192.168.46.0/24) log("routing with rt2\n");route(2); log("we're back\n");
20
+	src_ip==0.0.0.0/0 log(1, "we'll drop this one too\n"); drop;
21
+}
22
+
23
+route[2]{
24
+	(method=~'^ACK' and uri=~'.*fokus') forward("fox.iptel.org");
25
+	! method=~'^INV' forward(193.175.135.179); /* dorian */
26
+	method=~'.' log("spying...\n"); send(dorian,8000); \
27
+						forward("fox.iptel.org");
28
+}
... ...
@@ -17,9 +17,9 @@ dns=true #comment on the same line
17 17
 
18 18
 route{
19 19
 	(method==invite and src_ip==1.2.3.4/32 or (src_ip==4.3.2.1 and src_ip==11.12.13.14/24) ) log("test log\n"); forward("ape");
20
-	( uri~="test\n" &  ! src_ip~="dorian") forward(dorian.fokus.gmd.de);
20
+	( uri=~"test\n" &  ! src_ip=~"dorian") forward(dorian.fokus.gmd.de);
21 21
 
22
-	(src_ip==192.168.0.0/255.255.0.0 or dst_ip==127.0.0.1 and uri~="s$") \
22
+	(src_ip==192.168.0.0/255.255.0.0 or dst_ip==127.0.0.1 and uri=~"s$") \
23 23
 		error("440","not forwarding"); log(2,"droping..."); drop;
24 24
 
25 25
 	src_ip==127.0.0.1 route(3); drop;