Browse code

userblacklist Reorganize README and add section ID's

The database parameters was at the end of the README, which is not like any
other module.

Olle E. Johansson authored on 17/12/2014 21:17:59
Showing 3 changed files
... ...
@@ -31,6 +31,18 @@ Pawel Kuzak
31 31
 
32 32
               3.1. use_domain (integer)
33 33
               3.2. match_mode (integer)
34
+              3.3. db_url (String)
35
+              3.4. userblacklist_table (String)
36
+              3.5. userblacklist_id_col (string)
37
+              3.6. userblacklist_username_col (string)
38
+              3.7. userblacklist_domain_col (string)
39
+              3.8. userblacklist_prefix_col (string)
40
+              3.9. userblacklist_whitelist_col (string)
41
+              3.10. globalblacklist_table (String)
42
+              3.11. globalblacklist_id_col (string)
43
+              3.12. globalblacklist_prefix_col (string)
44
+              3.13. globalblacklist_whitelist_col (string)
45
+              3.14. globalblacklist_description_col (string)
34 46
 
35 47
         4. Functions
36 48
 
... ...
@@ -51,44 +63,29 @@ Pawel Kuzak
51 51
 
52 52
               6.1. Database setup
53 53
 
54
-   2. Module parameter for database access.
55
-
56
-        1. db_url (String)
57
-        2. userblacklist_table (String)
58
-        3. userblacklist_id_col (string)
59
-        4. userblacklist_username_col (string)
60
-        5. userblacklist_domain_col (string)
61
-        6. userblacklist_prefix_col (string)
62
-        7. userblacklist_whitelist_col (string)
63
-        8. globalblacklist_table (String)
64
-        9. globalblacklist_id_col (string)
65
-        10. globalblacklist_prefix_col (string)
66
-        11. globalblacklist_whitelist_col (string)
67
-        12. globalblacklist_description_col (string)
68
-
69 54
    List of Examples
70 55
 
71 56
    1.1. Set use_domain parameter
72 57
    1.2. Set match_mode parameter
73
-   1.3. check_user_blacklist usage
74
-   1.4. check_user_blacklist usage
75
-   1.5. check_blacklist usage
76
-   1.6. check_whitelist usage
77
-   1.7. reload_blacklist usage
78
-   1.8. Example database content - globalblacklist table
79
-   1.9. Example database content - userblacklist table
80
-   2.1. Set db_url parameter
81
-   2.2. Set userblacklist_table parameter
82
-   2.3. Set userblacklist_id_col parameter
83
-   2.4. Set userblacklist_username_col parameter
84
-   2.5. Set userblacklist_domain_col parameter
85
-   2.6. Set userblacklist_prefix_col parameter
86
-   2.7. Set userblacklist_whitelist_col parameter
87
-   2.8. Set globalblacklist_table parameter
88
-   2.9. Set globalblacklist_id_col parameter
89
-   2.10. Set globalblacklist_prefix_col parameter
90
-   2.11. Set globalblacklist_whitelist_col parameter
91
-   2.12. Set globalblacklist_description_col parameter
58
+   1.3. Set db_url parameter
59
+   1.4. Set userblacklist_table parameter
60
+   1.5. Set userblacklist_id_col parameter
61
+   1.6. Set userblacklist_username_col parameter
62
+   1.7. Set userblacklist_domain_col parameter
63
+   1.8. Set userblacklist_prefix_col parameter
64
+   1.9. Set userblacklist_whitelist_col parameter
65
+   1.10. Set globalblacklist_table parameter
66
+   1.11. Set globalblacklist_id_col parameter
67
+   1.12. Set globalblacklist_prefix_col parameter
68
+   1.13. Set globalblacklist_whitelist_col parameter
69
+   1.14. Set globalblacklist_description_col parameter
70
+   1.15. check_user_blacklist usage
71
+   1.16. check_user_blacklist usage
72
+   1.17. check_blacklist usage
73
+   1.18. check_whitelist usage
74
+   1.19. reload_blacklist usage
75
+   1.20. Example database content - globalblacklist table
76
+   1.21. Example database content - userblacklist table
92 77
 
93 78
 Chapter 1. Admin Guide
94 79
 
... ...
@@ -104,6 +101,18 @@ Chapter 1. Admin Guide
104 104
 
105 105
         3.1. use_domain (integer)
106 106
         3.2. match_mode (integer)
107
+        3.3. db_url (String)
108
+        3.4. userblacklist_table (String)
109
+        3.5. userblacklist_id_col (string)
110
+        3.6. userblacklist_username_col (string)
111
+        3.7. userblacklist_domain_col (string)
112
+        3.8. userblacklist_prefix_col (string)
113
+        3.9. userblacklist_whitelist_col (string)
114
+        3.10. globalblacklist_table (String)
115
+        3.11. globalblacklist_id_col (string)
116
+        3.12. globalblacklist_prefix_col (string)
117
+        3.13. globalblacklist_whitelist_col (string)
118
+        3.14. globalblacklist_description_col (string)
107 119
 
108 120
    4. Functions
109 121
 
... ...
@@ -172,6 +181,18 @@ Chapter 1. Admin Guide
172 172
 
173 173
    3.1. use_domain (integer)
174 174
    3.2. match_mode (integer)
175
+   3.3. db_url (String)
176
+   3.4. userblacklist_table (String)
177
+   3.5. userblacklist_id_col (string)
178
+   3.6. userblacklist_username_col (string)
179
+   3.7. userblacklist_domain_col (string)
180
+   3.8. userblacklist_prefix_col (string)
181
+   3.9. userblacklist_whitelist_col (string)
182
+   3.10. globalblacklist_table (String)
183
+   3.11. globalblacklist_id_col (string)
184
+   3.12. globalblacklist_prefix_col (string)
185
+   3.13. globalblacklist_whitelist_col (string)
186
+   3.14. globalblacklist_description_col (string)
175 187
 
176 188
 3.1. use_domain (integer)
177 189
 
... ...
@@ -201,6 +222,123 @@ modparam("userblacklist", "use_domain", 0)
201 201
 modparam("userblacklist", "match_mode", 128)
202 202
 ...
203 203
 
204
+3.3. db_url (String)
205
+
206
+   URL to the database containing the data.
207
+
208
+   Default value is "mysql://kamailioro:kamailioro@localhost/kamailio".
209
+
210
+   Example 1.3. Set db_url parameter
211
+...
212
+modparam("userblacklist", "db_url", "dbdriver://username:password@dbhost/dbname"
213
+)
214
+...
215
+
216
+3.4. userblacklist_table (String)
217
+
218
+   Name of the userblacklist table for the userblacklist module.
219
+
220
+   Default value is "userblacklist".
221
+
222
+   Example 1.4. Set userblacklist_table parameter
223
+...
224
+modparam("userblacklist", "userblacklist_table", "userblacklist")
225
+...
226
+
227
+3.5. userblacklist_id_col (string)
228
+
229
+   unique ID
230
+
231
+   Example 1.5. Set userblacklist_id_col parameter
232
+...
233
+modparam("userblacklist", "userblacklist_id_col", "id")
234
+...
235
+
236
+3.6. userblacklist_username_col (string)
237
+
238
+   The user that is used for the blacklist lookup.
239
+
240
+   Example 1.6. Set userblacklist_username_col parameter
241
+...
242
+modparam("userblacklist", "userblacklist_username_col", "username")
243
+...
244
+
245
+3.7. userblacklist_domain_col (string)
246
+
247
+   The domain that is used for the blacklist lookup.
248
+
249
+   Example 1.7. Set userblacklist_domain_col parameter
250
+...
251
+modparam("userblacklist", "userblacklist_domain_col", "domain")
252
+...
253
+
254
+3.8. userblacklist_prefix_col (string)
255
+
256
+   The prefix that is matched for the blacklist.
257
+
258
+   Example 1.8. Set userblacklist_prefix_col parameter
259
+...
260
+modparam("userblacklist", "userblacklist_prefix_col", "prefix")
261
+...
262
+
263
+3.9. userblacklist_whitelist_col (string)
264
+
265
+   Specify if this a blacklist (0) or a whitelist (1) entry.
266
+
267
+   Example 1.9. Set userblacklist_whitelist_col parameter
268
+...
269
+modparam("userblacklist", "userblacklist_whitelist_col", "whitelist")
270
+...
271
+
272
+3.10. globalblacklist_table (String)
273
+
274
+   Name of the globalblacklist table for the userblacklist module. Please
275
+   note that this table is used when the check_blacklist function is
276
+   called with no parameters.
277
+
278
+   Default value is "globalblacklist".
279
+
280
+   Example 1.10. Set globalblacklist_table parameter
281
+...
282
+modparam("userblacklist", "globalblacklist_table", "globalblacklist")
283
+...
284
+
285
+3.11. globalblacklist_id_col (string)
286
+
287
+   unique ID
288
+
289
+   Example 1.11. Set globalblacklist_id_col parameter
290
+...
291
+modparam("userblacklist", "globalblacklist_id_col", "id")
292
+...
293
+
294
+3.12. globalblacklist_prefix_col (string)
295
+
296
+   The prefix that is matched for the blacklist.
297
+
298
+   Example 1.12. Set globalblacklist_prefix_col parameter
299
+...
300
+modparam("userblacklist", "globalblacklist_prefix_col", "prefix")
301
+...
302
+
303
+3.13. globalblacklist_whitelist_col (string)
304
+
305
+   Specify if this a blacklist (0) or a whitelist (1) entry.
306
+
307
+   Example 1.13. Set globalblacklist_whitelist_col parameter
308
+...
309
+modparam("userblacklist", "globalblacklist_whitelist_col", "whitelist")
310
+...
311
+
312
+3.14. globalblacklist_description_col (string)
313
+
314
+   A comment for the entry.
315
+
316
+   Example 1.14. Set globalblacklist_description_col parameter
317
+...
318
+modparam("userblacklist", "globalblacklist_description_col", "description")
319
+...
320
+
204 321
 4. Functions
205 322
 
206 323
    4.1. check_user_blacklist (string user, string domain, string number,
... ...
@@ -223,7 +361,7 @@ table)
223 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
-   Example 1.3. check_user_blacklist usage
226
+   Example 1.15. check_user_blacklist usage
227 227
 ...
228 228
 $avp(i:80) = $rU;
229 229
 # rewrite the R-URI
... ...
@@ -244,7 +382,7 @@ table)
244 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
-   Example 1.4. check_user_blacklist usage
247
+   Example 1.16. check_user_blacklist usage
248 248
 ...
249 249
 $avp(i:80) = $rU;
250 250
 # rewrite the R-URI
... ...
@@ -261,7 +399,7 @@ if (!check_user_whitelist("$avp(i:80)", "$avp(i:82)")) {
261 261
    returned. Otherwise, true is returned. If no table is given, then
262 262
    globalblacklist_table is used.
263 263
 
264
-   Example 1.5. check_blacklist usage
264
+   Example 1.17. check_blacklist usage
265 265
 ...
266 266
 if (!check_blacklist("globalblacklist")) {
267 267
         sl_send_reply("403", "Forbidden");
... ...
@@ -275,7 +413,7 @@ if (!check_blacklist("globalblacklist")) {
275 275
    table. If a match is found and it is set to whitelist, true is
276 276
    returned. Otherwise, false is returned.
277 277
 
278
-   Example 1.6. check_whitelist usage
278
+   Example 1.18. check_whitelist usage
279 279
 ...
280 280
 if (!check_whitelist("globalblacklist")) {
281 281
         sl_send_reply("403", "Forbidden");
... ...
@@ -292,7 +430,7 @@ if (!check_whitelist("globalblacklist")) {
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_blacklist usage
295
+   Example 1.19. reload_blacklist usage
296 296
 ...
297 297
 kamctl fifo reload_blacklist
298 298
 ...
... ...
@@ -314,7 +452,7 @@ kamctl fifo reload_blacklist
314 314
    complete database documentation on the project webpage,
315 315
    http://www.kamailio.org/docs/db-tables/kamailio-db-devel.html.
316 316
 
317
-   Example 1.8. Example database content - globalblacklist table
317
+   Example 1.20. Example database content - globalblacklist table
318 318
 ...
319 319
 +----+-----------+-----------+
320 320
 | id | prefix    | whitelist |
... ...
@@ -331,7 +469,7 @@ kamctl fifo reload_blacklist
331 331
    "123455787" are also blacklisted, because the longest prefix will be
332 332
    matched.
333 333
 
334
-   Example 1.9. Example database content - userblacklist table
334
+   Example 1.21. Example database content - userblacklist table
335 335
 ...
336 336
 +----+----------------+-------------+-----------+-----------+
337 337
 | id | username       | domain      | prefix    | whitelist |
... ...
@@ -351,137 +489,3 @@ kamctl fifo reload_blacklist
351 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 353
    "use_domain" parameter is set.
354
-
355
-Chapter 2. Module parameter for database access.
356
-
357
-   Table of Contents
358
-
359
-   1. db_url (String)
360
-   2. userblacklist_table (String)
361
-   3. userblacklist_id_col (string)
362
-   4. userblacklist_username_col (string)
363
-   5. userblacklist_domain_col (string)
364
-   6. userblacklist_prefix_col (string)
365
-   7. userblacklist_whitelist_col (string)
366
-   8. globalblacklist_table (String)
367
-   9. globalblacklist_id_col (string)
368
-   10. globalblacklist_prefix_col (string)
369
-   11. globalblacklist_whitelist_col (string)
370
-   12. globalblacklist_description_col (string)
371
-
372
-1. db_url (String)
373
-
374
-   URL to the database containing the data.
375
-
376
-   Default value is "mysql://kamailioro:kamailioro@localhost/kamailio".
377
-
378
-   Example 2.1. Set db_url parameter
379
-...
380
-modparam("userblacklist", "db_url", "dbdriver://username:password@dbhost/dbname"
381
-)
382
-...
383
-
384
-2. userblacklist_table (String)
385
-
386
-   Name of the userblacklist table for the userblacklist module.
387
-
388
-   Default value is "userblacklist".
389
-
390
-   Example 2.2. Set userblacklist_table parameter
391
-...
392
-modparam("userblacklist", "userblacklist_table", "userblacklist")
393
-...
394
-
395
-3. userblacklist_id_col (string)
396
-
397
-   unique ID
398
-
399
-   Example 2.3. Set userblacklist_id_col parameter
400
-...
401
-modparam("userblacklist", "userblacklist_id_col", "id")
402
-...
403
-
404
-4. userblacklist_username_col (string)
405
-
406
-   The user that is used for the blacklist lookup.
407
-
408
-   Example 2.4. Set userblacklist_username_col parameter
409
-...
410
-modparam("userblacklist", "userblacklist_username_col", "username")
411
-...
412
-
413
-5. userblacklist_domain_col (string)
414
-
415
-   The domain that is used for the blacklist lookup.
416
-
417
-   Example 2.5. Set userblacklist_domain_col parameter
418
-...
419
-modparam("userblacklist", "userblacklist_domain_col", "domain")
420
-...
421
-
422
-6. userblacklist_prefix_col (string)
423
-
424
-   The prefix that is matched for the blacklist.
425
-
426
-   Example 2.6. Set userblacklist_prefix_col parameter
427
-...
428
-modparam("userblacklist", "userblacklist_prefix_col", "prefix")
429
-...
430
-
431
-7. userblacklist_whitelist_col (string)
432
-
433
-   Specify if this a blacklist (0) or a whitelist (1) entry.
434
-
435
-   Example 2.7. Set userblacklist_whitelist_col parameter
436
-...
437
-modparam("userblacklist", "userblacklist_whitelist_col", "whitelist")
438
-...
439
-
440
-8. globalblacklist_table (String)
441
-
442
-   Name of the globalblacklist table for the userblacklist module. Please
443
-   note that this table is used when the check_blacklist function is
444
-   called with no parameters.
445
-
446
-   Default value is "globalblacklist".
447
-
448
-   Example 2.8. Set globalblacklist_table parameter
449
-...
450
-modparam("userblacklist", "globalblacklist_table", "globalblacklist")
451
-...
452
-
453
-9. globalblacklist_id_col (string)
454
-
455
-   unique ID
456
-
457
-   Example 2.9. Set globalblacklist_id_col parameter
458
-...
459
-modparam("userblacklist", "globalblacklist_id_col", "id")
460
-...
461
-
462
-10. globalblacklist_prefix_col (string)
463
-
464
-   The prefix that is matched for the blacklist.
465
-
466
-   Example 2.10. Set globalblacklist_prefix_col parameter
467
-...
468
-modparam("userblacklist", "globalblacklist_prefix_col", "prefix")
469
-...
470
-
471
-11. globalblacklist_whitelist_col (string)
472
-
473
-   Specify if this a blacklist (0) or a whitelist (1) entry.
474
-
475
-   Example 2.11. Set globalblacklist_whitelist_col parameter
476
-...
477
-modparam("userblacklist", "globalblacklist_whitelist_col", "whitelist")
478
-...
479
-
480
-12. globalblacklist_description_col (string)
481
-
482
-   A comment for the entry.
483
-
484
-   Example 2.12. Set globalblacklist_description_col parameter
485
-...
486
-modparam("userblacklist", "globalblacklist_description_col", "description")
487
-...
... ...
@@ -73,7 +73,7 @@
73 73
 	</section>
74 74
 
75 75
 
76
-	<section>
76
+	<section  xmlns:xi="http://www.w3.org/2001/XInclude">
77 77
 	<title>Parameters</title>
78 78
     <section id="userblacklist.p.use_domain">
79 79
 	    <title><varname>use_domain</varname> (integer)</title>
... ...
@@ -118,6 +118,161 @@ modparam("userblacklist", "match_mode", 128)
118 118
 	    </example>
119 119
     </section>
120 120
     
121
+  <section id="userblacklist.p.db_url">
122
+    <title><varname>db_url</varname> (String)</title>
123
+    <para>URL to the database containing the data.</para>
124
+    <para>
125
+      <emphasis>Default value is <quote>&defaultrodb;</quote>.</emphasis>
126
+    </para>
127
+    <example>
128
+      <title>Set <varname>db_url</varname> parameter</title>
129
+      <programlisting format="linespecific">
130
+...
131
+modparam("userblacklist", "db_url", "dbdriver://username:password@dbhost/dbname")
132
+...
133
+</programlisting>
134
+    </example>
135
+  </section>
136
+  <section>
137
+    <title><varname>userblacklist_table</varname> (String)</title>
138
+    <para>Name of the userblacklist table for the userblacklist module.</para>
139
+    <para>
140
+      <emphasis>Default value is <quote>userblacklist</quote>.</emphasis>
141
+    </para>
142
+    <example>
143
+      <title>Set <varname>userblacklist_table</varname> parameter</title>
144
+      <programlisting format="linespecific">
145
+...
146
+modparam("userblacklist", "userblacklist_table", "userblacklist")
147
+...
148
+</programlisting>
149
+    </example>
150
+  </section>
151
+  <section>
152
+    <title><varname>userblacklist_id_col</varname> (string)</title>
153
+    <para>unique ID</para>
154
+    <example>
155
+      <title>Set <varname>userblacklist_id_col</varname> parameter</title>
156
+      <programlisting format="linespecific">
157
+...
158
+modparam("userblacklist", "userblacklist_id_col", "id")
159
+...
160
+</programlisting>
161
+    </example>
162
+  </section>
163
+  <section>
164
+    <title><varname>userblacklist_username_col</varname> (string)</title>
165
+    <para>The user that is used for the blacklist lookup.</para>
166
+    <example>
167
+      <title>Set <varname>userblacklist_username_col</varname> parameter</title>
168
+      <programlisting format="linespecific">
169
+...
170
+modparam("userblacklist", "userblacklist_username_col", "username")
171
+...
172
+</programlisting>
173
+    </example>
174
+  </section>
175
+  <section>
176
+    <title><varname>userblacklist_domain_col</varname> (string)</title>
177
+    <para>The domain that is used for the blacklist lookup.</para>
178
+    <example>
179
+      <title>Set <varname>userblacklist_domain_col</varname> parameter</title>
180
+      <programlisting format="linespecific">
181
+...
182
+modparam("userblacklist", "userblacklist_domain_col", "domain")
183
+...
184
+</programlisting>
185
+    </example>
186
+  </section>
187
+  <section>
188
+    <title><varname>userblacklist_prefix_col</varname> (string)</title>
189
+    <para>The prefix that is matched for the blacklist.</para>
190
+    <example>
191
+      <title>Set <varname>userblacklist_prefix_col</varname> parameter</title>
192
+      <programlisting format="linespecific">
193
+...
194
+modparam("userblacklist", "userblacklist_prefix_col", "prefix")
195
+...
196
+</programlisting>
197
+    </example>
198
+  </section>
199
+  <section>
200
+    <title><varname>userblacklist_whitelist_col</varname> (string)</title>
201
+    <para>Specify if this a blacklist (0) or a whitelist (1) entry.</para>
202
+    <example>
203
+      <title>Set <varname>userblacklist_whitelist_col</varname> parameter</title>
204
+      <programlisting format="linespecific">
205
+...
206
+modparam("userblacklist", "userblacklist_whitelist_col", "whitelist")
207
+...
208
+</programlisting>
209
+    </example>
210
+  </section>
211
+  <section>
212
+    <title><varname>globalblacklist_table</varname> (String)</title>
213
+    <para>Name of the globalblacklist table for the userblacklist module.
214
+    Please note that this table is used when the check_blacklist function is called with no parameters.</para>
215
+    <para>
216
+      <emphasis>Default value is <quote>globalblacklist</quote>.</emphasis>
217
+    </para>
218
+    <example>
219
+      <title>Set <varname>globalblacklist_table</varname> parameter</title>
220
+      <programlisting format="linespecific">
221
+...
222
+modparam("userblacklist", "globalblacklist_table", "globalblacklist")
223
+...
224
+</programlisting>
225
+    </example>
226
+  </section>
227
+  <section>
228
+    <title><varname>globalblacklist_id_col</varname> (string)</title>
229
+    <para>unique ID</para>
230
+    <example>
231
+      <title>Set <varname>globalblacklist_id_col</varname> parameter</title>
232
+      <programlisting format="linespecific">
233
+...
234
+modparam("userblacklist", "globalblacklist_id_col", "id")
235
+...
236
+</programlisting>
237
+    </example>
238
+  </section>
239
+  <section>
240
+    <title><varname>globalblacklist_prefix_col</varname> (string)</title>
241
+    <para>The prefix that is matched for the blacklist.</para>
242
+    <example>
243
+      <title>Set <varname>globalblacklist_prefix_col</varname> parameter</title>
244
+      <programlisting format="linespecific">
245
+...
246
+modparam("userblacklist", "globalblacklist_prefix_col", "prefix")
247
+...
248
+</programlisting>
249
+    </example>
250
+  </section>
251
+  <section>
252
+    <title><varname>globalblacklist_whitelist_col</varname> (string)</title>
253
+    <para>Specify if this a blacklist (0) or a whitelist (1) entry.</para>
254
+    <example>
255
+      <title>Set <varname>globalblacklist_whitelist_col</varname> parameter</title>
256
+      <programlisting format="linespecific">
257
+...
258
+modparam("userblacklist", "globalblacklist_whitelist_col", "whitelist")
259
+...
260
+</programlisting>
261
+    </example>
262
+  </section>
263
+
264
+  <section>
265
+    <title><varname>globalblacklist_description_col</varname> (string)</title>
266
+    <para>A comment for the entry.</para>
267
+    <example>
268
+      <title>Set <varname>globalblacklist_description_col</varname> parameter</title>
269
+      <programlisting format="linespecific">
270
+...
271
+modparam("userblacklist", "globalblacklist_description_col", "description")
272
+...
273
+</programlisting>
274
+    </example>
275
+  </section>
121 276
 
122 277
 </section>
123 278
 <section>
124 279
deleted file mode 100644
... ...
@@ -1,176 +0,0 @@
1
-<?xml version="1.0" encoding='ISO-8859-1'?>
2
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3
-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4
-
5
-<!-- Include general documentation entities -->
6
-<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
7
-%docentities;
8
-
9
-]>
10
-<!--
11
-WARNING:
12
-This file was autogenerated from the XML source file
13
-../../modules/userblacklist/doc/kamailio-userblacklist.xml.
14
-It can be regenerated by running 'make dbdoc' in the db/schema
15
-directory of the source code. You need to have xsltproc and
16
-docbook-xsl stylesheets installed.
17
-ALL CHANGES DONE HERE WILL BE LOST IF THE FILE IS REGENERATED
18
-
19
-<chapter>
20
-  <title>Module parameter for database access.</title>
21
-  <section>
22
-    <title><varname>db_url</varname> (String)</title>
23
-    <para>URL to the database containing the data.</para>
24
-    <para>
25
-      <emphasis>Default value is <quote>&defaultrodb;</quote>.</emphasis>
26
-    </para>
27
-    <example>
28
-      <title>Set <varname>db_url</varname> parameter</title>
29
-      <programlisting format="linespecific">
30
-...
31
-modparam("userblacklist", "db_url", "dbdriver://username:password@dbhost/dbname")
32
-...
33
-</programlisting>
34
-    </example>
35
-  </section>
36
-  <section>
37
-    <title><varname>userblacklist_table</varname> (String)</title>
38
-    <para>Name of the userblacklist table for the userblacklist module.</para>
39
-    <para>
40
-      <emphasis>Default value is <quote>userblacklist</quote>.</emphasis>
41
-    </para>
42
-    <example>
43
-      <title>Set <varname>userblacklist_table</varname> parameter</title>
44
-      <programlisting format="linespecific">
45
-...
46
-modparam("userblacklist", "userblacklist_table", "userblacklist")
47
-...
48
-</programlisting>
49
-    </example>
50
-  </section>
51
-  <section>
52
-    <title><varname>userblacklist_id_col</varname> (string)</title>
53
-    <para>unique ID</para>
54
-    <example>
55
-      <title>Set <varname>userblacklist_id_col</varname> parameter</title>
56
-      <programlisting format="linespecific">
57
-...
58
-modparam("userblacklist", "userblacklist_id_col", "id")
59
-...
60
-</programlisting>
61
-    </example>
62
-  </section>
63
-  <section>
64
-    <title><varname>userblacklist_username_col</varname> (string)</title>
65
-    <para>The user that is used for the blacklist lookup.</para>
66
-    <example>
67
-      <title>Set <varname>userblacklist_username_col</varname> parameter</title>
68
-      <programlisting format="linespecific">
69
-...
70
-modparam("userblacklist", "userblacklist_username_col", "username")
71
-...
72
-</programlisting>
73
-    </example>
74
-  </section>
75
-  <section>
76
-    <title><varname>userblacklist_domain_col</varname> (string)</title>
77
-    <para>The domain that is used for the blacklist lookup.</para>
78
-    <example>
79
-      <title>Set <varname>userblacklist_domain_col</varname> parameter</title>
80
-      <programlisting format="linespecific">
81
-...
82
-modparam("userblacklist", "userblacklist_domain_col", "domain")
83
-...
84
-</programlisting>
85
-    </example>
86
-  </section>
87
-  <section>
88
-    <title><varname>userblacklist_prefix_col</varname> (string)</title>
89
-    <para>The prefix that is matched for the blacklist.</para>
90
-    <example>
91
-      <title>Set <varname>userblacklist_prefix_col</varname> parameter</title>
92
-      <programlisting format="linespecific">
93
-...
94
-modparam("userblacklist", "userblacklist_prefix_col", "prefix")
95
-...
96
-</programlisting>
97
-    </example>
98
-  </section>
99
-  <section>
100
-    <title><varname>userblacklist_whitelist_col</varname> (string)</title>
101
-    <para>Specify if this a blacklist (0) or a whitelist (1) entry.</para>
102
-    <example>
103
-      <title>Set <varname>userblacklist_whitelist_col</varname> parameter</title>
104
-      <programlisting format="linespecific">
105
-...
106
-modparam("userblacklist", "userblacklist_whitelist_col", "whitelist")
107
-...
108
-</programlisting>
109
-    </example>
110
-  </section>
111
-  <section>
112
-    <title><varname>globalblacklist_table</varname> (String)</title>
113
-    <para>Name of the globalblacklist table for the userblacklist module.
114
-    Please note that this table is used when the check_blacklist function is called with no parameters.</para>
115
-    <para>
116
-      <emphasis>Default value is <quote>globalblacklist</quote>.</emphasis>
117
-    </para>
118
-    <example>
119
-      <title>Set <varname>globalblacklist_table</varname> parameter</title>
120
-      <programlisting format="linespecific">
121
-...
122
-modparam("userblacklist", "globalblacklist_table", "globalblacklist")
123
-...
124
-</programlisting>
125
-    </example>
126
-  </section>
127
-  <section>
128
-    <title><varname>globalblacklist_id_col</varname> (string)</title>
129
-    <para>unique ID</para>
130
-    <example>
131
-      <title>Set <varname>globalblacklist_id_col</varname> parameter</title>
132
-      <programlisting format="linespecific">
133
-...
134
-modparam("userblacklist", "globalblacklist_id_col", "id")
135
-...
136
-</programlisting>
137
-    </example>
138
-  </section>
139
-  <section>
140
-    <title><varname>globalblacklist_prefix_col</varname> (string)</title>
141
-    <para>The prefix that is matched for the blacklist.</para>
142
-    <example>
143
-      <title>Set <varname>globalblacklist_prefix_col</varname> parameter</title>
144
-      <programlisting format="linespecific">
145
-...
146
-modparam("userblacklist", "globalblacklist_prefix_col", "prefix")
147
-...
148
-</programlisting>
149
-    </example>
150
-  </section>
151
-  <section>
152
-    <title><varname>globalblacklist_whitelist_col</varname> (string)</title>
153
-    <para>Specify if this a blacklist (0) or a whitelist (1) entry.</para>
154
-    <example>
155
-      <title>Set <varname>globalblacklist_whitelist_col</varname> parameter</title>
156
-      <programlisting format="linespecific">
157
-...
158
-modparam("userblacklist", "globalblacklist_whitelist_col", "whitelist")
159
-...
160
-</programlisting>
161
-    </example>
162
-  </section>
163
-  <section>
164
-    <title><varname>globalblacklist_description_col</varname> (string)</title>
165
-    <para>A comment for the entry.</para>
166
-    <example>
167
-      <title>Set <varname>globalblacklist_description_col</varname> parameter</title>
168
-      <programlisting format="linespecific">
169
-...
170
-modparam("userblacklist", "globalblacklist_description_col", "description")
171
-...
172
-</programlisting>
173
-    </example>
174
-  </section>
175
-</chapter>