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,49 +0,0 @@
1
-#
2
-# $Id$
3
-#
4
-# this example shows usage of ser as user agent
5
-# server which does some functionality (in this
6
-# example, 'log' is used to print a notification
7
-# on a new transaction) and behaves statefuly
8
-# (e.g., it retransmits replies on request
9
-# retransmissions)
10
-
11
-# ------------------ module loading ----------------------------------
12
-
13
-loadmodule "modules/sl/sl.so"
14
-loadmodule "modules/tm/tm.so"
15
-
16
-
17
-# -------------------------  request routing logic -------------------
18
-
19
-# main routing logic
20
-
21
-route{
22
-	# for testing purposes, simply okay all REGISTERs
23
-	if (method=="REGISTER") {
24
-		log("REGISTER");
25
-		sl_send_reply("200", "ok");
26
-		break;
27
-	};
28
-
29
-	# create transaction state; abort if error occurred
30
-	if ( !t_newtran()) {
31
-		sl_reply_error();
32
-		break;
33
-	};
34
-
35
-	# the following log will be only printed on receipt of 
36
-	# a new message; retranmissions are absorbed by t_newtran
37
-	log(1, "New Transaction Arrived\n");
38
-       	# do what you want to do as a sever...
39
-	if (uri=~"a@") {
40
-		if (!t_reply("409", "Bizzar Error")) {
41
-			sl_reply_error();
42
-		};
43
-	} else {
44
-		if (!t_reply("699", "I don't want to chat with you")) {
45
-			sl_reply_error();
46
-		};
47
-   	};
48
-}
49
-
Browse code

core: fix spelling errors catched by lintian #688

Victor Seva authored on 29/06/2016 14:48:09
Showing 1 changed files
... ...
@@ -26,7 +26,7 @@ route{
26 26
 		break;
27 27
 	};
28 28
 
29
-	# create transaction state; abort if error occured
29
+	# create transaction state; abort if error occurred
30 30
 	if ( !t_newtran()) {
31 31
 		sl_reply_error();
32 32
 		break;
Browse code

examples aligned to 8.11

Jiri Kuthan authored on 03/06/2003 03:18:12
Showing 1 changed files
... ...
@@ -44,6 +44,6 @@ route{
44 44
 		if (!t_reply("699", "I don't want to chat with you")) {
45 45
 			sl_reply_error();
46 46
 		};
47
-    	};
47
+   	};
48 48
 }
49 49
 
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
... ...
@@ -8,25 +8,10 @@
8 8
 # (e.g., it retransmits replies on request
9 9
 # retransmissions)
10 10
 
11
-# ----------- global configuration parameters ------------------------
12
-
13
-debug=3
14
-fork=no
15
-log_stderror=yes	# (cmd line: -E)
16
-check_via=yes     # (cmd. line: -v)
17
-dns=0           # (cmd. line: -r)
18
-rev_dns=0      # (cmd. line: -R)
19
-reply_to_via=no
20
-
21
-
22 11
 # ------------------ module loading ----------------------------------
23 12
 
24
-loadmodule "/usr/lib/ser/modules/sl.so"
25
-loadmodule "/usr/lib/ser/modules/tm.so"
26
-
27
-# ----------------- setting module-specific parameters ---------------
28
-
29
-# -- usrloc params --
13
+loadmodule "modules/sl/sl.so"
14
+loadmodule "modules/tm/tm.so"
30 15
 
31 16
 
32 17
 # -------------------------  request routing logic -------------------
... ...
@@ -38,34 +23,27 @@ route{
38 23
 	if (method=="REGISTER") {
39 24
 		log("REGISTER");
40 25
 		sl_send_reply("200", "ok");
41
-		#t_replicate("localhost", "9");
42 26
 		break;
43 27
 	};
44
-	# print a message if a call was missed
45 28
 
46
-	if ( t_newtran())
47
-    {
48
-		if (method=="ACK") {
49
-			log("oops--ACK to a non-existent transaction");
50
-			drop;
51
-		};
52
-		log("New Transaction Arrived\n");
53
-        # do what you want to do as a sever
54
-		if (uri=~"a@") {
55
-			if (!t_reply("409", "Bizzar Error")) {
56
-				sl_reply_error();
57
-			};
58
-		} else if (uri=~"b@") {
59
-			if (!t_reply("979", "You did not expect this did you")) {
60
-				sl_reply_error();
61
-			};
62
-		} else {
63
-			if (!t_reply("699", "I don't want to chat with you")) {
64
-				sl_reply_error();
65
-			};
66
-		} ;
67
-    } else {
29
+	# create transaction state; abort if error occured
30
+	if ( !t_newtran()) {
68 31
 		sl_reply_error();
32
+		break;
69 33
 	};
34
+
35
+	# the following log will be only printed on receipt of 
36
+	# a new message; retranmissions are absorbed by t_newtran
37
+	log(1, "New Transaction Arrived\n");
38
+       	# do what you want to do as a sever...
39
+	if (uri=~"a@") {
40
+		if (!t_reply("409", "Bizzar Error")) {
41
+			sl_reply_error();
42
+		};
43
+	} else {
44
+		if (!t_reply("699", "I don't want to chat with you")) {
45
+			sl_reply_error();
46
+		};
47
+    	};
70 48
 }
71 49
 
Browse code

examples simplified and aligned to latest ser version

Jiri Kuthan authored on 04/10/2002 21:37:11
Showing 1 changed files
... ...
@@ -12,28 +12,22 @@
12 12
 
13 13
 debug=3
14 14
 fork=no
15
-#children=2
16 15
 log_stderror=yes	# (cmd line: -E)
17 16
 check_via=yes     # (cmd. line: -v)
18 17
 dns=0           # (cmd. line: -r)
19 18
 rev_dns=0      # (cmd. line: -R)
20
-port=5068
21 19
 reply_to_via=no
22 20
 
23 21
 
24 22
 # ------------------ module loading ----------------------------------
25 23
 
26 24
 loadmodule "/usr/lib/ser/modules/sl.so"
27
-loadmodule "/usr/lib/ser/modules/print.so"
28 25
 loadmodule "/usr/lib/ser/modules/tm.so"
29
-loadmodule "/usr/lib/ser/modules/usrloc.so"
30 26
 
31 27
 # ----------------- setting module-specific parameters ---------------
32 28
 
33 29
 # -- usrloc params --
34 30
 
35
-modparam("usrloc", "use_database",   0)
36
-modparam("usrloc", "flush_interval", 3600)
37 31
 
38 32
 # -------------------------  request routing logic -------------------
39 33
 
Browse code

listen option removed from example config files

Jiri Kuthan authored on 24/09/2002 02:38:45
Showing 1 changed files
... ...
@@ -20,10 +20,6 @@ rev_dns=0      # (cmd. line: -R)
20 20
 port=5068
21 21
 reply_to_via=no
22 22
 
23
-# advertise IP address in Via (as opposed to advertising DNS name
24
-# which is annoying for downstream servers and some phones can
25
-# not handle DNS at all)
26
-listen=195.37.77.100
27 23
 
28 24
 # ------------------ module loading ----------------------------------
29 25
 
Browse code

fixed module paths

Jiri Kuthan authored on 19/09/2002 22:06:17
Showing 1 changed files
... ...
@@ -27,10 +27,10 @@ listen=195.37.77.100
27 27
 
28 28
 # ------------------ module loading ----------------------------------
29 29
 
30
-loadmodule "../sip_router/modules/sl/sl.so"
31
-loadmodule "../sip_router/modules/print/print.so"
32
-loadmodule "../sip_router/modules/tm/tm.so"
33
-loadmodule "../sip_router/modules/usrloc/usrloc.so"
30
+loadmodule "/usr/lib/ser/modules/sl.so"
31
+loadmodule "/usr/lib/ser/modules/print.so"
32
+loadmodule "/usr/lib/ser/modules/tm.so"
33
+loadmodule "/usr/lib/ser/modules/usrloc.so"
34 34
 
35 35
 # ----------------- setting module-specific parameters ---------------
36 36
 
Browse code

uncommented load_module(tm)

Jiri Kuthan authored on 28/08/2002 13:20:50
Showing 1 changed files
... ...
@@ -29,7 +29,7 @@ listen=195.37.77.100
29 29
 
30 30
 loadmodule "../sip_router/modules/sl/sl.so"
31 31
 loadmodule "../sip_router/modules/print/print.so"
32
-#loadmodule "../sip_router/modules/tm/tm.so"
32
+loadmodule "../sip_router/modules/tm/tm.so"
33 33
 loadmodule "../sip_router/modules/usrloc/usrloc.so"
34 34
 
35 35
 # ----------------- setting module-specific parameters ---------------
Browse code

scripts moved to examples

Jiri Kuthan authored on 19/08/2002 18:33:17
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,81 @@
1
+#
2
+# $Id$
3
+#
4
+# this example shows usage of ser as user agent
5
+# server which does some functionality (in this
6
+# example, 'log' is used to print a notification
7
+# on a new transaction) and behaves statefuly
8
+# (e.g., it retransmits replies on request
9
+# retransmissions)
10
+
11
+# ----------- global configuration parameters ------------------------
12
+
13
+debug=3
14
+fork=no
15
+#children=2
16
+log_stderror=yes	# (cmd line: -E)
17
+check_via=yes     # (cmd. line: -v)
18
+dns=0           # (cmd. line: -r)
19
+rev_dns=0      # (cmd. line: -R)
20
+port=5068
21
+reply_to_via=no
22
+
23
+# advertise IP address in Via (as opposed to advertising DNS name
24
+# which is annoying for downstream servers and some phones can
25
+# not handle DNS at all)
26
+listen=195.37.77.100
27
+
28
+# ------------------ module loading ----------------------------------
29
+
30
+loadmodule "../sip_router/modules/sl/sl.so"
31
+loadmodule "../sip_router/modules/print/print.so"
32
+#loadmodule "../sip_router/modules/tm/tm.so"
33
+loadmodule "../sip_router/modules/usrloc/usrloc.so"
34
+
35
+# ----------------- setting module-specific parameters ---------------
36
+
37
+# -- usrloc params --
38
+
39
+modparam("usrloc", "use_database",   0)
40
+modparam("usrloc", "flush_interval", 3600)
41
+
42
+# -------------------------  request routing logic -------------------
43
+
44
+# main routing logic
45
+
46
+route{
47
+	# for testing purposes, simply okay all REGISTERs
48
+	if (method=="REGISTER") {
49
+		log("REGISTER");
50
+		sl_send_reply("200", "ok");
51
+		#t_replicate("localhost", "9");
52
+		break;
53
+	};
54
+	# print a message if a call was missed
55
+
56
+	if ( t_newtran())
57
+    {
58
+		if (method=="ACK") {
59
+			log("oops--ACK to a non-existent transaction");
60
+			drop;
61
+		};
62
+		log("New Transaction Arrived\n");
63
+        # do what you want to do as a sever
64
+		if (uri=~"a@") {
65
+			if (!t_reply("409", "Bizzar Error")) {
66
+				sl_reply_error();
67
+			};
68
+		} else if (uri=~"b@") {
69
+			if (!t_reply("979", "You did not expect this did you")) {
70
+				sl_reply_error();
71
+			};
72
+		} else {
73
+			if (!t_reply("699", "I don't want to chat with you")) {
74
+				sl_reply_error();
75
+			};
76
+		} ;
77
+    } else {
78
+		sl_reply_error();
79
+	};
80
+}
81
+