Browse code

modules_k/*: moved k modules in directory modules/

Daniel-Constantin Mierla authored on 20/01/2013 11:57:52
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,412 +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
-<!-- Domain Module User's Guide -->
11
-
12
-<chapter>
13
-	
14
-	<title>&adminguide;</title>
15
-	
16
-	<section>
17
-	<title>Overview</title>
18
-	<para>
19
-		Domain module implements checks that based on domain table
20
-		determine if a domain is <quote>local</quote>.
21
-		A <quote>local</quote> domain is one that the proxy is
22
-		responsible for.  SIP URIs of local users must have hostpart
23
-		that is equal to one of these domains.
24
-	</para>
25
-	<para>
26
-		Domain module reads the contents of domain and domain_attrs
27
-		tables into cache memory when the module is loaded.
28
-		Any changes in domain or domain_attrs tables must thus be
29
-		followed by <quote>domain.reload</quote> rpc command in
30
-		order to reflect them in module behavior.
31
-	</para>
32
-	<para>
33
-		Caching is implemented using a hash table. The size of
34
-		the hash table is given by HASH_SIZE constant defined in
35
-		domain_mod.h. Its <quote>factory default</quote> value is 128.
36
-	</para>
37
-	</section>
38
-
39
-	<section>
40
-	<title>Dependencies</title>
41
-	<para>
42
-		The module depends on the following modules (in the other words the 
43
-		listed modules must be loaded before this module):
44
-		<itemizedlist>
45
-		<listitem>
46
-			<para><emphasis>database</emphasis> -- Any database module</para>
47
-		</listitem>
48
-		</itemizedlist>
49
-	</para>
50
-	</section>
51
-
52
-	<section>
53
-	<title>Parameters</title>
54
-	<section>
55
-		<title><varname>db_url</varname> (string)</title>
56
-		<para>
57
-		This is <acronym>URL</acronym> of the database to be used.
58
-		</para>
59
-		<para>
60
-		Default value is 
61
-			<quote>&defaultrodb;</quote>
62
-		</para>
63
-		<example>
64
-		<title>Setting db_url parameter</title>
65
-		<programlisting format="linespecific">
66
-modparam("domain", "db_url", "mysql://ser:pass@db_host/ser")
67
-</programlisting>
68
-		</example>
69
-	</section>
70
-	<section>
71
-		<title><varname>domain_table</varname> (string)</title>
72
-		<para>
73
-		Name of table containing names of local domains that the proxy is 
74
-		responsible for.
75
-		</para>
76
-		<para>
77
-		Default value is <quote>domain</quote>.
78
-		</para>
79
-		<example>
80
-		<title>Setting domain_table parameter</title>
81
-		<programlisting format="linespecific">
82
-modparam("domain", "domain_table", "new_name")
83
-</programlisting>
84
-		</example>
85
-	</section>
86
-	<section>
87
-		<title><varname>domain_attrs_table</varname> (string)</title>
88
-		<para>
89
-		Name of table containing attributes of local domains.
90
-		</para>
91
-		<para>
92
-		Default value is <quote>domain_attrs</quote>.
93
-		</para>
94
-		<example>
95
-		<title>Setting domain_attrs_table parameter</title>
96
-		<programlisting format="linespecific">
97
-modparam("domain", "domain_attrs_table", "local_domain_attributes")
98
-</programlisting>
99
-		</example>
100
-	</section>
101
-	<section>
102
-		<title><varname>did_col</varname> (string)</title>
103
-		<para>
104
-		Name of column containing domain id (did) of domain in domain
105
-		and domain_attrs tables.  In domain table, a did column value
106
-		may be NULL, which means that it has same value as
107
-		domain column.
108
-		</para>
109
-		<para>
110
-		Default value is <quote>did</quote>.
111
-		</para>
112
-		<example>
113
-		<title>Setting did_col parameter</title>
114
-		<programlisting format="linespecific">
115
-modparam("domain", "did_col", "domain_did")
116
-</programlisting>
117
-		</example>
118
-	</section>
119
-	<section>
120
-		<title><varname>domain_col</varname> (string)</title>
121
-		<para>
122
-		Name of column containing domain name in domain table.
123
-		</para>
124
-		<para>
125
-		Default value is <quote>domain</quote>.
126
-		</para>
127
-		<example>
128
-		<title>Setting domain_col parameter</title>
129
-		<programlisting format="linespecific">
130
-modparam("domain", "domain_col", "domain_name")
131
-</programlisting>
132
-		</example>
133
-	</section>
134
-	<section>
135
-		<title><varname>name_col</varname> (string)</title>
136
-		<para>
137
-		Name of column containing attribute name in domain_attrs table.
138
-		</para>
139
-		<para>
140
-		Default value is <quote>name</quote>.
141
-		</para>
142
-		<example>
143
-		<title>Setting name_col parameter</title>
144
-		<programlisting format="linespecific">
145
-modparam("domain", "name_col", "attr_name")
146
-</programlisting>
147
-		</example>
148
-	</section>
149
-	<section>
150
-		<title><varname>type_col</varname> (string)</title>
151
-		<para>
152
-		Name of column containing attribute type in domain_attrs table.
153
-		Type value 0 is integer and type value 2 is string.
154
-		</para>
155
-		<para>
156
-		Default value is <quote>type</quote>.
157
-		</para>
158
-		<example>
159
-		<title>Setting name_col parameter</title>
160
-		<programlisting format="linespecific">
161
-modparam("domain", "type_col", "attr_type")
162
-</programlisting>
163
-		</example>
164
-	</section>
165
-	<section>
166
-		<title><varname>value_col</varname> (string)</title>
167
-		<para>
168
-		Name of column containing attribute value in domain_attrs table.
169
-		</para>
170
-		<para>
171
-		Default value is <quote>value</quote>.
172
-		</para>
173
-		<example>
174
-		<title>Setting value_col parameter</title>
175
-		<programlisting format="linespecific">
176
-modparam("domain", "value_col", "attr_value")
177
-</programlisting>
178
-		</example>
179
-	</section>
180
-	<section>
181
-		<title><varname>register_myself</varname> (integer)</title>
182
-		<para>
183
-			Register the list of domains to match 'myself' check:
184
-			0 means no myself registration, 1 means enable myself
185
-			registration.
186
-		</para>
187
-		<para>
188
-		Default value is 0 (disable).
189
-		</para>
190
-		<example>
191
-		<title>register_myself example</title>
192
-		<programlisting format="linespecific">
193
-modparam("domain", "register_myself", 1)
194
-</programlisting>
195
-		</example>
196
-	</section>
197
-
198
-	
199
-	</section>
200
-	<section>
201
-	<title>Functions</title>
202
-	<section>
203
-		<title><function moreinfo="none">is_from_local()</function></title>
204
-		<para>
205
-		Checks based on domain table if host part of From header uri is
206
-		one of the local domains that the proxy is responsible for
207
-		</para>
208
-		<para>
209
-		This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
210
-		BRANCH_ROUTE, and LOCAL_ROUTE.
211
-		</para>
212
-		<example>
213
-		<title>is_from_local usage</title>
214
-		<programlisting format="linespecific">
215
-...
216
-if (is_from_local()) {
217
-	...
218
-};
219
-...
220
-		</programlisting>
221
-		</example>
222
-	</section>
223
-	<section>
224
-		<title><function moreinfo="none">is_uri_host_local()</function></title>
225
-		<para>
226
-		If called from route or failure route block, checks
227
-		based on domain table if host part of Request-URI is one
228
-		of the local domains that the proxy is responsible for.
229
-		If called from branch route, the test is made on host
230
-		part of URI of first branch, which thus must have been
231
-		appended to the transaction before is_uri_host_local()
232
-		is called.
233
-		</para>
234
-		<para>
235
-		This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
236
-		BRANCH_ROUTE, and LOCAL_ROUTE.
237
-		</para>
238
-		<example>
239
-		<title>is_uri_host_local usage</title>
240
-		<programlisting format="linespecific">
241
-...
242
-if (is_uri_host_local()) {
243
-	...
244
-};
245
-...
246
-		</programlisting>
247
-		</example>
248
-	</section>
249
-	<section>
250
-		<title><function moreinfo="none">is_domain_local(pseudo_variable)</function></title>
251
-		<para>
252
-		This function checks if the domain contained in the
253
-		pseudo_variable is local.
254
-		</para>
255
-		<para>
256
-		This function is a generalized form of the is_from_local()
257
-		and is_uri_host_local() functions, being able to completely
258
-		replace them and also extends them by allowing the domain to
259
-		be taken from any of the above mentioned sources.
260
-                The following equivalences exist:
261
-		</para>
262
-		<itemizedlist>
263
-		<listitem><para>
264
-			is_domain_local("$rd") is same as is_uri_host_local()
265
-		</para></listitem>
266
-		<listitem><para>
267
-			is_domain_local("$fd") is same as is_from_local()
268
-		</para></listitem>
269
-		</itemizedlist>
270
-		<para>
271
-		This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
272
-		BRANCH_ROUTE, and LOCAL_ROUTE.
273
-		</para>
274
-		<example>
275
-		<title>is_domain_local usage</title>
276
-		<programlisting format="linespecific">
277
-...
278
-if (is_domain_local("$rd")) {
279
-	...
280
-};
281
-if (is_domain_local("$fd")) {
282
-	...
283
-};
284
-if (is_domain_local("$avp(some_avp_alias)")) {
285
-	...
286
-};
287
-if (is_domain_local("$avp(i:850)")) {
288
-	...
289
-};
290
-if (is_domain_local("$avp(s:some_avp)")) {
291
-	...
292
-};
293
-...
294
-		</programlisting>
295
-		</example>
296
-	</section>
297
-	<section>
298
-		<title><function moreinfo="none">lookup_domain(domain[, prefix])</function></title>
299
-		<para>
300
-		This function checks if domain given in
301
-		domain argument (pseudo variable) is local and, if so,
302
-		adds attributes
303
-		associated with domain's id (did) to AVPs.  If prefix
304
-		argument (string) is given, names of attributes are prefixes by
305
-		it.  In addition to attributes given in domain_attrs
306
-		table, AVP did containing did of domain is added.
307
-		</para>
308
-		<para>
309
-		This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
310
-		BRANCH_ROUTE, and LOCAL_ROUTE.
311
-		</para>
312
-		<example>
313
-		<title>lookup_domain</title>
314
-		<programlisting format="linespecific">
315
-...
316
-if (lookup_domain("$fd", "from_")) {
317
-    xlog("L_INFO", "did of domain $fd is $avp(from_did)\n");
318
-}
319
-...
320
-		</programlisting>
321
-		</example>
322
-	</section>
323
-	</section>
324
-	<section>
325
-	<title>MI Commands</title>
326
-	<section>
327
-		<title><function moreinfo="none">domain_reload</function></title>
328
-		<para>
329
-		Causes domain module to re-read the contents of domain table
330
-		into cache memory.
331
-		</para>
332
-		<para>
333
-		Name: <emphasis>domain_reload</emphasis>
334
-		</para>
335
-		<para>Parameters: <emphasis>none</emphasis></para>
336
- 		<para>
337
-		MI FIFO Command Format:
338
-		</para>
339
-        <programlisting  format="linespecific">
340
-		:domain_reload:_reply_fifo_file_
341
-		_empty_line_
342
-		</programlisting>
343
-		
344
-	</section>
345
-	<section>
346
-		<title><function moreinfo="none">domain_dump</function></title>
347
-		<para>
348
-		Causes domain module to dump hash indexes and domain names in
349
-		its cache memory.
350
-		</para>
351
-		<para>
352
-		Name: <emphasis>domain_dump</emphasis>
353
-		</para>
354
-		<para>Parameters: <emphasis>none</emphasis></para>
355
- 		<para>
356
-		MI FIFO Command Format:
357
-		</para>
358
-        <programlisting  format="linespecific">
359
-		:domain_dump:_reply_fifo_file_
360
-		_empty_line_
361
-		</programlisting>
362
-	</section>
363
-	</section>
364
-	<section>
365
-	<title>Exported RPC Commands</title>
366
-	<section>
367
-		<title><function moreinfo="none">domain.reload</function></title>
368
-		<para>
369
-		Causes domain module to re-read the contents of domain table
370
-		into cache memory.
371
-		</para>
372
-		<para>
373
-		Name: <emphasis>domain.reload</emphasis>
374
-		</para>
375
-		<para>Parameters: <emphasis>none</emphasis></para>
376
-		<para>
377
-		Example:
378
-		</para>
379
-        <programlisting  format="linespecific">
380
-		&sercmd; domain.reload
381
-		</programlisting>
382
-	</section>
383
-	<section>
384
-		<title><function moreinfo="none">domain.dump</function></title>
385
-		<para>
386
-		Causes domain module to dump domain names in
387
-		its cache memory.
388
-		</para>
389
-		<para>
390
-		Name: <emphasis>domain.dump</emphasis>
391
-		</para>
392
-		<para>Parameters: <emphasis>none</emphasis></para>
393
-		<para>
394
-		Example:
395
-		</para>
396
-        <programlisting  format="linespecific">
397
-		&sercmd; domain.dump
398
-		</programlisting>
399
-	</section>
400
-	</section>
401
-	<section>
402
-	<title>Known Limitations</title>
403
-	<para>
404
-		There is an unlikely race condition on domain reload.  If a 
405
-		process uses a table, which is reloaded at the same time twice 
406
-		through <acronym>FIFO</acronym> or <acronym>RPC</acronym>,
407
-		the second reload will delete the  
408
-		original table still in use by the process.
409
-	</para>
410
-	</section>
411
-</chapter>
412
-
Browse code

Change "sercmd" to "kamcmd" in module documentation files - README

Olle E. Johansson authored on 23/12/2012 08:31:28
Showing 1 changed files
... ...
@@ -377,7 +377,7 @@ if (lookup_domain("$fd", "from_")) {
377 377
 		Example:
378 378
 		</para>
379 379
         <programlisting  format="linespecific">
380
-		sercmd domain.reload
380
+		&sercmd; domain.reload
381 381
 		</programlisting>
382 382
 	</section>
383 383
 	<section>
... ...
@@ -394,7 +394,7 @@ if (lookup_domain("$fd", "from_")) {
394 394
 		Example:
395 395
 		</para>
396 396
         <programlisting  format="linespecific">
397
-		sercmd domain.dump
397
+		&sercmd; domain.dump
398 398
 		</programlisting>
399 399
 	</section>
400 400
 	</section>
Browse code

all: replaced db_url static value with &defaultrodb; in docs

- regenerated the readmes for modules/ and modules_k/

Daniel-Constantin Mierla authored on 18/10/2012 12:36:46
Showing 1 changed files
... ...
@@ -58,7 +58,7 @@
58 58
 		</para>
59 59
 		<para>
60 60
 		Default value is 
61
-			<quote>mysql://openserro:openserro@localhost/openser</quote>
61
+			<quote>&defaultrodb;</quote>
62 62
 		</para>
63 63
 		<example>
64 64
 		<title>Setting db_url parameter</title>
Browse code

modules_k/domain: did column of domain table is by default NULL

- In order to make migration from 3.2 easier, allow did column of domain
table to be NULL. If NULL, value of did is assumed to be same as
value of domain.

Juha Heinanen authored on 03/04/2012 11:30:03
Showing 1 changed files
... ...
@@ -102,7 +102,9 @@ modparam("domain", "domain_attrs_table", "local_domain_attributes")
102 102
 		<title><varname>did_col</varname> (string)</title>
103 103
 		<para>
104 104
 		Name of column containing domain id (did) of domain in domain
105
-		and domain_attrs tables.
105
+		and domain_attrs tables.  In domain table, a did column value
106
+		may be NULL, which means that it has same value as
107
+		domain column.
106 108
 		</para>
107 109
 		<para>
108 110
 		Default value is <quote>did</quote>.
Browse code

modules_k/domain: added support for domain attributes

- Added new function lookup_domain that in addition to checking if
domain is local, adds attributes of local domain into AVPs.
- Domain attributes are stored in new table domain_attrs.
- Removed support for db only mode and, as consequence, removed db_mode
module variable.

Juha Heinanen authored on 03/04/2012 10:15:35
Showing 1 changed files
... ...
@@ -16,26 +16,23 @@
16 16
 	<section>
17 17
 	<title>Overview</title>
18 18
 	<para>
19
-		Domain module implements checks that based on domain table determine 
20
-		if a host part of an <acronym>URI</acronym> is <quote>local</quote> or 
21
-		not.  A <quote>local</quote> domain is one that the proxy is responsible 
22
-		for.
19
+		Domain module implements checks that based on domain table
20
+		determine if a domain is <quote>local</quote>.
21
+		A <quote>local</quote> domain is one that the proxy is
22
+		responsible for.  SIP URIs of local users must have hostpart
23
+		that is equal to one of these domains.
23 24
 	</para>
24 25
 	<para>
25
-		Domain module operates in caching or non-caching mode depending on 
26
-		value of module parameter <parameter moreinfo="none">db_mode</parameter>.
27
-		In caching mode domain module reads the contents of domain table into 
28
-		cache memory when the module is loaded.  After that domain table is 
29
-		re-read only when module is given domain_reload fifo command.  Any
30
-		changes in domain table must thus be followed by 
31
-		<quote>domain_reload</quote> command in order to reflect them in 
32
-		module behavior. In non-caching mode domain module always queries domain
33
-		table in the database.
26
+		Domain module reads the contents of domain and domain_attrs
27
+		tables into cache memory when the module is loaded.
28
+		Any changes in domain or domain_attrs tables must thus be
29
+		followed by <quote>domain.reload</quote> rpc command in
30
+		order to reflect them in module behavior.
34 31
 	</para>
35 32
 	<para>
36
-		Caching is implemented using a hash table. The size of the hash table 
37
-		is given by HASH_SIZE constant defined in domain_mod.h. 
38
-		Its <quote>factory default</quote> value is 128.
33
+		Caching is implemented using a hash table. The size of
34
+		the hash table is given by HASH_SIZE constant defined in
35
+		domain_mod.h. Its <quote>factory default</quote> value is 128.
39 36
 	</para>
40 37
 	</section>
41 38
 
... ...
@@ -71,41 +68,56 @@ modparam("domain", "db_url", "mysql://ser:pass@db_host/ser")
71 68
 		</example>
72 69
 	</section>
73 70
 	<section>
74
-		<title><varname>db_mode</varname> (integer)</title>
71
+		<title><varname>domain_table</varname> (string)</title>
75 72
 		<para>
76
-		Database mode: 0 means non-caching, 1 means caching.
73
+		Name of table containing names of local domains that the proxy is 
74
+		responsible for.
77 75
 		</para>
78 76
 		<para>
79
-		Default value is 0 (non-caching).
77
+		Default value is <quote>domain</quote>.
80 78
 		</para>
81 79
 		<example>
82
-		<title>db_mode example</title>
80
+		<title>Setting domain_table parameter</title>
83 81
 		<programlisting format="linespecific">
84
-modparam("domain", "db_mode", 1)   # Use caching
82
+modparam("domain", "domain_table", "new_name")
85 83
 </programlisting>
86 84
 		</example>
87 85
 	</section>
88 86
 	<section>
89
-		<title><varname>domain_table</varname> (string)</title>
87
+		<title><varname>domain_attrs_table</varname> (string)</title>
90 88
 		<para>
91
-		Name of table containing names of local domains that the proxy is 
92
-		responsible for. Local users must have in their sip uri a host part 
93
-		that is equal to one of these domains.
89
+		Name of table containing attributes of local domains.
94 90
 		</para>
95 91
 		<para>
96
-		Default value is <quote>domain</quote>.
92
+		Default value is <quote>domain_attrs</quote>.
97 93
 		</para>
98 94
 		<example>
99
-		<title>Setting domain_table parameter</title>
95
+		<title>Setting domain_attrs_table parameter</title>
100 96
 		<programlisting format="linespecific">
101
-modparam("domain", "domain_table", "new_name")
97
+modparam("domain", "domain_attrs_table", "local_domain_attributes")
98
+</programlisting>
99
+		</example>
100
+	</section>
101
+	<section>
102
+		<title><varname>did_col</varname> (string)</title>
103
+		<para>
104
+		Name of column containing domain id (did) of domain in domain
105
+		and domain_attrs tables.
106
+		</para>
107
+		<para>
108
+		Default value is <quote>did</quote>.
109
+		</para>
110
+		<example>
111
+		<title>Setting did_col parameter</title>
112
+		<programlisting format="linespecific">
113
+modparam("domain", "did_col", "domain_did")
102 114
 </programlisting>
103 115
 		</example>
104 116
 	</section>
105 117
 	<section>
106 118
 		<title><varname>domain_col</varname> (string)</title>
107 119
 		<para>
108
-		Name of column containing domains in domain table.
120
+		Name of column containing domain name in domain table.
109 121
 		</para>
110 122
 		<para>
111 123
 		Default value is <quote>domain</quote>.
... ...
@@ -114,6 +126,52 @@ modparam("domain", "domain_table", "new_name")
114 126
 		<title>Setting domain_col parameter</title>
115 127
 		<programlisting format="linespecific">
116 128
 modparam("domain", "domain_col", "domain_name")
129
+</programlisting>
130
+		</example>
131
+	</section>
132
+	<section>
133
+		<title><varname>name_col</varname> (string)</title>
134
+		<para>
135
+		Name of column containing attribute name in domain_attrs table.
136
+		</para>
137
+		<para>
138
+		Default value is <quote>name</quote>.
139
+		</para>
140
+		<example>
141
+		<title>Setting name_col parameter</title>
142
+		<programlisting format="linespecific">
143
+modparam("domain", "name_col", "attr_name")
144
+</programlisting>
145
+		</example>
146
+	</section>
147
+	<section>
148
+		<title><varname>type_col</varname> (string)</title>
149
+		<para>
150
+		Name of column containing attribute type in domain_attrs table.
151
+		Type value 0 is integer and type value 2 is string.
152
+		</para>
153
+		<para>
154
+		Default value is <quote>type</quote>.
155
+		</para>
156
+		<example>
157
+		<title>Setting name_col parameter</title>
158
+		<programlisting format="linespecific">
159
+modparam("domain", "type_col", "attr_type")
160
+</programlisting>
161
+		</example>
162
+	</section>
163
+	<section>
164
+		<title><varname>value_col</varname> (string)</title>
165
+		<para>
166
+		Name of column containing attribute value in domain_attrs table.
167
+		</para>
168
+		<para>
169
+		Default value is <quote>value</quote>.
170
+		</para>
171
+		<example>
172
+		<title>Setting value_col parameter</title>
173
+		<programlisting format="linespecific">
174
+modparam("domain", "value_col", "attr_value")
117 175
 </programlisting>
118 176
 		</example>
119 177
 	</section>
... ...
@@ -146,7 +204,8 @@ modparam("domain", "register_myself", 1)
146 204
 		one of the local domains that the proxy is responsible for
147 205
 		</para>
148 206
 		<para>
149
-		This function can be used from REQUEST_ROUTE.
207
+		This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
208
+		BRANCH_ROUTE, and LOCAL_ROUTE.
150 209
 		</para>
151 210
 		<example>
152 211
 		<title>is_from_local usage</title>
... ...
@@ -172,7 +231,7 @@ if (is_from_local()) {
172 231
 		</para>
173 232
 		<para>
174 233
 		This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
175
-		BRANCH_ROUTE.
234
+		BRANCH_ROUTE, and LOCAL_ROUTE.
176 235
 		</para>
177 236
 		<example>
178 237
 		<title>is_uri_host_local usage</title>
... ...
@@ -208,7 +267,7 @@ if (is_uri_host_local()) {
208 267
 		</itemizedlist>
209 268
 		<para>
210 269
 		This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
211
-		BRANCH_ROUTE.
270
+		BRANCH_ROUTE, and LOCAL_ROUTE.
212 271
 		</para>
213 272
 		<example>
214 273
 		<title>is_domain_local usage</title>
... ...
@@ -229,6 +288,32 @@ if (is_domain_local("$avp(i:850)")) {
229 288
 if (is_domain_local("$avp(s:some_avp)")) {
230 289
 	...
231 290
 };
291
+...
292
+		</programlisting>
293
+		</example>
294
+	</section>
295
+	<section>
296
+		<title><function moreinfo="none">lookup_domain(domain[, prefix])</function></title>
297
+		<para>
298
+		This function checks if domain given in
299
+		domain argument (pseudo variable) is local and, if so,
300
+		adds attributes
301
+		associated with domain's id (did) to AVPs.  If prefix
302
+		argument (string) is given, names of attributes are prefixes by
303
+		it.  In addition to attributes given in domain_attrs
304
+		table, AVP did containing did of domain is added.
305
+		</para>
306
+		<para>
307
+		This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
308
+		BRANCH_ROUTE, and LOCAL_ROUTE.
309
+		</para>
310
+		<example>
311
+		<title>lookup_domain</title>
312
+		<programlisting format="linespecific">
313
+...
314
+if (lookup_domain("$fd", "from_")) {
315
+    xlog("L_INFO", "did of domain $fd is $avp(from_did)\n");
316
+}
232 317
 ...
233 318
 		</programlisting>
234 319
 		</example>
... ...
@@ -314,9 +399,10 @@ if (is_domain_local("$avp(s:some_avp)")) {
314 399
 	<section>
315 400
 	<title>Known Limitations</title>
316 401
 	<para>
317
-		There is an unlikely race condition on domain list update.  If a 
402
+		There is an unlikely race condition on domain reload.  If a 
318 403
 		process uses a table, which is reloaded at the same time twice 
319
-		through <acronym>FIFO</acronym>, the second reload will delete the 
404
+		through <acronym>FIFO</acronym> or <acronym>RPC</acronym>,
405
+		the second reload will delete the  
320 406
 		original table still in use by the process.
321 407
 	</para>
322 408
 	</section>
Browse code

docbook: consitent titles of main section

- updated various forms of titles to: Functions, Modules, MI Commands

Daniel-Constantin Mierla authored on 02/10/2011 08:42:27
Showing 1 changed files
... ...
@@ -53,7 +53,7 @@
53 53
 	</section>
54 54
 
55 55
 	<section>
56
-	<title>Exported Parameters</title>
56
+	<title>Parameters</title>
57 57
 	<section>
58 58
 		<title><varname>db_url</varname> (string)</title>
59 59
 		<para>
... ...
@@ -138,7 +138,7 @@ modparam("domain", "register_myself", 1)
138 138
 	
139 139
 	</section>
140 140
 	<section>
141
-	<title>Exported Functions</title>
141
+	<title>Functions</title>
142 142
 	<section>
143 143
 		<title><function moreinfo="none">is_from_local()</function></title>
144 144
 		<para>
... ...
@@ -235,7 +235,7 @@ if (is_domain_local("$avp(s:some_avp)")) {
235 235
 	</section>
236 236
 	</section>
237 237
 	<section>
238
-	<title>Exported MI Functions</title>
238
+	<title>MI Commands</title>
239 239
 	<section>
240 240
 		<title><function moreinfo="none">domain_reload</function></title>
241 241
 		<para>
Browse code

domain(k): readme updated with rpc commands

Daniel-Constantin Mierla authored on 16/04/2011 21:05:07
Showing 1 changed files
... ...
@@ -275,6 +275,43 @@ if (is_domain_local("$avp(s:some_avp)")) {
275 275
 	</section>
276 276
 	</section>
277 277
 	<section>
278
+	<title>Exported RPC Commands</title>
279
+	<section>
280
+		<title><function moreinfo="none">domain.reload</function></title>
281
+		<para>
282
+		Causes domain module to re-read the contents of domain table
283
+		into cache memory.
284
+		</para>
285
+		<para>
286
+		Name: <emphasis>domain.reload</emphasis>
287
+		</para>
288
+		<para>Parameters: <emphasis>none</emphasis></para>
289
+		<para>
290
+		Example:
291
+		</para>
292
+        <programlisting  format="linespecific">
293
+		sercmd domain.reload
294
+		</programlisting>
295
+	</section>
296
+	<section>
297
+		<title><function moreinfo="none">domain.dump</function></title>
298
+		<para>
299
+		Causes domain module to dump domain names in
300
+		its cache memory.
301
+		</para>
302
+		<para>
303
+		Name: <emphasis>domain.dump</emphasis>
304
+		</para>
305
+		<para>Parameters: <emphasis>none</emphasis></para>
306
+		<para>
307
+		Example:
308
+		</para>
309
+        <programlisting  format="linespecific">
310
+		sercmd domain.dump
311
+		</programlisting>
312
+	</section>
313
+	</section>
314
+	<section>
278 315
 	<title>Known Limitations</title>
279 316
 	<para>
280 317
 		There is an unlikely race condition on domain list update.  If a 
Browse code

domain(k): new module parameter - register_myself

- cotrol registration of domain list to 'myself' check callbacks
- disabled by default (requested by Juha Heinanen for backward
compatibility)

Daniel-Constantin Mierla authored on 03/09/2009 10:16:27
Showing 1 changed files
... ...
@@ -117,6 +117,24 @@ modparam("domain", "domain_col", "domain_name")
117 117
 </programlisting>
118 118
 		</example>
119 119
 	</section>
120
+	<section>
121
+		<title><varname>register_myself</varname> (integer)</title>
122
+		<para>
123
+			Register the list of domains to match 'myself' check:
124
+			0 means no myself registration, 1 means enable myself
125
+			registration.
126
+		</para>
127
+		<para>
128
+		Default value is 0 (disable).
129
+		</para>
130
+		<example>
131
+		<title>register_myself example</title>
132
+		<programlisting format="linespecific">
133
+modparam("domain", "register_myself", 1)
134
+</programlisting>
135
+		</example>
136
+	</section>
137
+
120 138
 	
121 139
 	</section>
122 140
 	<section>
Browse code

Updating docbook sources for the new processing system.

All files now use xi:include to include external files, this mechanism
replaces the entity based inclusion mechanism. It is no longer necessary
to define a new SGML entity to include an external file. External XML
files can be included with:
<xi:include href="filename.xml"/>

External data files (i.e. files that should not be parsed by the XML
parser) can be included with:
<xi:include href="cfg_file.txt" parse="text"/>

The toplevel element of all docbook documents that use the inclusion
mechanism described above must have the following attribute:
xmlns:xi="http://www.w3.org/2001/XIinclude"

XML files included with XInclude must be complete, that means we need to
add the XML header and DOCTYPE to all documents that did not have such
header before (typically docbook files included into other docbook
files).

And finally, all files include the merged entity file in
docbok/entities.xml, this file contains SGML entities from both SER and
kamailio.

Jan Janak authored on 24/04/2009 01:18:58
Showing 1 changed files
... ...
@@ -1,3 +1,12 @@
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
+]>
1 10
 <!-- Domain Module User's Guide -->
2 11
 
3 12
 <chapter>
Browse code

- titles for admin, devel and faq chapters are defined via entities for coherence and easier management

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@3940 689a6050-402a-0410-94f2-e92a70836424

Daniel-Constantin Mierla authored on 19/03/2008 20:40:18
Showing 1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 
3 3
 <chapter>
4 4
 	
5
-	<title>User's Guide</title>
5
+	<title>&adminguide;</title>
6 6
 	
7 7
 	<section>
8 8
 	<title>Overview</title>
Browse code

- step 2 for the rest of modules to re-link history from sgml to xml files

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@3891 689a6050-402a-0410-94f2-e92a70836424

Daniel-Constantin Mierla authored on 07/03/2008 19:52:29
Showing 1 changed files
<
1 1
new file mode 100644
... ...
@@ -0,0 +1,260 @@
1
+<!-- Domain Module User's Guide -->
2
+
3
+<chapter>
4
+	
5
+	<title>User's Guide</title>
6
+	
7
+	<section>
8
+	<title>Overview</title>
9
+	<para>
10
+		Domain module implements checks that based on domain table determine 
11
+		if a host part of an <acronym>URI</acronym> is <quote>local</quote> or 
12
+		not.  A <quote>local</quote> domain is one that the proxy is responsible 
13
+		for.
14
+	</para>
15
+	<para>
16
+		Domain module operates in caching or non-caching mode depending on 
17
+		value of module parameter <parameter moreinfo="none">db_mode</parameter>.
18
+		In caching mode domain module reads the contents of domain table into 
19
+		cache memory when the module is loaded.  After that domain table is 
20
+		re-read only when module is given domain_reload fifo command.  Any
21
+		changes in domain table must thus be followed by 
22
+		<quote>domain_reload</quote> command in order to reflect them in 
23
+		module behavior. In non-caching mode domain module always queries domain
24
+		table in the database.
25
+	</para>
26
+	<para>
27
+		Caching is implemented using a hash table. The size of the hash table 
28
+		is given by HASH_SIZE constant defined in domain_mod.h. 
29
+		Its <quote>factory default</quote> value is 128.
30
+	</para>
31
+	</section>
32
+
33
+	<section>
34
+	<title>Dependencies</title>
35
+	<para>
36
+		The module depends on the following modules (in the other words the 
37
+		listed modules must be loaded before this module):
38
+		<itemizedlist>
39
+		<listitem>
40
+			<para><emphasis>database</emphasis> -- Any database module</para>
41
+		</listitem>
42
+		</itemizedlist>
43
+	</para>
44
+	</section>
45
+
46
+	<section>
47
+	<title>Exported Parameters</title>
48
+	<section>
49
+		<title><varname>db_url</varname> (string)</title>
50
+		<para>
51
+		This is <acronym>URL</acronym> of the database to be used.
52
+		</para>
53
+		<para>
54
+		Default value is 
55
+			<quote>mysql://openserro:openserro@localhost/openser</quote>
56
+		</para>
57
+		<example>
58
+		<title>Setting db_url parameter</title>
59
+		<programlisting format="linespecific">
60
+modparam("domain", "db_url", "mysql://ser:pass@db_host/ser")
61
+</programlisting>
62
+		</example>
63
+	</section>
64
+	<section>
65
+		<title><varname>db_mode</varname> (integer)</title>
66
+		<para>
67
+		Database mode: 0 means non-caching, 1 means caching.
68
+		</para>
69
+		<para>
70
+		Default value is 0 (non-caching).
71
+		</para>
72
+		<example>
73
+		<title>db_mode example</title>
74
+		<programlisting format="linespecific">
75
+modparam("domain", "db_mode", 1)   # Use caching
76
+</programlisting>
77
+		</example>
78
+	</section>
79
+	<section>
80
+		<title><varname>domain_table</varname> (string)</title>
81
+		<para>
82
+		Name of table containing names of local domains that the proxy is 
83
+		responsible for. Local users must have in their sip uri a host part 
84