forked from asipto/kamailio-devel-guide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
c07transport.xml
62 lines (62 loc) · 2.27 KB
/
c07transport.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
<chapter id="c07transport">
<title>Transport Layer</title>
<para>
As a developer, the interaction with the transport layer is lower
and lower. It is already implemented the support for UDP, TCP, TLS and SCTP.
From the modules, you can use the API exported by <emphasis role="strong">sl</emphasis>
and <emphasis role="strong">tm</emphasis> modules to send stateless replies, or to
send stateful requests/replies. Sending stateless requests can be done with the functions
from core, exported in file <emphasis role="strong">forward.h</emphasis>.
</para>
<para>
The core takes care of receiving the messages from the network, the basic validation for them,
preparing the environment for a higher level processing of SIP messages. When developing new
extensions, you don't have to care about reading/writing from/to network.
</para>
<para>
TLS implementation is a module, residing inside modules/tls. It reuses the TCP layer from
the core for the management of the connection, while the code in modules/tls takes care
of TLS negotiation and encryption.
</para>
<para>
If you want to investigate the implementation of transport layers, you can start with:
</para>
<itemizedlist>
<listitem>
<para>
<emphasis role="strong">udp_*.{c,h}</emphasis> for UDP
</para>
</listitem>
<listitem>
<para>
<emphasis role="strong">tcp_*.{c,h}</emphasis> for TCP
</para>
</listitem>
<listitem>
<para>
<emphasis role="strong">modules/tls/*.{c,h}</emphasis> for TLS
</para>
</listitem>
<listitem>
<para>
<emphasis role="strong">sctp_*.{c,h}</emphasis> for SCTP
</para>
</listitem>
</itemizedlist>
<section id="c07dns">
<title>DNS Implementation</title>
<para>
&kamailio; follows the requirements specified in RFC3263 for server and service location.
That includes support for <emphasis role="strong">NAPTR</emphasis> and
<emphasis role="strong">SRV</emphasis> records as well.
</para>
<para>
To investigate the implementation related to DNS, start with files
<emphasis role="strong">resolve.{c,h}</emphasis>.
</para>
<para>
There is an internal DNS cache which is necessary for doing DNS-based load
balancing and failover. It can be disable via core parameters in the configuration file.
</para>
</section>
</chapter>