Browse Source

- replace sl_send_reply with sl_reply

Jan Janak 18 years ago
parent
commit
e89d3f839f
1 changed files with 16 additions and 16 deletions
  1. 16 16
      etc/ser.cfg

+ 16 - 16
etc/ser.cfg

@@ -175,7 +175,7 @@ route{
 	route(PSTN);
 
 	# nothing matched, reject it finally
-	sl_send_reply("404", "No route matched");
+	sl_reply("404", "No route matched");
 }
 
 route[FORWARD]
@@ -199,12 +199,12 @@ route[INIT]
 	# initial sanity checks -- messages with
 	# max_forwards==0, or excessively long requests
 	if (!mf_process_maxfwd_header("10")) {
-		sl_send_reply("483","Too Many Hops");
+		sl_reply("483","Too Many Hops");
 		drop;
 	}
 
 	if (msg:len >=  max_len ) {
-		sl_send_reply("513", "Message too big");
+		sl_reply("513", "Message too big");
 		drop;
 	}
 
@@ -226,7 +226,7 @@ route[RPC]
 		src_ip==127.0.0.1) {
 
 		if (msg:len >= 8192) {
-			sl_send_reply("513", "Request to big");
+			sl_reply("513", "Request to big");
 			drop;
 		}
 
@@ -291,7 +291,7 @@ route[DOMAIN]
 	# the domain of the callee -> somone uses our proxy as
 	# a relay
 	if (!$t.did && !$f.did) {
-		sl_send_reply("403", "Relaying Forbidden");
+		sl_reply("403", "Relaying Forbidden");
 		drop;
 	}
 }
@@ -302,33 +302,33 @@ route[REGISTRAR]
 	if (method=="REGISTER") {
 		# check if the REGISTER if for one of our local domains
 		if (!$t.did) {
-			sl_send_reply("403", "Register forwarding forbidden");
+			sl_reply("403", "Register forwarding forbidden");
 			drop;
 		}
 
 		# we want only authenticated users to be registered
 		if (!www_authenticate("$fd.digest_realm", "credentials")) {
 			if ($? == -2) {
-				sl_send_reply("500", "Internal Server Error");
+				sl_reply("500", "Internal Server Error");
 			} else if ($? == -3) {
-				sl_send_reply("400", "Bad Request");
+				sl_reply("400", "Bad Request");
 			} else {
 				if ($digest_challenge) {
 					append_to_reply("%$digest_challenge");
 				}
-				sl_send_reply("401", "Unauthorized");
+				sl_reply("401", "Unauthorized");
 			}
 			drop;
 		}
 
 		# check if the authenticated user is the same as the target user
 		if (!lookup_user("$tu.uid", "@to.uri")) {
-			sl_send_reply("404", "Unknown user in To");
+			sl_reply("404", "Unknown user in To");
 			drop;
 		}
 
 		if ($f.uid != $t.uid) {
-			sl_send_reply("403", "Authentication and To-Header mismatch");
+			sl_reply("403", "Authentication and To-Header mismatch");
 			drop;
 		}
 
@@ -375,14 +375,14 @@ route[AUTHENTICATION]
 
 	if (!proxy_authenticate("$fd.digest_realm", "credentials")) {
 		if ($? == -2) {
-			sl_send_reply("500", "Internal Server Error");
+			sl_reply("500", "Internal Server Error");
 		} else if ($? == -3) {
-			sl_send_reply("400", "Bad Request");
+			sl_reply("400", "Bad Request");
 		} else {
 			if ($digest_challenge) {
 				append_to_reply("%$digest_challenge");
 			}
-			sl_send_reply("407", "Proxy Authentication Required");
+			sl_reply("407", "Proxy Authentication Required");
 		}
 		drop;
 	}
@@ -393,7 +393,7 @@ route[AUTHENTICATION]
 		del_attr("$uid");
 	}
 	if ($fu.uid != $fr.authuid) {
-		sl_send_reply("403", "Fake Identity");
+		sl_reply("403", "Fake Identity");
 		drop;
 	}
 	# load the user AVPs (preferences) of the caller, e.g. for RPID header
@@ -445,7 +445,7 @@ route[INBOUND]
 
 			route(FORWARD);
 		} else {
-			sl_send_reply("480", "User temporarily not available");
+			sl_reply("480", "User temporarily not available");
 			drop;
 		}
 	}