Browse code

userblacklist Adding section IDs to documentation

Olle E. Johansson authored on 17/12/2014 21:05:04
Showing 2 changed files
... ...
@@ -14,7 +14,7 @@ Pawel Kuzak
14 14
    1&1 Internet AG
15 15
    <pawel.kuzak@1und1.de>
16 16
 
17
-   Copyright © 2008 1&1 Internet AG
17
+   Copyright � 2008 1&1 Internet AG
18 18
      __________________________________________________________________
19 19
 
20 20
    Table of Contents
... ...
@@ -74,7 +74,7 @@ Pawel Kuzak
74 74
    1.4. check_user_blacklist usage
75 75
    1.5. check_blacklist usage
76 76
    1.6. check_whitelist usage
77
-   1.7. reload_blacklists usage
77
+   1.7. reload_blacklist usage
78 78
    1.8. Example database content - globalblacklist table
79 79
    1.9. Example database content - userblacklist table
80 80
    2.1. Set db_url parameter
... ...
@@ -134,15 +134,15 @@ Chapter 1. Admin Guide
134 134
    An additional functionality that this module provides is the ability to
135 135
    handle global blacklists. This lists are loaded on startup into memory,
136 136
    thus providing a better performance then in the userblacklist case.
137
-   This global blacklists are useful to only allow calls to certain
137
+   These global blacklists are useful to only allow calls to certain
138 138
    international destinations, i.e. block all not whitelisted numbers.
139 139
    They could also used to prevent the blacklisting of important numbers,
140 140
    as whitelisting is supported too. This is useful for example to prevent
141 141
    the customer from blocking emergency call number or service hotlines.
142 142
 
143
-   The module exports three functions, check_blacklist
143
+   The module exports four functions, check_blacklist, check_whitelist,
144 144
    check_user_blacklist and check_user_whitelist for usage in the config
145
-   file. Furthermore its provide a FIFO function to reload the global
145
+   file. Furthermore its provides a MI function to reload the global
146 146
    blacklist cache.
147 147
 
148 148
    Please note that only numerical strings for matching are supported at
... ...
@@ -178,7 +178,7 @@ Chapter 1. Admin Guide
178 178
    If set to non-zero value, the domain column in the userblacklist is
179 179
    used.
180 180
 
181
-   Default value is “0”.
181
+   Default value is "0".
182 182
 
183 183
    Example 1.1. Set use_domain parameter
184 184
 ...
... ...
@@ -190,11 +190,11 @@ modparam("userblacklist", "use_domain", 0)
190 190
    The number of individual characters that are used for matching. Valid
191 191
    values are 10 or 128. When you specifiy 10, only digits will be used
192 192
    for matching, this operation mode is equivalent to the old behaviour.
193
-   When configured with 128, all standard ascii chars are available for
193
+   When configured with 128, all standard ASCII chars are available for
194 194
    matching. Please be aware that memory requirements for storing the
195 195
    routing tree in shared memory will also increase by a factor of 12.8.
196 196
 
197
-   Default value is “10”.
197
+   Default value is "10".
198 198
 
199 199
    Example 1.2. Set match_mode parameter
200 200
 ...
... ...
@@ -212,7 +212,7 @@ modparam("userblacklist", "match_mode", 128)
212 212
    4.3. check_blacklist ([string table])
213 213
    4.4. check_whitelist (string table)
214 214
 
215
-4.1.  check_user_blacklist (string user, string domain, string number, string
215
+4.1. check_user_blacklist (string user, string domain, string number, string
216 216
 table)
217 217
 
218 218
    Finds the longest prefix that matches the request URI user (or the
... ...
@@ -220,7 +220,7 @@ table)
220 220
    If a match is found and it is not set to whitelist, false is returned.
221 221
    Otherwise, true is returned. Pseudo-variables or AVPs can be used for
222 222
    the user, domain and number parameters. The number and table variables
223
-   are optional, the defaults are used if they are ommited. The number
223
+   are optional, the defaults are used if they are omitted. The number
224 224
    parameter can be used to check for example against the from URI user.
225 225
 
226 226
    Example 1.3. check_user_blacklist usage
... ...
@@ -233,7 +233,7 @@ if (!check_user_blacklist("$avp(i:80)", "$avp(i:82)")) {
233 233
 }
234 234
 ...
235 235
 
236
-4.2.  check_user_whitelist (string user, string domain, string number, string
236
+4.2. check_user_whitelist (string user, string domain, string number, string
237 237
 table)
238 238
 
239 239
    Finds the longest prefix that matches the request URI user (or the
... ...
@@ -241,7 +241,7 @@ table)
241 241
    If a match is found and it is set to whitelist, true is returned.
242 242
    Otherwise, false is returned. Pseudo-variables or AVPs can be used for
243 243
    the user, domain and number parameters. The number and table variables
244
-   are optional, the defaults are used if they are ommited. The number
244
+   are optional, the defaults are used if they are omitted. The number
245 245
    parameter can be used to check for example against the from URI user.
246 246
 
247 247
    Example 1.4. check_user_blacklist usage
... ...
@@ -254,7 +254,7 @@ if (!check_user_whitelist("$avp(i:80)", "$avp(i:82)")) {
254 254
 }
255 255
 ...
256 256
 
257
-4.3.  check_blacklist ([string table])
257
+4.3. check_blacklist ([string table])
258 258
 
259 259
    Finds the longest prefix that matches the request URI for the given
260 260
    table. If a match is found and it is not set to whitelist, false is
... ...
@@ -269,7 +269,7 @@ if (!check_blacklist("globalblacklist")) {
269 269
 }
270 270
 ...
271 271
 
272
-4.4.  check_whitelist (string table)
272
+4.4. check_whitelist (string table)
273 273
 
274 274
    Finds the longest prefix that matches the request URI for the given
275 275
    table. If a match is found and it is set to whitelist, true is
... ...
@@ -287,12 +287,12 @@ if (!check_whitelist("globalblacklist")) {
287 287
 
288 288
    5.1. reload_blacklist
289 289
 
290
-5.1.  reload_blacklist
290
+5.1. reload_blacklist
291 291
 
292 292
    Reload the internal global blacklist cache. This is necessary after the
293 293
    database tables for the global blacklist have been changed.
294 294
 
295
-   Example 1.7. reload_blacklists usage
295
+   Example 1.7. reload_blacklist usage
296 296
 ...
297 297
 kamctl fifo reload_blacklist
298 298
 ...
... ...
@@ -303,10 +303,10 @@ kamctl fifo reload_blacklist
303 303
 
304 304
 6.1. Database setup
305 305
 
306
-   Before running Kamailio with userblacklist, you have to setup the
307
-   database table where the module will read the blacklist data. For that,
308
-   if the table was not created by the installation script or you choose
309
-   to install everything by yourself you can use the
306
+   Before running Kamailio with the userblacklist module, you have to
307
+   setup the database table where the module will read the blacklist data.
308
+   For that, if the table was not created by the installation script or
309
+   you choose to install everything by yourself you can use the
310 310
    userblacklist-create.sql SQL script in the database directories in the
311 311
    kamailio/scripts folder as template. Database and table name can be set
312 312
    with module parameters so they can be changed, but the name of the
... ...
@@ -327,8 +327,8 @@ kamctl fifo reload_blacklist
327 327
 ...
328 328
 
329 329
    This table will setup a global blacklist for all numbers, only allowing
330
-   calls starting with “1”. Numbers that starting with “123456” and
331
-   “123455787” are also blacklisted, because the longest prefix will be
330
+   calls starting with "1". Numbers that starts with "123456" and
331
+   "123455787" are also blacklisted, because the longest prefix will be
332 332
    matched.
333 333
 
334 334
    Example 1.9. Example database content - userblacklist table
... ...
@@ -347,10 +347,10 @@ kamctl fifo reload_blacklist
347 347
 ...
348 348
 
349 349
    This table will setup user specific blacklists for certain usernames.
350
-   For example for user “49721123456788” the prefix “1234” will be not
351
-   allowed, but the number “123456788” is allowed. Additionally a domain
350
+   For example for user "49721123456788" the prefix "1234" will be not
351
+   allowed, but the number "123456788" is allowed. Additionally a domain
352 352
    could be specified that is used for username matching if the
353
-   “use_domain” parameter is set.
353
+   "use_domain" parameter is set.
354 354
 
355 355
 Chapter 2. Module parameter for database access.
356 356
 
... ...
@@ -373,7 +373,7 @@ Chapter 2. Module parameter for database access.
373 373
 
374 374
    URL to the database containing the data.
375 375
 
376
-   Default value is “mysql://kamailioro:kamailioro@localhost/kamailio”.
376
+   Default value is "mysql://kamailioro:kamailioro@localhost/kamailio".
377 377
 
378 378
    Example 2.1. Set db_url parameter
379 379
 ...
... ...
@@ -385,7 +385,7 @@ modparam("userblacklist", "db_url", "dbdriver://username:password@dbhost/dbname"
385 385
 
386 386
    Name of the userblacklist table for the userblacklist module.
387 387
 
388
-   Default value is “userblacklist”.
388
+   Default value is "userblacklist".
389 389
 
390 390
    Example 2.2. Set userblacklist_table parameter
391 391
 ...
... ...
@@ -443,7 +443,7 @@ modparam("userblacklist", "userblacklist_whitelist_col", "whitelist")
443 443
    note that this table is used when the check_blacklist function is
444 444
    called with no parameters.
445 445
 
446
-   Default value is “globalblacklist”.
446
+   Default value is "globalblacklist".
447 447
 
448 448
    Example 2.8. Set globalblacklist_table parameter
449 449
 ...
... ...
@@ -22,7 +22,7 @@
22 22
 	An additional functionality that this module provides is the ability
23 23
 	to handle global blacklists. This lists are loaded on startup into
24 24
 	memory, thus providing a better performance then in the userblacklist
25
-	case. This global blacklists are useful to only allow calls to certain 
25
+	case. These global blacklists are useful to only allow calls to certain 
26 26
 	international destinations, i.e. block all not whitelisted numbers.
27 27
 	They could also used to prevent the blacklisting of important	
28 28
 	numbers, as whitelisting is supported too. This is useful for example
... ...
@@ -30,9 +30,10 @@
30 30
 	hotlines.
31 31
 	</para>
32 32
 	<para>
33
-	The module exports three functions, <emphasis>check_blacklist</emphasis>
34
-	<emphasis>check_user_blacklist</emphasis> and <emphasis>check_user_whitelist</emphasis>
35
-	for usage in the config file. Furthermore its provide a FIFO function to
33
+	The module exports four functions, <function>check_blacklist</function>,
34
+	<function>check_whitelist</function>,
35
+	<function>check_user_blacklist</function> and <function>check_user_whitelist</function>
36
+	for usage in the config file. Furthermore its provides a MI function to
36 37
 	reload the global blacklist cache.
37 38
 	</para>
38 39
 	<para>
... ...
@@ -74,7 +75,7 @@
74 74
 
75 75
 	<section>
76 76
 	<title>Parameters</title>
77
-    <section>
77
+    <section id="userblacklist.p.use_domain">
78 78
 	    <title><varname>use_domain</varname> (integer)</title>
79 79
 	    <para>
80 80
 			If set to non-zero value, the domain column in the userblacklist is used.
... ...
@@ -93,14 +94,14 @@ modparam("userblacklist", "use_domain", 0)
93 93
 		    </programlisting>
94 94
 	    </example>
95 95
     </section>
96
-    <section>
96
+    <section id="userblacklist.p.match_mode">
97 97
     	    <title><varname>match_mode</varname> (integer)</title>
98 98
 	    <para>
99
-The number of individual characters that are used for matching. 
100
-Valid values are 10 or 128. When you specifiy 10, only digits will be used for matching, 
101
-this operation mode is equivalent to the old behaviour. When configured with 128, 
102
-all standard ascii chars are available for matching. Please be aware that memory 
103
-requirements for storing the routing tree in shared memory will also increase by a factor of 12.8.
99
+		The number of individual characters that are used for matching. 
100
+		Valid values are 10 or 128. When you specifiy 10, only digits will be used for matching, 
101
+		this operation mode is equivalent to the old behaviour. When configured with 128, 
102
+		all standard ASCII chars are available for matching. Please be aware that memory 
103
+		requirements for storing the routing tree in shared memory will also increase by a factor of 12.8.
104 104
 	    </para>
105 105
 	    <para>
106 106
 		    <emphasis>
... ...
@@ -121,7 +122,7 @@ modparam("userblacklist", "match_mode", 128)
121 121
 </section>
122 122
 <section>
123 123
 	<title>Functions</title>
124
-	<section>
124
+    	<section id="userblacklist.f.check_user_blacklist">
125 125
 	    <title>
126 126
 		<function moreinfo="none">check_user_blacklist (string user, string domain, string number, string table)</function>
127 127
 	    </title>
... ...
@@ -131,7 +132,7 @@ modparam("userblacklist", "match_mode", 128)
131 131
 		If a match is found and it is not set to whitelist, false is returned.
132 132
 		Otherwise, true is returned. Pseudo-variables or AVPs can be used for
133 133
 		the user, domain and number parameters. The number and table variables
134
-		are optional, the defaults are used if they are ommited. The number
134
+		are optional, the defaults are used if they are omitted. The number
135 135
 		parameter can be used to check for example against the from URI user.
136 136
 	    </para>
137 137
 	<example>
... ...
@@ -148,7 +149,7 @@ if (!check_user_blacklist("$avp(i:80)", "$avp(i:82)")) {
148 148
 		</programlisting>
149 149
 	    </example>
150 150
 	</section>
151
-	<section>
151
+    	<section id="userblacklist.f.check_user_whitelist">
152 152
 	    <title>
153 153
 		<function moreinfo="none">check_user_whitelist (string user, string domain, string number, string table)</function>
154 154
 	    </title>
... ...
@@ -158,7 +159,7 @@ if (!check_user_blacklist("$avp(i:80)", "$avp(i:82)")) {
158 158
 		If a match is found and it is set to whitelist, true is returned.
159 159
 		Otherwise, false is returned. Pseudo-variables or AVPs can be used for
160 160
 		the user, domain and number parameters. The number and table variables
161
-		are optional, the defaults are used if they are ommited. The number
161
+		are optional, the defaults are used if they are omitted. The number
162 162
 		parameter can be used to check for example against the from URI user.
163 163
 	    </para>
164 164
 	<example>
... ...
@@ -175,7 +176,7 @@ if (!check_user_whitelist("$avp(i:80)", "$avp(i:82)")) {
175 175
 		</programlisting>
176 176
 	    </example>
177 177
 	</section>
178
-	<section>
178
+    	<section id="userblacklist.f.check_blacklist">
179 179
 	    <title>
180 180
 		<function moreinfo="none">check_blacklist ([string table])</function>
181 181
 	    </title>
... ...
@@ -197,7 +198,7 @@ if (!check_blacklist("globalblacklist")) {
197 197
 		</programlisting>
198 198
 	    </example>
199 199
 	</section>
200
-	<section>
200
+    	<section id="userblacklist.f.check_whitelist">
201 201
 	    <title>
202 202
 		<function moreinfo="none">check_whitelist (string table)</function>
203 203
 	    </title>
... ...
@@ -231,7 +232,7 @@ if (!check_whitelist("globalblacklist")) {
231 231
 		the database tables for the global blacklist have been changed.
232 232
 	    </para>
233 233
 	<example>
234
-		<title><function>reload_blacklists</function> usage</title>
234
+		<title><function>reload_blacklist</function> usage</title>
235 235
 		<programlisting format="linespecific">
236 236
 ...
237 237
 &ctltool; fifo reload_blacklist
... ...
@@ -245,7 +246,7 @@ if (!check_whitelist("globalblacklist")) {
245 245
 	<section>
246 246
 		<title>Database setup</title>
247 247
 		<para>
248
-			Before running &kamailio; with userblacklist, you have to setup the database 
248
+			Before running &kamailio; with the userblacklist module, you have to setup the database 
249 249
 			table where the module will read the blacklist data. For that, if 
250 250
 			the table was not created by the installation script or you choose
251 251
 			to install everything by yourself you can use the userblacklist-create.sql
... ...
@@ -275,7 +276,7 @@ if (!check_whitelist("globalblacklist")) {
275 275
 	</example>
276 276
 	<para>
277 277
 		This table will setup a global blacklist for all numbers, only allowing calls
278
-		starting with <quote>1</quote>. Numbers that starting with <quote>123456</quote>
278
+		starting with <quote>1</quote>. Numbers that starts with <quote>123456</quote>
279 279
 		and <quote>123455787</quote> are also blacklisted, because the longest prefix
280 280
 		will be matched.
281 281
 	</para>