-
Notifications
You must be signed in to change notification settings - Fork 3
/
c02architecture.xml
250 lines (244 loc) · 5.51 KB
/
c02architecture.xml
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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
<chapter id="c02arch">
<title>&kamailio; Architecture</title>
<para>
&kamailio; has a modular architecture. As a big picture, there are two main categories:
</para>
<itemizedlist>
<listitem>
<para>
<emphasis>the core</emphasis> - it is the component that provides the low-level
functionalities for &kamailio;.
</para>
<para>
Starting with version 3.0.0, &kamailio; core includes so called
<emphasis>internal libraries</emphasis>. They collect code shared by several modules
but which does not have a general purpose to be part of main core.
</para>
</listitem>
<listitem>
<para>
<emphasis>the modules</emphasis> - are the components that provides the most
of the functionalities that make &kamailio; powerful in real world deployments.
</para>
</listitem>
</itemizedlist>
<para>
The architecture for &kamailio; v1.5.x (or older) is shown in the next figure.
</para>
<figure>
<title>&kamailio; 1.x Architecture</title>
<mediaobject>
<imageobject>
<imagedata fileref="./obj/kamailio_architecture_old.png"/>
</imageobject>
</mediaobject>
</figure>
<para>
The architecture for &kamailio; v3.0.x (or newer) was refactored, permitting
to have code shared by several modules stored in internal libraries. Some of
the core components in v1.x being relocated as an internal library. The new
architecture for v3.0.x compared with the one from v1.x is shown in the next figure.
</para>
<figure>
<title>&kamailio; 3.x Architecture</title>
<mediaobject>
<imageobject>
<imagedata fileref="./obj/kamailio_architecture_new.png"/>
</imageobject>
</mediaobject>
</figure>
<section>
<title>&kamailio; Core</title>
<para>
The core includes:
</para>
<itemizedlist>
<listitem>
<para>
memory manager
</para>
</listitem>
<listitem>
<para>
SIP message parser
</para>
</listitem>
<listitem>
<para>
locking system
</para>
</listitem>
<listitem>
<para>
DNS and transport layer management (UDP, TCP, TLS, SCTP)
</para>
</listitem>
<listitem>
<para>
configuration file parser and interpreter
</para>
</listitem>
<listitem>
<para>
stateless forwarding
</para>
</listitem>
<listitem>
<para>
pseudo-variables and transformations engines
</para>
</listitem>
<listitem>
<para>
RPC control interface API
</para>
</listitem>
<listitem>
<para>
timer API
</para>
</listitem>
</itemizedlist>
<para>
The internal libraries include:
</para>
<itemizedlist>
<listitem>
<para>
some components from old Kamailio v1.5.x core
</para>
</listitem>
<listitem>
<para>
database abstraction layers (DB API v1 and v2)
</para>
</listitem>
<listitem>
<para>
management interface (MI) API
</para>
</listitem>
<listitem>
<para>
statistics engine
</para>
</listitem>
</itemizedlist>
</section>
<section>
<title>&kamailio; Modules</title>
<para>
There are over 150 modules in the repository at this moment. By loading modules,
you can get functionalities such as:
</para>
<itemizedlist>
<listitem>
<para>
registrar and user location management
</para>
</listitem>
<listitem>
<para>
accounting, authorization and authentication
</para>
</listitem>
<listitem>
<para>
text and regular expression operations
</para>
</listitem>
<listitem>
<para>
stateless replying
</para>
</listitem>
<listitem>
<para>
stateful processing - SIP transaction management
</para>
</listitem>
<listitem>
<para>
SIP dialogs tracking - active calls management
</para>
</listitem>
<listitem>
<para>
instant messaging and presence extensions
</para>
</listitem>
<listitem>
<para>
RADIUS and LDAP support
</para>
</listitem>
<listitem>
<para>
SQL and no-SQL database connectors
</para>
</listitem>
<listitem>
<para>
MI and RPC transports
</para>
</listitem>
<listitem>
<para>
Enum, GeoIP API and CPL interpreter
</para>
</listitem>
<listitem>
<para>
topology hiding and NAT traversal
</para>
</listitem>
<listitem>
<para>
load balancing and least cost routing
</para>
</listitem>
<listitem>
<para>
asynchronous SIP request processing
</para>
</listitem>
<listitem>
<para>
interactive configuration file debugger
</para>
</listitem>
<listitem>
<para>
Lua, Perl, Python and Java SIP Servlet extensions
</para>
</listitem>
</itemizedlist>
</section>
<section id="c02message_processing">
<title>SIP Message Processing</title>
<para>
The execution of &kamailio; configuration file is triggered when receiving a SIP message from
the network. The processing flow is different for a SIP request or a SIP reply.
</para>
<figure>
<title>SIP Request Processing</title>
<mediaobject>
<imageobject>
<imagedata fileref="./obj/kamailio_request_processing.png"/>
</imageobject>
</mediaobject>
</figure>
<figure>
<title>SIP Reply Processing</title>
<mediaobject>
<imageobject>
<imagedata fileref="./obj/kamailio_reply_processing.png"/>
</imageobject>
</mediaobject>
</figure>
<para>
The document contains a chapter dedicated to <emphasis role="strong">Configuration File</emphasis> that
explains its structure and the types of routing blocks.
</para>
</section>
</chapter>