Browse code

- updated to msg:len > max_len (which is a nop btw., msg:len cannot ever be > max_len since max_len==BUF_SIZE = receive buf.)

Andrei Pelinescu-Onciul authored on 10/11/2003 15:35:15
Showing 1 changed files
... ...
@@ -6,11 +6,12 @@
6 6
 
7 7
 # ----------- global configuration parameters ------------------------
8 8
 
9
-debug=3         # debug level (cmd line: -dddddddddd)
10
-fork=yes
11
-log_stderror=no	# (cmd line: -E)
9
+#debug=3         # debug level (cmd line: -dddddddddd)
10
+#fork=yes
11
+#log_stderror=no	# (cmd line: -E)
12 12
 
13 13
 /* Uncomment these lines to enter debugging mode 
14
+debug=7
14 15
 fork=no
15 16
 log_stderror=yes
16 17
 */
... ...
@@ -18,8 +19,8 @@ log_stderror=yes
18 19
 check_via=no	# (cmd. line: -v)
19 20
 dns=no           # (cmd. line: -r)
20 21
 rev_dns=no      # (cmd. line: -R)
21
-port=5060
22
-children=4
22
+#port=5060
23
+#children=4
23 24
 fifo="/tmp/ser_fifo"
24 25
 
25 26
 # ------------------ module loading ----------------------------------
... ...
@@ -33,7 +34,6 @@ loadmodule "/usr/local/lib/ser/modules/rr.so"
33 34
 loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
34 35
 loadmodule "/usr/local/lib/ser/modules/usrloc.so"
35 36
 loadmodule "/usr/local/lib/ser/modules/registrar.so"
36
-loadmodule "/usr/local/lib/ser/modules/textops.so"
37 37
 
38 38
 # Uncomment this if you want digest authentication
39 39
 # mysql.so must be loaded !
... ...
@@ -76,7 +76,7 @@ route{
76 76
 		sl_send_reply("483","Too Many Hops");
77 77
 		break;
78 78
 	};
79
-	if (msg:len >=  max_len ) {
79
+	if ( msg:len > max_len ) {
80 80
 		sl_send_reply("513", "Message too big");
81 81
 		break;
82 82
 	};
... ...
@@ -85,21 +85,10 @@ route{
85 85
 	# subsequent messages will go through our proxy; that's
86 86
 	# particularly good if upstream and downstream entities
87 87
 	# use different transport protocol
88
-	if (!method=="REGISTER") record_route();	
89
-
90
-	# subsequent messages withing a dialog should take the
91
-	# path determined by record-routing
88
+	record_route();	
89
+	# loose-route processing
92 90
 	if (loose_route()) {
93
-		# mark routing logic in request
94
-		append_hf("P-hint: rr-enforced\r\n"); 
95
-		route(1);
96
-		break;
97
-	};
98
-
99
-	if (!uri==myself) {
100
-		# mark routing logic in request
101
-		append_hf("P-hint: outbound\r\n"); 
102
-		route(1);
91
+		t_relay();
103 92
 		break;
104 93
 	};
105 94
 
... ...
@@ -120,29 +109,17 @@ route{
120 109
 			break;
121 110
 		};
122 111
 
123
-		lookup("aliases");
124
-		if (!uri==myself) {
125
-			append_hf("P-hint: outbound alias\r\n"); 
126
-			route(1);
127
-			break;
128
-		};
129
-
130 112
 		# native SIP destinations are handled using our USRLOC DB
131 113
 		if (!lookup("location")) {
132 114
 			sl_send_reply("404", "Not Found");
133 115
 			break;
134 116
 		};
135 117
 	};
136
-	append_hf("P-hint: usrloc applied\r\n"); 
137
-	route(1);
138
-}
139
-
140
-route[1] 
141
-{
142
-	# send it out now; use stateful forwarding as it works reliably
143
-	# even for UDP2TCP
118
+	# forward to current uri now; use stateful forwarding; that
119
+	# works reliably even if we forward from TCP to UDP
144 120
 	if (!t_relay()) {
145 121
 		sl_reply_error();
146 122
 	};
123
+
147 124
 }
148 125