Browse code

bidirectional

Jiri Kuthan authored on 11/01/2002 04:31:24
Showing 1 changed files
... ...
@@ -4,7 +4,7 @@
4 4
 # $ID: $
5 5
 #
6 6
 
7
-debug=1          # debug level (cmd line: -dddddddddd)
7
+debug=9          # debug level (cmd line: -dddddddddd)
8 8
 fork=yes          # (cmd. line: -D)
9 9
 #fork=no
10 10
 log_stderror=yes # (cmd line: -E)
... ...
@@ -17,7 +17,7 @@ dns=on           # (cmd. line: -r)
17 17
 rev_dns=yes      # (cmd. line: -R)
18 18
 port=5080
19 19
 #listen=127.0.0.1
20
-listen=192.168.99.100
20
+listen=195.37.77.101
21 21
 loop_checks=1
22 22
 # for more info: sip_router -h
23 23
 
... ...
@@ -25,12 +25,13 @@ loop_checks=1
25 25
 loadmodule "modules/print/print.so"
26 26
 #loadmodule "modules/tm/tm.so"
27 27
 
28
-route[0]{
29
-			forward("bat.iptel.org", 5090);
30
-			break;
31
-}
28
+#route[0]{
29
+#	if (method=="BYE") { forward("bat.iptel.org", 5000); }
30
+#	else forward("bat.iptel.org", 5090);
31
+#	break;
32
+#}
32 33
 
33
-route[1]{
34
+route[0]{
34 35
 	log("SER: new request reveived\n");
35 36
 	if ( t_lookup_request()) {
36 37
 		if ( method=="ACK" )	{
... ...
@@ -78,9 +79,15 @@ route[1]{
78 79
 					log("SER: ERROR: t_send_reply (100)\n");
79 80
 				} else log("SER: t_send_reply ok\n");
80 81
 			};
81
-			if (! t_forward("bat.iptel.org", "5090")){
82
-				log("SER:ERROR: t_forward (..., 5555)\n");
83
-			} else log("SER: t_forward ok\n");
82
+			if (method=="INVITE") {
83
+				if (! t_forward("bat.iptel.org", "5090")){
84
+					log("SER:ERROR: t_forward (..., 5555)\n");
85
+				} else log("SER: t_forward ok\n");
86
+			} else if (method=="BYE") {
87
+				if (! t_forward("bat.iptel.org", "5090")){
88
+					log("SER:ERROR: t_forward (..., 5555)\n");
89
+				} else log("SER: t_forward ok\n");
90
+			} else log("SER: ERROR unknwon request\n");
84 91
 			t_unref();
85 92
 		};
86 93
 	};