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 @@
1
+INVITE sip:p2@iptel.org SIP/2.0
2
+Via: SIP/2.0/UDP 193.175.133.193
3
+From: "GMD FOKUS iptlab" <sip:jiri@iptel.org>;tag=b96b0300ed30f1286-2f5d
4
+To: <sip:p2@iptel.org>
5
+Call-ID: b96b0300-88d30f-66da-63aa@195.37.78.190
6
+CSeq: 101 INVITE
7
+Expires: 180
8
+User-Agent: Cisco-SIP-IP-Phone/2
9
+Accept: application/sdp
10
+Contact: sip:jiri@195.37.78.190:5060
11
+Content-Type: application/sdp
12
+Content-Length: 225
13
+
14
+
15
+v=0
16
+o=CiscoSystemsSIP-IPPhone-UserAgent 14474 8233 IN IP4 195.37.78.190
17
+s=SIP Call
18
+c=IN IP4 195.37.78.190
19
+t=0 0
20
+m=audio 18456 RTP/AVP 0 8 18 101
21
+a=rtpmap:0 pcmu/8000
22
+a=rtpmap:101 telephone-event/8000
23
+a=fmtp:101 0-11 
0 24
\ 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 @@
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
+	(src_ip=~'(dorian)|(ekina)|(terix)' & method=~'^inv') \
12
+				forward(centauri.fokus.gmd.de);
13
+	src_ip=~"^192\.168\.[0-9]{1,3}\.[0-9]{1,3}$"  \
14
+				log(1,"msg. from a private network\n"); route(1);
15
+	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;
16
+}
17
+
18
+route[1]{
19
+	src_ip==192.168.46.61  log("possible loop, dropping\n"); drop;
20
+	(src_ip==192.168.46.0/24) log("routing with rt2\n");route(2); log("we're back\n");
21
+	src_ip==0.0.0.0/0 log(1, "we'll drop this one too\n"); drop;
22
+}
23
+
24
+route[2]{
25
+	(method=~'^ACK' and uri=~'.*fokus') forward("fox.iptel.org");
26
+	! method=~'^INV' forward(193.175.135.179); /* dorian */
27
+	method=~'.' log("spying...\n"); send(dorian,8000); \
28
+						forward("fox.iptel.org");
29
+}
... ...
@@ -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;