Browse code

scripts Moved to examples

Jiri Kuthan authored on 19/08/2002 18:32:45
Showing 4 changed files
... ...
@@ -269,8 +269,11 @@ route{
269 269
 	if (uri=~"sip:9042@") {
270 270
 		seturi("sip:sisalem@iptel.org");
271 271
 	};
272
+#	if (uri=~"sip:17@") {
273
+#		seturi("sip:henry@siptest.wcom.com");
274
+#	};
272 275
 	if (uri=~"sip:17@") {
273
-		seturi("sip:henry@siptest.wcom.com");
276
+		seturi("sip:henry@sip.sinnreich.net");
274 277
 	};
275 278
 	if (uri=~"sip:jirim@"  ) {
276 279
 		seturi("sip:001795061546@iptel.org");
277 280
deleted file mode 100644
... ...
@@ -1,72 +0,0 @@
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
-}
73 0
deleted file mode 100644
... ...
@@ -1,43 +0,0 @@
1
-#
2
-# $Id$
3
-#
4
-# this example shows use of ser as stateless redirect server
5
-#
6
-
7
-# ----------- global configuration parameters ------------------------
8
-
9
-debug=3
10
-fork=no
11
-log_stderror=yes	# (cmd line: -E)
12
-check_via=no # (cmd. line: -v)
13
-dns=no # (cmd. line: -r)
14
-syn_branch=1
15
-reply_to_via=0
16
-
17
-# advertise IP address in Via (as opposed to advertising DNS name
18
-# which is annoying for downstream servers and some phones can
19
-# not handle DNS at all)
20
-listen=195.37.77.100
21
-
22
-# ------------------ module loading ----------------------------------
23
-
24
-loadmodule "../sip_router/modules/sl/sl.so"
25
-loadmodule "../sip_router/modules/print/print.so"
26
-
27
-
28
-# -------------------------  request routing logic -------------------
29
-
30
-# main routing logic
31
-
32
-route{
33
-	# for testing purposes, simply okay all REGISTERs
34
-	if (method=="REGISTER") {
35
-		log("REGISTER");
36
-		sl_send_reply("200", "ok");
37
-		break;
38
-	};
39
-	append_branch("sip:parallel@iptel.org:9");
40
-	append_branch("sip:redirect@iptel.org:9");
41
-	sl_send_reply("300", "Redirect");
42
-}
43
-
44 0
deleted file mode 100644
... ...
@@ -1,81 +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
-# ----------- 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
-