File: tsilo_admin.xml

package info (click to toggle)
kamailio 4.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 56,100 kB
  • sloc: ansic: 552,832; xml: 166,484; sh: 8,659; makefile: 7,676; sql: 6,235; perl: 3,487; yacc: 3,428; python: 1,457; cpp: 1,219; php: 1,047; java: 449; pascal: 194; cs: 40; awk: 27
file content (206 lines) | stat: -rw-r--r-- 5,614 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<?xml version="1.0" encoding='ISO-8859-1'?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [

<!-- Include general documentation entities -->
<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
%docentities;

]>
<!-- Module User's Guide -->

<chapter xmlns:xi="http://www.w3.org/2001/XInclude">

	<title>&adminguide;</title>

	<section>
	<title>Overview</title>
	<para>
		This modules provides transaction storage for the &kamailioname;. It
		stores in an internal table transactions for an user and add branches
		to them if new contacts are added.
	</para>
	<para>
		For each message, the modules stores <quote>Request-URI</quote>
		(<quote>R-URI</quote>), &uri; and the internal transaction index
		and label.
	</para>
	<para>
		When the transaction is destroyed (by the <emphasis>TM</emphasis> module,
		the transaction is removed from the module table.
	</para>
	</section>
	<section>
	<title>Dependencies</title>
	<section>
		<title>&kamailio; modules</title>
		<para>
		The following modules must be loaded before this module:
			<itemizedlist>
			<listitem>
			<para>
				<emphasis>REGISTRAR</emphasis>--registrar module-- used to lookup
				for new contacts and update the dset for the r-uri.
			</para>
			</listitem>
			<listitem>
			<para>
				<emphasis>TM</emphasis>--transaction module-- used to
				send &sip; requests.
			</para>
			</listitem>
			</itemizedlist>
		</para>
	</section>
	<section>
		<title>External libraries or applications</title>
		<para>
		The following libraries or applications must be installed before
		running &kamailio; with this module:
			<itemizedlist>
			<listitem>
			<para>
				<emphasis>none</emphasis>.
			</para>
			</listitem>
			</itemizedlist>
		</para>
	</section>
	</section>
	<section>
	<title>Parameters</title>
	<section>
		<title><varname>hash_size</varname> (integer)</title>
		<para>
		The size of the hash table internally used to keep the transaction. A
		larger table is much faster but consumes more memory. The hash size
		must be a power of two, otherwise it will be rounded down to the nearest
		power of two.
		</para>
		<para>
		<emphasis>
			Default value is <quote>2048</quote>.
		</emphasis>
		</para>
		<example>
		<title>Set <varname>hash_size</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("tsilo", "hash_size", 1024)
...
</programlisting>
		</example>
	</section>
	</section>

	<section>
	<title>Functions</title>
	<section>
		<title><function moreinfo="none">ts_store()</function></title>
		<para>
		The method stores r-uri, tindex and tlabel of the current transaction.
		</para>
		<para>
		This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
		</para>
		<example>
		<title><function>ts_store</function> usage</title>
		<programlisting format="linespecific">
...
if (is_method("INVITE")) {
	if (t_newtran()) {
		ts_store();
	}
}
...
</programlisting>
		</example>
	</section>
	<section>
		<title><function moreinfo="none">ts_append(domain, ruri)</function></title>
		<para>
		The method add branches to all the stored transactions for the &sip;
		ruri passed as parameter, performing a contact lookup on the table specified by
		the domain parameter. The method should be called when a REGISTER
		request is received.
		</para>
		<para>Meaning of the parameters is as follows:</para>
		<itemizedlist>
		<listitem>
			<para>
			<emphasis>domain</emphasis> - Name of table that should be used for looking
			up new contacts for r-uri.
			</para>
		</listitem>
		<listitem>
			<para>
			<emphasis>ruri</emphasis> - The r-uri for which we want to check existing
			transactions and add them new branches. Can be a static string value or a
			dynamic string with pseudo-variables.
			</para>
		</listitem>
		</itemizedlist>
		<para>
		This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
		</para>
		<example>
		<title><function>ts_append</function> usage</title>
		<programlisting format="linespecific">
...
if (is_method("REGISTER")) {
	ts_append("location", "$tu");
}
...
</programlisting>
		</example>
	</section>
	<section>
		<title><function moreinfo="none">ts_append_to(tindex, tlabel, domain)</function></title>
		<para>
		The method add branches to the transaction identified by tindex and tlabel,
		performing a contacts lookup on the table specified by the domain parameter.
		The method should be called when a REGISTER request is received.
		</para>
		<para>Meaning of the parameters is as follows:</para>
		<itemizedlist>
		<listitem>
			<para>
                        <emphasis>tindex</emphasis> - internal index of transaction.
                        Can be an integer or a pseudo-variable.
                        </para>
		</listitem>
                <listitem>
			<para>
                        <emphasis>tlabel</emphasis> - internal label of transaction.
                        Can be an integer or a pseudo-variable.
                        </para>
		</listitem>
		<listitem>
			<para>
			<emphasis>domain</emphasis> - Name of table that should be used for looking
			up new contacts for r-uri.
			</para>
		</listitem>
		</itemizedlist>
		<para>
		This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
		</para>
		<example>
		<title><function>ts_append_to</function> usage</title>
		<programlisting format="linespecific">
...
if (is_method("REGISTER")) {
	$var(tindex) = ...
	$var(tlabel) = ...
	ts_append_to("$var(tindex)", "$var(tlabel", "location");
}
...
</programlisting>
		</example>
	</section>
	</section>

	<section>
	<title>Statistics</title>
	</section>
</chapter>