---
name: "kamailio"
section: "8"
platform: "linux"
package: "kamailio"
version: "6.0.1-1+deb13u1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/kamailio"
---

# kamailio(8)

a very fast and configurable SIP server

## NAME

kamailio - a very fast and configurable SIP server

## SYNOPSIS

**kamailio** \[ **-hfcmMdVIhEebBlLnvKrRDTNWwtugPGSQOaAxXY** \] \[ **-a** *auto-aliases-mode* \] \[ **-A** *pre-processor-define* \] \[ **-b** *max\_rcv\_buf\_size* \] \[ **-B** *max\_snd\_buf\_size* \] \[ **-f** *config-file* \] \[ **-g** *gid* \] \[ **-G** *pgid-file* \] \[ **-l** *address* \] \[ **-L** *modules-dir* \] \[ **-M** *private\_mem\_size* \] \[ **-m** *shared\_mem\_size* \] \[ **-n** *processes-no* \] \[ **-N** *tcp processes-no* \] \[ **-P** *pid-file* \] \[ **-t** *chroot-dir* \] \[ **-u** *uid* \] \[ **-w** *working-dir* \]

## DESCRIPTION

**kamailio** is a very fast and configurable SIP (RFC3261) server.

## OPTIONS

-

  - **-a** *auto-aliases-mode*

  **Enable auto-aliases with 'yes' or 'on', disable with 'no' or 'off**

- **--alias=*val***

  Add an alias, the value has to be '\[proto:\]hostname\[:port\]' (like for 'alias' global parameter)

- **--atexit=*val***

  Control atexit callbacks execution from external libraries which may access destroyed shm memory causing crash on shutdown. Can be y\[es\] or 1 to enable atexit callbacks, n\[o\] or 0 to disable, default is yes.

- **-A** *pre-processor-define*

  Add config pre-processor define (e.g., -A WITH\_AUTH, -A N=1, -A X='"Y"')

- **-b** *max\_rcv\_buf\_size*

  Maximum OS UDP receive buffer size which will not be exceeded by auto-probing-and-increase procedure even if OS allows.

- **-B** *max\_snd\_buf\_size*

  Maximum OS UDP send buffer size which will not be exceeded by auto-probing-and-increase procedure even if OS allows.

- **-c**

  Checks the config file and displays the aliases and listen interface list.

- **--cfg-print**

  Print configuration file evaluating includes and ifdefs

- **-d**

  Turns on debugging, multiple **-d** increase the debug level.

- **--debug=*val***

  Debugging level value

- **-D**

  Control how daemonize is done:\
   **-D** - do not fork (almost) anyway (run in foreground, doesn't fork into daemon mode);\
   **-DD** - do not daemonize creator (main process is not daemonized);\
   **-DDD** - daemonize (default)

- **-e**

  Log messages printed in terminal colors (requires -E)

- **-E**

  Sends all the log messages to stderr.

- **-f** *config-file*

  Reads the configuration from  **config-file** (default */etc/kamailio/kamailio.cfg* ).

- **-g** *gid*

  Changes the group id under which **kamailio** runs.

- **-G** *pgid-file*

  Creates a file containing the pgid of the main **kamailio** process.

- **-h --help**

  Displays a short usage description, including all available options.

- **-I**

  Displays details of internal constants and attributes.

- **-K**

  Turns on via host checking when forwarding replies.

- **-l** *address*

  Listens on the specified address/interface. Multiple **-l** mean listening on multiple addresses. The address format is \[proto:\]addr\_lst\[:port\]\[/advaddr\]\[/socket\_name\], where proto=udp\|tcp\|tls\|sctp, addr\_list = addr\|(addr, addrress), addr=host\|ip\_address\|interface\_name, advaddr=addr\[:port\] (advertised address) and socket\_name=identifying name. E.g: -l localhost, -l udp:127.0.0.1:5080, -l eth0:5062, -l udp:127.0.0.1:5080/1.2.3.4:5060, -l udp:127.0.0.1:5080//local, -l udp:127.0.0.1:5080/1.2.3.4:5060/local, -l  The default behaviour is to listen on all the interfaces.

- **--loadmodule=*name***

  load the module specified by name

- **--log-engine=*name***

  log engine name and data

- **-L** *modules-dir*

  Specifies the directory where to look for **kamailio** modules (default: /usr/lib/x86\_64-linux-gnu/kamailio/modules or /usr/lib64/kamailio/modules)

- **-m** *shared\_mem\_size*

  Size of the shared memory which will be allocated (in Megabytes).

- **--modparam=*modname:paramname:type:value***

  set the module parameter type has to be 's' for string value and 'i' for int value, example: --modparam=corex:alias\_subdomains:s:" NAME ".org

- **-M** *private\_mem\_size*

  Size of the private memory which will be allocated per process (in Megabytes).

- **-n** *processes-no*

  Specifies the number of children processes forked per interface (default 8).

- **-N** *tcp processes-no*

  Specifies the number of children processes forked to handle tcp incoming connections (by default is equal to **-n** ).

- **-O** *optimization-level*

  Script optimization level (debugging option).

- **-P** *pid-file*

  Creates a file containing the pid of the main **kamailio** process.

- **-Q**

  Number of sctp child processes (default: equal to **-n** ).

- **-r**

  Uses dns to check if it is necessary to add a "received=" field to a via.

- **-R**

  Same as **-r** but uses reverse dns (to use both: **-rR** ).

- **--server-id=*num***

  Set the value for server\_id

- **--subst=*exp***

  Set a subst preprocessor directive

- **--substdef=*exp***

  Set a substdef preprocessor directive

- **--substdefs=*exp***

  Set a substdefs preprocessor directive.

- **-S**

  Disables SCTP support.

- **-t** *chroot-dir*

  Forces **kamailio** to chroot after reading the config file.

- **-T**

  Disables TCP support.

- **-u** *uid*

  Changes the user id under which **kamailio** runs.

- **-v -V --version**

  Displays the version number.

- **-x** *name*

  Specify internal manager for shared memory (shm) can be: fm, qm or tlsf

- **-X** *name*

  Specify internal manager for private memory (pkg) if omitted, the one for shm is used

- **-Y** *dir*

  Runtime dir path

- **-w** *working-dir*

  Specifies the working directory. In the very improbable event that **kamailio** will crash, the core file will be generated here.

- **-W** *type*

  poll method (depending on support in OS, it can be: poll, epoll\_lt, epoll\_et, sigio\_rt, select, kqueue, /dev/poll).

- **kamailio**

  ## FILES

**/etc/kamailio/kamailio.cfg**\
 **/usr/lib/x86\_64-linux-gnu/kamailio/modules/\***

## AUTHORS

see **AUTHORS**

## SEE ALSO

**[kamailio.cfg(5)](/kamailio.cfg/5.md)**

Full documentation on kamailio, including configuration guidelines, FAQs and licensing conditions, is available at *https://www.kamailio.org/*

For reporting  bugs see *https://github.com/kamailio/kamailio/issues.*

Mailing lists:

```
sr-users@lists.kamailio.org - kamailio user community
sr-dev@lists.kamailio.org - kamailio development, new features and unstable version
```
