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,63 +0,0 @@
1
-#
2
-# $Id$
3
-#
4
-# example script showing both types of forking;
5
-# incoming message is forked in parallel to
6
-# 'nobody' and 'parallel', if no positive reply
7
-# appears with final_response timer, nonsense
8
-# is retried (serial forking); than, destination
9
-# 'foo' is given last chance
10
-
11
-# ------------------ module loading ----------------------------------
12
-
13
-loadmodule "modules/sl/sl.so"
14
-loadmodule "modules/tm/tm.so"
15
-
16
-# ----------------- setting module-specific parameters ---------------
17
-
18
-# -- tm params --
19
-# set time for which ser will be waiting for a final response;
20
-# fr_inv_timer sets value for INVITE transactions, fr_timer
21
-# for all others
22
-modparam("tm", "fr_inv_timer", 15 )
23
-modparam("tm", "fr_timer", 10 )
24
-
25
-# -------------------------  request routing logic -------------------
26
-
27
-# main routing logic
28
-
29
-route{
30
-	# for testing purposes, simply okay all REGISTERs
31
-	if (method=="REGISTER") {
32
-		log("REGISTER");
33
-		sl_send_reply("200", "ok");
34
-		break;
35
-	};
36
-	# try these two destinations first in parallel; the second
37
-	# destination is targeted to sink port -- that will make ser
38
-	# wait until timer hits
39
-	seturi("sip:nobody@iptel.org");
40
-	append_branch("sip:parallel@iptel.org:9");
41
-	# if we do not get a positive reply, continue at reply_route[1]
42
-	t_on_failure("1");
43
-	# forward the request to all destinations in destination set now 
44
-	t_relay();
45
-}
46
-
47
-failure_route[1] {
48
-	# forwarding failed -- try again at another destination 
49
-	append_branch("sip:nonsense@iptel.org");
50
-	log(1,"first redirection\n");
51
-	# if this alternative destination fails too, proceed to reply_route[2] 
52
-	t_on_failure("2");
53
-	t_relay();
54
-}
55
-
56
-failure_route[2] {
57
-	# try out the last resort destination
58
-	append_branch("sip:foo@iptel.org");
59
-	log(1, "second redirection\n");
60
-	# we no more call t_on_negative here; if this destination
61
-	# fails too, transaction will complete
62
-	t_relay();
63
-}
Browse code

examples aligned to 8.11

Jiri Kuthan authored on 03/06/2003 03:18:12
Showing 1 changed files
... ...
@@ -50,6 +50,7 @@ failure_route[1] {
50 50
 	log(1,"first redirection\n");
51 51
 	# if this alternative destination fails too, proceed to reply_route[2] 
52 52
 	t_on_failure("2");
53
+	t_relay();
53 54
 }
54 55
 
55 56
 failure_route[2] {
... ...
@@ -58,4 +59,5 @@ failure_route[2] {
58 59
 	log(1, "second redirection\n");
59 60
 	# we no more call t_on_negative here; if this destination
60 61
 	# fails too, transaction will complete
62
+	t_relay();
61 63
 }
Browse code

s/reply_route/failure_route, onreply_route introduced

Jiri Kuthan authored on 07/04/2003 06:36:56
Showing 1 changed files
... ...
@@ -39,20 +39,20 @@ route{
39 39
 	seturi("sip:nobody@iptel.org");
40 40
 	append_branch("sip:parallel@iptel.org:9");
41 41
 	# if we do not get a positive reply, continue at reply_route[1]
42
-	t_on_negative("1");
42
+	t_on_failure("1");
43 43
 	# forward the request to all destinations in destination set now 
44 44
 	t_relay();
45 45
 }
46 46
 
47
-reply_route[1] {
47
+failure_route[1] {
48 48
 	# forwarding failed -- try again at another destination 
49 49
 	append_branch("sip:nonsense@iptel.org");
50 50
 	log(1,"first redirection\n");
51 51
 	# if this alternative destination fails too, proceed to reply_route[2] 
52
-	t_on_negative("2");
52
+	t_on_failure("2");
53 53
 }
54 54
 
55
-reply_route[2] {
55
+failure_route[2] {
56 56
 	# try out the last resort destination
57 57
 	append_branch("sip:foo@iptel.org");
58 58
 	log(1, "second redirection\n");
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
... ...
@@ -2,33 +2,25 @@
2 2
 # $Id$
3 3
 #
4 4
 # example script showing both types of forking;
5
-# incoming message is foked in parallel to
5
+# incoming message is forked in parallel to
6 6
 # 'nobody' and 'parallel', if no positive reply
7 7
 # appears with final_response timer, nonsense
8 8
 # is retried (serial forking); than, destination
9 9
 # 'foo' is given last chance
10 10
 
11
-# ----------- global configuration parameters ------------------------
12
-
13
-debug=3
14
-fork=no
15
-log_stderror=yes	# (cmd line: -E)
16
-check_via=no # (cmd. line: -v)
17
-dns=no # (cmd. line: -r)
18
-syn_branch=1
19
-reply_to_via=0
20
-
21
-
22 11
 # ------------------ module loading ----------------------------------
23 12
 
24
-loadmodule "/usr/lib/ser/modules/sl.so"
25
-loadmodule "/usr/lib/ser/modules/tm.so"
13
+loadmodule "modules/sl/sl.so"
14
+loadmodule "modules/tm/tm.so"
26 15
 
27 16
 # ----------------- setting module-specific parameters ---------------
28 17
 
29 18
 # -- tm params --
19
+# set time for which ser will be waiting for a final response;
20
+# fr_inv_timer sets value for INVITE transactions, fr_timer
21
+# for all others
22
+modparam("tm", "fr_inv_timer", 15 )
30 23
 modparam("tm", "fr_timer", 10 )
31
-modparam("tm", "fr_inv_timer", 5 )
32 24
 
33 25
 # -------------------------  request routing logic -------------------
34 26
 
... ...
@@ -41,27 +33,29 @@ route{
41 33
 		sl_send_reply("200", "ok");
42 34
 		break;
43 35
 	};
44
-	# print a message if a call was missed
36
+	# try these two destinations first in parallel; the second
37
+	# destination is targeted to sink port -- that will make ser
38
+	# wait until timer hits
45 39
 	seturi("sip:nobody@iptel.org");
46
-	/* parallel branch to sink port -- that will make it
47
-	   wait until timer hits
48
-	*/
49 40
 	append_branch("sip:parallel@iptel.org:9");
41
+	# if we do not get a positive reply, continue at reply_route[1]
50 42
 	t_on_negative("1");
51
-	# start parallel forking to nobody and wer.xmla	
52
-	log(1,"about to relay\n");
43
+	# forward the request to all destinations in destination set now 
53 44
 	t_relay();
54 45
 }
55 46
 
56 47
 reply_route[1] {
57
-	rewriteuri("sip:nonsense@iptel.org");
58
-	append_branch();
48
+	# forwarding failed -- try again at another destination 
49
+	append_branch("sip:nonsense@iptel.org");
59 50
 	log(1,"first redirection\n");
51
+	# if this alternative destination fails too, proceed to reply_route[2] 
60 52
 	t_on_negative("2");
61 53
 }
62 54
 
63 55
 reply_route[2] {
64
-	rewriteuri("sip:foo@iptel.org");
56
+	# try out the last resort destination
57
+	append_branch("sip:foo@iptel.org");
65 58
 	log(1, "second redirection\n");
66
-	append_branch();
59
+	# we no more call t_on_negative here; if this destination
60
+	# fails too, transaction will complete
67 61
 }
Browse code

examples simplified and aligned to latest ser version

Jiri Kuthan authored on 04/10/2002 21:37:11
Showing 1 changed files
... ...
@@ -22,7 +22,6 @@ reply_to_via=0
22 22
 # ------------------ module loading ----------------------------------
23 23
 
24 24
 loadmodule "/usr/lib/ser/modules/sl.so"
25
-loadmodule "/usr/lib/ser/modules/print.so"
26 25
 loadmodule "/usr/lib/ser/modules/tm.so"
27 26
 
28 27
 # ----------------- setting module-specific parameters ---------------
Browse code

listen option removed from example config files

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

fixed module paths

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

uncommented load_module(tm)

Jiri Kuthan authored on 28/08/2002 13:20:50
Showing 1 changed files
... ...
@@ -27,7 +27,7 @@ listen=195.37.77.100
27 27
 
28 28
 loadmodule "../sip_router/modules/sl/sl.so"
29 29
 loadmodule "../sip_router/modules/print/print.so"
30
-#loadmodule "../sip_router/modules/tm/tm.so"
30
+loadmodule "../sip_router/modules/tm/tm.so"
31 31
 
32 32
 # ----------------- setting module-specific parameters ---------------
33 33
 
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,72 @@
1
+#
2
+# $Id$
3
+#
4
+# example script showing both types of forking;
5
+# incoming message is foked in parallel to
6
+# 'nobody' and 'parallel', if no positive reply
7
+# appears with final_response timer, nonsense
8
+# is retried (serial forking); than, destination
9
+# 'foo' is given last chance
10
+
11
+# ----------- global configuration parameters ------------------------
12
+
13
+debug=3
14
+fork=no
15
+log_stderror=yes	# (cmd line: -E)
16
+check_via=no # (cmd. line: -v)
17
+dns=no # (cmd. line: -r)
18
+syn_branch=1
19
+reply_to_via=0
20
+
21
+# advertise IP address in Via (as opposed to advertising DNS name
22
+# which is annoying for downstream servers and some phones can
23
+# not handle DNS at all)
24
+listen=195.37.77.100
25
+
26
+# ------------------ module loading ----------------------------------
27
+
28
+loadmodule "../sip_router/modules/sl/sl.so"
29
+loadmodule "../sip_router/modules/print/print.so"
30
+#loadmodule "../sip_router/modules/tm/tm.so"
31
+
32
+# ----------------- setting module-specific parameters ---------------
33
+
34
+# -- tm params --
35
+modparam("tm", "fr_timer", 10 )
36
+modparam("tm", "fr_inv_timer", 5 )
37
+
38
+# -------------------------  request routing logic -------------------
39
+
40
+# main routing logic
41
+
42
+route{
43
+	# for testing purposes, simply okay all REGISTERs
44
+	if (method=="REGISTER") {
45
+		log("REGISTER");
46
+		sl_send_reply("200", "ok");
47
+		break;
48
+	};
49
+	# print a message if a call was missed
50
+	seturi("sip:nobody@iptel.org");
51
+	/* parallel branch to sink port -- that will make it
52
+	   wait until timer hits
53
+	*/
54
+	append_branch("sip:parallel@iptel.org:9");
55
+	t_on_negative("1");
56
+	# start parallel forking to nobody and wer.xmla	
57
+	log(1,"about to relay\n");
58
+	t_relay();
59
+}
60
+
61
+reply_route[1] {
62
+	rewriteuri("sip:nonsense@iptel.org");
63
+	append_branch();
64
+	log(1,"first redirection\n");
65
+	t_on_negative("2");
66
+}
67
+
68
+reply_route[2] {
69
+	rewriteuri("sip:foo@iptel.org");
70
+	log(1, "second redirection\n");
71
+	append_branch();
72
+}