Browse code

etc: cleaned up folder, moving unused files to examples

Daniel-Constantin Mierla authored on 14/03/2014 18:59:02
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,141 +0,0 @@
1
-#
2
-# $Id$
3
-#
4
-# iptel.org real world configuration
5
-#
6
-
7
-# ----------- global configuration parameters ------------------------
8
-
9
-debug=4          # debug level (cmd line: -dddddddddd)
10
-fork=no
11
-#log_stderror=no	# (cmd line: -E)
12
-log_stderror=yes	# (cmd line: -E)
13
-#check_via=yes     # (cmd. line: -v)
14
-#check_via=0
15
-dns=on           # (cmd. line: -r)
16
-rev_dns=yes      # (cmd. line: -R)
17
-port=5069
18
-#port=8060
19
-children=1
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
-#listen=bat.iptel.org
26
-
27
-# ------------------ module loading ----------------------------------
28
-
29
-loadmodule "../sip_router/modules/sl/sl.so"
30
-loadmodule "../sip_router/modules/print/print.so"
31
-#loadmodule "../sip_router/modules/tm/tm.so"
32
-loadmodule "../sip_router/modules/acc/acc.so"
33
-loadmodule "../sip_router/modules/rr/rr.so"
34
-loadmodule "../sip_router/modules/maxfwd/maxfwd.so"
35
-loadmodule "../sip_router/modules/mysql/mysql.so"
36
-loadmodule "../sip_router/modules/usrloc/usrloc.so"
37
-loadmodule "../sip_router/modules/auth/auth.so"
38
-loadmodule "../sip_router/modules/cpl/cpl.so"
39
-
40
-# ----------------- setting module-specific parameters ---------------
41
-
42
-# -- usrloc params --
43
-
44
-modparam("usrloc", "use_database",   1)
45
-modparam("usrloc", "table",          "location")
46
-modparam("usrloc", "user_column",    "user")
47
-modparam("usrloc", "contact_column", "contact")
48
-modparam("usrloc", "expires_column", "expires")
49
-modparam("usrloc", "q_column",       "q")
50
-modparam("usrloc", "callid_column",  "callid")
51
-modparam("usrloc", "cseq_column",    "cseq")
52
-modparam("usrloc", "flush_interval", 60)
53
-modparam("usrloc", "db_url",         "sql://root:@localhost/ser")
54
-
55
-# -- auth params --
56
-
57
-modparam("auth", "db_url",        "sql://root:@localhost/ser")
58
-modparam("auth", "user_column",   "user")
59
-# nonce generation secret; particularly useful if multiple servers
60
-# in a proxy farm are configured to authenticate
61
-modparam("auth", "secret",        "439tg8h349g8hq349t9384hg")
62
-# calculate_ha1=false means password column includes ha1 strings;
63
-# if it was false, plain-text passwords would be assumed
64
-
65
-# the database credentials in hashed form
66
-modparam("auth", "calculate_ha1", false)
67
-modparam("auth", "password_column", "ha1")
68
-# password_column, realm_column, group_table, group_user_column,
69
-#   group_group_column are set to their default values
70
-# password_column_2 allows to deal with clients who put domain name
71
-#   in authentication credentials when calculate_ha1=false (if true,
72
-#   it works); if set to a value and USER_DOMAIN_HACK was enabled
73
-#   in defs.h, authentication will still work
74
-modparam("auth", "password_column_2", "ha1b")
75
-
76
-# the database in plain-text alternative:
77
-#modparam("auth", "calculate_ha1", true )
78
-#modparam("auth", "password_column", "password")
79
-
80
-modparam("auth", "nonce_expire",  300)
81
-modparam("auth", "retry_count",   3)
82
-
83
-# -- acc params --
84
-# report ACKs too for sake of completeness -- as we account PSTN
85
-# destinations which are RR, ACKs should show up
86
-modparam("acc", "report_ack", 1)
87
-# don't bother me with early media reports (I don't like 183 
88
-# too much anyway...ever thought of timer C hitting after
89
-# listening to music-on-hold for five minutes?)
90
-modparam("acc", "early_media", 0)
91
-modparam("acc", "log_level", 1)
92
-# that is the flag for which we will account -- don't forget to
93
-# set the same one :-)
94
-modparam("acc", "acc_flag", 1 )
95
-# we are interested only in succesful transactions
96
-modparam("acc", "failed_transactions", 0 )
97
-
98
-# -- tm params --
99
-modparam("tm", "fr_timer", 30 )
100
-modparam("tm", "fr_inv_timer", 60 )
101
-
102
-# -------------------------  request routing logic -------------------
103
-
104
-# main routing logic
105
-
106
-route{
107
-
108
-	# filter local stateless ACK generated by authentication of mf replies
109
-	sl_filter_ACK();
110
-
111
-	# filter too old messages
112
-	log("LOG: Checking maxfwd\n");
113
-	if (!mf_process_maxfwd_header("10")) {
114
-		log("LOG: Too many hops\n");
115
-		sl_send_reply("483","Too Many Hops");
116
-		break;
117
-	};
118
-
119
-	if (method=="REGISTER") {
120
-		log("LOG Request is REGISTER\n");
121
-		if (!www_authorize(	"bat.iptel.org" /* realm */, 
122
-			 				"subscriber" /* table name */ )) {
123
-			log("LOG: REGISTER has no credentials, sending challenge\n");
124
- 			www_challenge(	"bat.iptel.org" /* realm */, 
125
-							"0" /* no qop -- M$ can't deal with it */);
126
-			break;
127
-		};
128
-		# prohibit attempts to grab someone else's To address 
129
-		# using  valid credentials
130
-		if (!is_user("replicator")) {
131
-			log("LOG: To Cheating attempt\n");
132
-			sl_send_reply("403", "That is ugly -- use To=id next time");
133
-			break;
134
-		};
135
-			
136
-		# update Contact database
137
-       	log("LOG: REGISTER is authorized, saving location\n");
138
-		save_contact("location");
139
-		break;
140
-	};
141
-}
Browse code

user_id changed to user

Jan Janak authored on 25/01/2003 14:59:15
Showing 1 changed files
... ...
@@ -55,7 +55,7 @@ modparam("usrloc", "db_url",         "sql://root:@localhost/ser")
55 55
 # -- auth params --
56 56
 
57 57
 modparam("auth", "db_url",        "sql://root:@localhost/ser")
58
-modparam("auth", "user_column",   "user_id")
58
+modparam("auth", "user_column",   "user")
59 59
 # nonce generation secret; particularly useful if multiple servers
60 60
 # in a proxy farm are configured to authenticate
61 61
 modparam("auth", "secret",        "439tg8h349g8hq349t9384hg")
Browse code

outdated files moved to obsoleted

Jiri Kuthan authored on 19/08/2002 18:35:50
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,141 @@
1
+#
2
+# $Id$
3
+#
4
+# iptel.org real world configuration
5
+#
6
+
7
+# ----------- global configuration parameters ------------------------
8
+
9
+debug=4          # debug level (cmd line: -dddddddddd)
10
+fork=no
11
+#log_stderror=no	# (cmd line: -E)
12
+log_stderror=yes	# (cmd line: -E)
13
+#check_via=yes     # (cmd. line: -v)
14
+#check_via=0
15
+dns=on           # (cmd. line: -r)
16
+rev_dns=yes      # (cmd. line: -R)
17
+port=5069
18
+#port=8060
19
+children=1
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
+#listen=bat.iptel.org
26
+
27
+# ------------------ module loading ----------------------------------
28
+
29
+loadmodule "../sip_router/modules/sl/sl.so"
30
+loadmodule "../sip_router/modules/print/print.so"
31
+#loadmodule "../sip_router/modules/tm/tm.so"
32
+loadmodule "../sip_router/modules/acc/acc.so"
33
+loadmodule "../sip_router/modules/rr/rr.so"
34
+loadmodule "../sip_router/modules/maxfwd/maxfwd.so"
35
+loadmodule "../sip_router/modules/mysql/mysql.so"
36
+loadmodule "../sip_router/modules/usrloc/usrloc.so"
37
+loadmodule "../sip_router/modules/auth/auth.so"
38
+loadmodule "../sip_router/modules/cpl/cpl.so"
39
+
40
+# ----------------- setting module-specific parameters ---------------
41
+
42
+# -- usrloc params --
43
+
44
+modparam("usrloc", "use_database",   1)
45
+modparam("usrloc", "table",          "location")
46
+modparam("usrloc", "user_column",    "user")
47
+modparam("usrloc", "contact_column", "contact")
48
+modparam("usrloc", "expires_column", "expires")
49
+modparam("usrloc", "q_column",       "q")
50
+modparam("usrloc", "callid_column",  "callid")
51
+modparam("usrloc", "cseq_column",    "cseq")
52
+modparam("usrloc", "flush_interval", 60)
53
+modparam("usrloc", "db_url",         "sql://root:@localhost/ser")
54
+
55
+# -- auth params --
56
+
57
+modparam("auth", "db_url",        "sql://root:@localhost/ser")
58
+modparam("auth", "user_column",   "user_id")
59
+# nonce generation secret; particularly useful if multiple servers
60
+# in a proxy farm are configured to authenticate
61
+modparam("auth", "secret",        "439tg8h349g8hq349t9384hg")
62
+# calculate_ha1=false means password column includes ha1 strings;
63
+# if it was false, plain-text passwords would be assumed
64
+
65
+# the database credentials in hashed form
66
+modparam("auth", "calculate_ha1", false)
67
+modparam("auth", "password_column", "ha1")
68
+# password_column, realm_column, group_table, group_user_column,
69
+#   group_group_column are set to their default values
70
+# password_column_2 allows to deal with clients who put domain name
71
+#   in authentication credentials when calculate_ha1=false (if true,
72
+#   it works); if set to a value and USER_DOMAIN_HACK was enabled
73
+#   in defs.h, authentication will still work
74
+modparam("auth", "password_column_2", "ha1b")
75
+
76
+# the database in plain-text alternative:
77
+#modparam("auth", "calculate_ha1", true )
78
+#modparam("auth", "password_column", "password")
79
+
80
+modparam("auth", "nonce_expire",  300)
81
+modparam("auth", "retry_count",   3)
82
+
83
+# -- acc params --
84
+# report ACKs too for sake of completeness -- as we account PSTN
85
+# destinations which are RR, ACKs should show up
86
+modparam("acc", "report_ack", 1)
87
+# don't bother me with early media reports (I don't like 183 
88
+# too much anyway...ever thought of timer C hitting after
89
+# listening to music-on-hold for five minutes?)
90
+modparam("acc", "early_media", 0)
91
+modparam("acc", "log_level", 1)
92
+# that is the flag for which we will account -- don't forget to
93
+# set the same one :-)
94
+modparam("acc", "acc_flag", 1 )
95
+# we are interested only in succesful transactions
96
+modparam("acc", "failed_transactions", 0 )
97
+
98
+# -- tm params --
99
+modparam("tm", "fr_timer", 30 )
100
+modparam("tm", "fr_inv_timer", 60 )
101
+
102
+# -------------------------  request routing logic -------------------
103
+
104
+# main routing logic
105
+
106
+route{
107
+
108
+	# filter local stateless ACK generated by authentication of mf replies
109
+	sl_filter_ACK();
110
+
111
+	# filter too old messages
112
+	log("LOG: Checking maxfwd\n");
113
+	if (!mf_process_maxfwd_header("10")) {
114
+		log("LOG: Too many hops\n");
115
+		sl_send_reply("483","Too Many Hops");
116
+		break;
117
+	};
118
+
119
+	if (method=="REGISTER") {
120
+		log("LOG Request is REGISTER\n");
121
+		if (!www_authorize(	"bat.iptel.org" /* realm */, 
122
+			 				"subscriber" /* table name */ )) {
123
+			log("LOG: REGISTER has no credentials, sending challenge\n");
124
+ 			www_challenge(	"bat.iptel.org" /* realm */, 
125
+							"0" /* no qop -- M$ can't deal with it */);
126
+			break;
127
+		};
128
+		# prohibit attempts to grab someone else's To address 
129
+		# using  valid credentials
130
+		if (!is_user("replicator")) {
131
+			log("LOG: To Cheating attempt\n");
132
+			sl_send_reply("403", "That is ugly -- use To=id next time");
133
+			break;
134
+		};
135
+			
136
+		# update Contact database
137
+       	log("LOG: REGISTER is authorized, saving location\n");
138
+		save_contact("location");
139
+		break;
140
+	};
141
+}