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,62 +0,0 @@
1
-#
2
-# $Id$
3
-#
4
-# example: accounting calls to nummerical destinations
5
-#
6
-
7
-# ------------------ module loading ----------------------------------
8
-
9
-loadmodule "modules/tm/tm.so"
10
-loadmodule "modules/acc/acc.so"
11
-loadmodule "modules/sl/sl.so"
12
-loadmodule "modules/maxfwd/maxfwd.so"
13
-loadmodule "modules/rr/rr.so"
14
-
15
-# ----------------- setting module-specific parameters ---------------
16
-
17
-# -- acc params --
18
-# set the reporting log level
19
-modparam("acc", "log_level", 1)
20
-# number of flag, which will be used for accounting; if a message is
21
-# labeled with this flag, its completion status will be reported
22
-modparam("acc", "log_flag", 1 )
23
-
24
-# -------------------------  request routing logic -------------------
25
-
26
-# main routing logic
27
-
28
-route{
29
-
30
-	/* ********* ROUTINE CHECKS  ********************************** */
31
-
32
-	# filter too old messages
33
-	if (!mf_process_maxfwd_header("10")) {
34
-		log("LOG: Too many hops\n");
35
-		sl_send_reply("483","Too Many Hops");
36
-		break;
37
-	};
38
-	if (len_gt( max_len )) {
39
-		sl_send_reply("513", "Wow -- Message too large");
40
-		break;
41
-	};
42
-
43
-    #  Process record-routing
44
-    if (loose_route()) { t_relay(); break; };
45
-
46
-
47
-	# labeled all transaction for accounting
48
-	setflag(1);
49
-
50
-	# record-route INVITES to make sure BYEs will visit our server too
51
-	if (method=="INVITE") record_route();
52
-
53
-	# forward the request statefuly now; (we need *stateful* forwarding,
54
-	# because the stateful mode correlates requests with replies and
55
-	# drops retranmissions; otherwise, we would have to report on
56
-	# every single message received)
57
-	if (!t_relay()) {
58
-		sl_reply_error(); 
59
-		break; 
60
-	};
61
-
62
-}
Browse code

examples aligned to 8.11

Jiri Kuthan authored on 03/06/2003 03:18:12
Showing 1 changed files
... ...
@@ -19,7 +19,7 @@ loadmodule "modules/rr/rr.so"
19 19
 modparam("acc", "log_level", 1)
20 20
 # number of flag, which will be used for accounting; if a message is
21 21
 # labeled with this flag, its completion status will be reported
22
-modparam("acc", "acc_flag", 1 )
22
+modparam("acc", "log_flag", 1 )
23 23
 
24 24
 # -------------------------  request routing logic -------------------
25 25
 
... ...
@@ -40,15 +40,15 @@ route{
40 40
 		break;
41 41
 	};
42 42
 
43
-    # Do strict routing if pre-loaded route headers present due to
44
-	# previous use of record-routing
45
-    rewriteFromRoute();
43
+    #  Process record-routing
44
+    if (loose_route()) { t_relay(); break; };
45
+
46 46
 
47 47
 	# labeled all transaction for accounting
48 48
 	setflag(1);
49 49
 
50 50
 	# record-route INVITES to make sure BYEs will visit our server too
51
-	if (method=="INVITE") addRecordRoute();
51
+	if (method=="INVITE") record_route();
52 52
 
53 53
 	# forward the request statefuly now; (we need *stateful* forwarding,
54 54
 	# because the stateful mode correlates requests with replies and
Browse code

clarifications on accounting and stateful UAS added

Jiri Kuthan authored on 07/01/2003 23:35:37
Showing 1 changed files
... ...
@@ -10,6 +10,7 @@ loadmodule "modules/tm/tm.so"
10 10
 loadmodule "modules/acc/acc.so"
11 11
 loadmodule "modules/sl/sl.so"
12 12
 loadmodule "modules/maxfwd/maxfwd.so"
13
+loadmodule "modules/rr/rr.so"
13 14
 
14 15
 # ----------------- setting module-specific parameters ---------------
15 16
 
... ...
@@ -39,10 +40,15 @@ route{
39 40
 		break;
40 41
 	};
41 42
 
42
-	# nummerical destinations will be labeled for accounting, others not
43
-	if (uri=~"sip:\+?[0-9]+@") {
44
-		setflag(1);
45
-	};
43
+    # Do strict routing if pre-loaded route headers present due to
44
+	# previous use of record-routing
45
+    rewriteFromRoute();
46
+
47
+	# labeled all transaction for accounting
48
+	setflag(1);
49
+
50
+	# record-route INVITES to make sure BYEs will visit our server too
51
+	if (method=="INVITE") addRecordRoute();
46 52
 
47 53
 	# forward the request statefuly now; (we need *stateful* forwarding,
48 54
 	# because the stateful mode correlates requests with replies and
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,56 @@
1
+#
2
+# $Id$
3
+#
4
+# example: accounting calls to nummerical destinations
5
+#
6
+
7
+# ------------------ module loading ----------------------------------
8
+
9
+loadmodule "modules/tm/tm.so"
10
+loadmodule "modules/acc/acc.so"
11
+loadmodule "modules/sl/sl.so"
12
+loadmodule "modules/maxfwd/maxfwd.so"
13
+
14
+# ----------------- setting module-specific parameters ---------------
15
+
16
+# -- acc params --
17
+# set the reporting log level
18
+modparam("acc", "log_level", 1)
19
+# number of flag, which will be used for accounting; if a message is
20
+# labeled with this flag, its completion status will be reported
21
+modparam("acc", "acc_flag", 1 )
22
+
23
+# -------------------------  request routing logic -------------------
24
+
25
+# main routing logic
26
+
27
+route{
28
+
29
+	/* ********* ROUTINE CHECKS  ********************************** */
30
+
31
+	# filter too old messages
32
+	if (!mf_process_maxfwd_header("10")) {
33
+		log("LOG: Too many hops\n");
34
+		sl_send_reply("483","Too Many Hops");
35
+		break;
36
+	};
37
+	if (len_gt( max_len )) {
38
+		sl_send_reply("513", "Wow -- Message too large");
39
+		break;
40
+	};
41
+
42
+	# nummerical destinations will be labeled for accounting, others not
43
+	if (uri=~"sip:\+?[0-9]+@") {
44
+		setflag(1);
45
+	};
46
+
47
+	# forward the request statefuly now; (we need *stateful* forwarding,
48
+	# because the stateful mode correlates requests with replies and
49
+	# drops retranmissions; otherwise, we would have to report on
50
+	# every single message received)
51
+	if (!t_relay()) {
52
+		sl_reply_error(); 
53
+		break; 
54
+	};
55
+
56
+}