Browse code

- replace sl_send_reply with sl_reply

Jan Janak authored on 22/02/2007 12:41:36
Showing 1 changed files
... ...
@@ -175,7 +175,7 @@ route{
175 175
 	route(PSTN);
176 176
 
177 177
 	# nothing matched, reject it finally
178
-	sl_send_reply("404", "No route matched");
178
+	sl_reply("404", "No route matched");
179 179
 }
180 180
 
181 181
 route[FORWARD]
... ...
@@ -199,12 +199,12 @@ route[INIT]
199 199
 	# initial sanity checks -- messages with
200 200
 	# max_forwards==0, or excessively long requests
201 201
 	if (!mf_process_maxfwd_header("10")) {
202
-		sl_send_reply("483","Too Many Hops");
202
+		sl_reply("483","Too Many Hops");
203 203
 		drop;
204 204
 	}
205 205
 
206 206
 	if (msg:len >=  max_len ) {
207
-		sl_send_reply("513", "Message too big");
207
+		sl_reply("513", "Message too big");
208 208
 		drop;
209 209
 	}
210 210
 
... ...
@@ -226,7 +226,7 @@ route[RPC]
226 226
 		src_ip==127.0.0.1) {
227 227
 
228 228
 		if (msg:len >= 8192) {
229
-			sl_send_reply("513", "Request to big");
229
+			sl_reply("513", "Request to big");
230 230
 			drop;
231 231
 		}
232 232
 
... ...
@@ -291,7 +291,7 @@ route[DOMAIN]
291 291
 	# the domain of the callee -> somone uses our proxy as
292 292
 	# a relay
293 293
 	if (!$t.did && !$f.did) {
294
-		sl_send_reply("403", "Relaying Forbidden");
294
+		sl_reply("403", "Relaying Forbidden");
295 295
 		drop;
296 296
 	}
297 297
 }
... ...
@@ -302,33 +302,33 @@ route[REGISTRAR]
302 302
 	if (method=="REGISTER") {
303 303
 		# check if the REGISTER if for one of our local domains
304 304
 		if (!$t.did) {
305
-			sl_send_reply("403", "Register forwarding forbidden");
305
+			sl_reply("403", "Register forwarding forbidden");
306 306
 			drop;
307 307
 		}
308 308
 
309 309
 		# we want only authenticated users to be registered
310 310
 		if (!www_authenticate("$fd.digest_realm", "credentials")) {
311 311
 			if ($? == -2) {
312
-				sl_send_reply("500", "Internal Server Error");
312
+				sl_reply("500", "Internal Server Error");
313 313
 			} else if ($? == -3) {
314
-				sl_send_reply("400", "Bad Request");
314
+				sl_reply("400", "Bad Request");
315 315
 			} else {
316 316
 				if ($digest_challenge) {
317 317
 					append_to_reply("%$digest_challenge");
318 318
 				}
319
-				sl_send_reply("401", "Unauthorized");
319
+				sl_reply("401", "Unauthorized");
320 320
 			}
321 321
 			drop;
322 322
 		}
323 323
 
324 324
 		# check if the authenticated user is the same as the target user
325 325
 		if (!lookup_user("$tu.uid", "@to.uri")) {
326
-			sl_send_reply("404", "Unknown user in To");
326
+			sl_reply("404", "Unknown user in To");
327 327
 			drop;
328 328
 		}
329 329
 
330 330
 		if ($f.uid != $t.uid) {
331
-			sl_send_reply("403", "Authentication and To-Header mismatch");
331
+			sl_reply("403", "Authentication and To-Header mismatch");
332 332
 			drop;
333 333
 		}
334 334
 
... ...
@@ -375,14 +375,14 @@ route[AUTHENTICATION]
375 375
 
376 376
 	if (!proxy_authenticate("$fd.digest_realm", "credentials")) {
377 377
 		if ($? == -2) {
378
-			sl_send_reply("500", "Internal Server Error");
378
+			sl_reply("500", "Internal Server Error");
379 379
 		} else if ($? == -3) {
380
-			sl_send_reply("400", "Bad Request");
380
+			sl_reply("400", "Bad Request");
381 381
 		} else {
382 382
 			if ($digest_challenge) {
383 383
 				append_to_reply("%$digest_challenge");
384 384
 			}
385
-			sl_send_reply("407", "Proxy Authentication Required");
385
+			sl_reply("407", "Proxy Authentication Required");
386 386
 		}
387 387
 		drop;
388 388
 	}
... ...
@@ -393,7 +393,7 @@ route[AUTHENTICATION]
393 393
 		del_attr("$uid");
394 394
 	}
395 395
 	if ($fu.uid != $fr.authuid) {
396
-		sl_send_reply("403", "Fake Identity");
396
+		sl_reply("403", "Fake Identity");
397 397
 		drop;
398 398
 	}
399 399
 	# load the user AVPs (preferences) of the caller, e.g. for RPID header
... ...
@@ -445,7 +445,7 @@ route[INBOUND]
445 445
 
446 446
 			route(FORWARD);
447 447
 		} else {
448
-			sl_send_reply("480", "User temporarily not available");
448
+			sl_reply("480", "User temporarily not available");
449 449
 			drop;
450 450
 		}
451 451
 	}