Kamailio: Difference between revisions

From 탱이의 잡동사니
Jump to navigation Jump to search
(Created page with "== Overview == SIP server Kamailio(former OpenSER) 내용 정리. == Basic == Kamailio 는 SIP 에 특화된 오픈 소스 라우터/방화벽 이다. == See also == * https...")
 
No edit summary
Line 4: Line 4:
== Basic ==
== Basic ==
Kamailio 는 SIP 에 특화된 오픈 소스 라우터/방화벽 이다.
Kamailio 는 SIP 에 특화된 오픈 소스 라우터/방화벽 이다.
== kamailio.cfg ==
Kamailio.cfg 는 다음의 파트로 이루어져 있다.
* global parameters
* modules settings
* routing blocks
=== Global parameters section ===
This is the first part of the configuration file, containing the parameters for the core of kamailio and custom global parameters.
Typically this is formed by directives of the form:
<pre>
name=value
</pre>
The name corresponds to a core parameters. If a name is not matching a core parameter, then Kamailio will not start, rising an error during startup.
=== Modules setting section ===
This is the second section of the configuration file, containing the directives to load modules and set their parameters.
It contains the directives loadmodule and modparam. In the default configuration file starts with the line setting the path to modules(the assignment to mpath core parameter).
<pre>
loadmodule "debugger.so"
...
modparam("debugger", "cfgtrace", 1)
</pre>
=== Routing blocks section ===
This is the last section of the configuration file, typically the biggest one, containing the routing blocks with the routing logic for SIP traffic handled by Kamailio.
The only mandatory routing block is request_route, which contains the actions for deciding the routing for SIP requests.
<pre>
request_route {
    # per request initial checks
    route(REQINIT);
    ...
}
branch_route[MANAGE_BRANCH] {
    xdbg("new branch [$T_branch_idx] to $ru\n");
    route(NATMANAGE);
}
</pre>


== See also ==
== See also ==

Revision as of 14:59, 31 December 2018

Overview

SIP server Kamailio(former OpenSER) 내용 정리.

Basic

Kamailio 는 SIP 에 특화된 오픈 소스 라우터/방화벽 이다.

kamailio.cfg

Kamailio.cfg 는 다음의 파트로 이루어져 있다.

  • global parameters
  • modules settings
  • routing blocks

Global parameters section

This is the first part of the configuration file, containing the parameters for the core of kamailio and custom global parameters.

Typically this is formed by directives of the form:

name=value

The name corresponds to a core parameters. If a name is not matching a core parameter, then Kamailio will not start, rising an error during startup.

Modules setting section

This is the second section of the configuration file, containing the directives to load modules and set their parameters.

It contains the directives loadmodule and modparam. In the default configuration file starts with the line setting the path to modules(the assignment to mpath core parameter).

loadmodule "debugger.so"
...
modparam("debugger", "cfgtrace", 1)

Routing blocks section

This is the last section of the configuration file, typically the biggest one, containing the routing blocks with the routing logic for SIP traffic handled by Kamailio. The only mandatory routing block is request_route, which contains the actions for deciding the routing for SIP requests.

request_route {
 
    # per request initial checks
    route(REQINIT);
 
    ...
}
 
branch_route[MANAGE_BRANCH] {
    xdbg("new branch [$T_branch_idx] to $ru\n");
    route(NATMANAGE);
}

See also