Browse code

examples: moved to misc directory

Daniel-Constantin Mierla authored on 07/12/2016 13:56:54
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,73 +0,0 @@
1
-#
2
-# $Id$
3
-#
4
-# demo script showing how to set-up usrloc replication
5
-#
6
-
7
-# ----------- global configuration parameters ------------------------
8
-
9
-debug=3          # debug level (cmd line: -dddddddddd)
10
-fork=no
11
-log_stderror=yes # (cmd line: -E)
12
-
13
-# ------------------ module loading ----------------------------------
14
-
15
-loadmodule "modules/mysql/mysql.so"
16
-loadmodule "modules/sl/sl.so"
17
-loadmodule "modules/tm/tm.so"
18
-loadmodule "modules/maxfwd/maxfwd.so"
19
-loadmodule "modules/usrloc/usrloc.so"
20
-loadmodule "modules/registrar/registrar.so"
21
-loadmodule "modules/auth/auth.so"
22
-loadmodule "modules/auth_db/auth_db.so"
23
-
24
-# ----------------- setting module-specific parameters ---------------
25
-
26
-# digest generation secret; use the same in backup server;
27
-# also, make sure that the backup server has sync'ed time
28
-modparam("auth", "secret", "alsdkhglaksdhfkloiwr")
29
-
30
-# -------------------------  request routing logic -------------------
31
-
32
-# main routing logic
33
-
34
-route{
35
-
36
-	# initial sanity checks -- messages with
37
-	# max_forwars==0, or excessively long requests
38
-	if (!mf_process_maxfwd_header("10")) {
39
-		sl_send_reply("483","Too Many Hops");
40
-		break;
41
-	};
42
-	if (len_gt( max_len )) {
43
-		sl_send_reply("513", "Message too big");
44
-		break;
45
-	};
46
-
47
-	# if the request is for other domain use UsrLoc
48
-	# (in case, it does not work, use the following command
49
-	# with proper names and addresses in it)
50
-	if (uri==myself) {
51
-
52
-		if (method=="REGISTER") {
53
-
54
-			# verify credentials
55
-			if (!www_authorize("foo.bar", "subscriber")) {
56
-				www_challenge("foo.bar", "0");
57
-				break;
58
-			};
59
-
60
-			# if ok, update contacts and ...
61
-			save("location");
62
-			# ... if this REGISTER is not a replica from our
63
-			# peer server, replicate to the peer server
64
-			if (!src_ip==backup.foo.bar) {
65
-				t_replicate("backup.foo.bar", "5060");
66
-			};
67
-			break;
68
-		};
69
-		# do whatever else appropriate for your domain
70
-		log("non-REGISTER\n");
71
-	};
72
-}
73
-
Browse code

examples aligned to 8.11

Jiri Kuthan authored on 03/06/2003 03:18:12
Showing 1 changed files
... ...
@@ -19,6 +19,7 @@ loadmodule "modules/maxfwd/maxfwd.so"
19 19
 loadmodule "modules/usrloc/usrloc.so"
20 20
 loadmodule "modules/registrar/registrar.so"
21 21
 loadmodule "modules/auth/auth.so"
22
+loadmodule "modules/auth_db/auth_db.so"
22 23
 
23 24
 # ----------------- setting module-specific parameters ---------------
24 25
 
Browse code

admin documentation refurbished -- quite many changes, don't want me to list all of them

Jiri Kuthan authored on 09/12/2002 02:32:56
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,72 @@
1
+#
2
+# $Id$
3
+#
4
+# demo script showing how to set-up usrloc replication
5
+#
6
+
7
+# ----------- global configuration parameters ------------------------
8
+
9
+debug=3          # debug level (cmd line: -dddddddddd)
10
+fork=no
11
+log_stderror=yes # (cmd line: -E)
12
+
13
+# ------------------ module loading ----------------------------------
14
+
15
+loadmodule "modules/mysql/mysql.so"
16
+loadmodule "modules/sl/sl.so"
17
+loadmodule "modules/tm/tm.so"
18
+loadmodule "modules/maxfwd/maxfwd.so"
19
+loadmodule "modules/usrloc/usrloc.so"
20
+loadmodule "modules/registrar/registrar.so"
21
+loadmodule "modules/auth/auth.so"
22
+
23
+# ----------------- setting module-specific parameters ---------------
24
+
25
+# digest generation secret; use the same in backup server;
26
+# also, make sure that the backup server has sync'ed time
27
+modparam("auth", "secret", "alsdkhglaksdhfkloiwr")
28
+
29
+# -------------------------  request routing logic -------------------
30
+
31
+# main routing logic
32
+
33
+route{
34
+
35
+	# initial sanity checks -- messages with
36
+	# max_forwars==0, or excessively long requests
37
+	if (!mf_process_maxfwd_header("10")) {
38
+		sl_send_reply("483","Too Many Hops");
39
+		break;
40
+	};
41
+	if (len_gt( max_len )) {
42
+		sl_send_reply("513", "Message too big");
43
+		break;
44
+	};
45
+
46
+	# if the request is for other domain use UsrLoc
47
+	# (in case, it does not work, use the following command
48
+	# with proper names and addresses in it)
49
+	if (uri==myself) {
50
+
51
+		if (method=="REGISTER") {
52
+
53
+			# verify credentials
54
+			if (!www_authorize("foo.bar", "subscriber")) {
55
+				www_challenge("foo.bar", "0");
56
+				break;
57
+			};
58
+
59
+			# if ok, update contacts and ...
60
+			save("location");
61
+			# ... if this REGISTER is not a replica from our
62
+			# peer server, replicate to the peer server
63
+			if (!src_ip==backup.foo.bar) {
64
+				t_replicate("backup.foo.bar", "5060");
65
+			};
66
+			break;
67
+		};
68
+		# do whatever else appropriate for your domain
69
+		log("non-REGISTER\n");
70
+	};
71
+}
72
+