kamailio(8)

πŸ’– kamailio(8) πŸ’–

okay bestie, gather round, because we are talking about kamailio β€” the manual page lives in section 8 and it is genuinely iconic. no cap.


✨ 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 πŸ‘‘

so like, kamailio is a very fast and configurable SIP (RFC3261) server. that's it, that's the whole vibe. she's fast, she's configurable, she speaks SIP. periodt. πŸ’…


πŸŽ€ OPTIONS πŸŽ€

there are SO many flags bestie, and every single one is here, i did not skip a single one, i would never do that to you 🫢

  • -a auto-aliases-mode β€” turn auto-aliases ON with yes or on, turn them OFF with no or off
  • --alias=val β€” add an alias. the value has to be '[proto:]hostname[:port]' (same format as the alias global parameter, iykyk)
  • --atexit=val β€” controls whether atexit callbacks run from external libraries that might go poking at destroyed shm memory and crash everything on shutdown 😭. use y[es] or 1 to enable, n[o] or 0 to disable, default is yes
  • -A pre-processor-define β€” add a config pre-processor define (like -A WITH_AUTH, -A N=1, -A X='"Y"')
  • -b max_rcv_buf_size β€” the maximum OS UDP receive buffer size. the auto-probing-and-increase procedure will not go past this, even if your OS is feeling generous and would totally allow it
  • -B max_snd_buf_size β€” same energy but for the maximum OS UDP send buffer size. auto-probing-and-increase won't exceed it even if the OS allows
  • -c β€” checks the config file and shows you the aliases and the listen interface list
  • --cfg-print β€” print the configuration file, evaluating includes and ifdefs
  • -d β€” turns on debugging. stack multiple -ds to crank the debug level up πŸ”₯
  • --debug=val β€” the debugging level value
  • -D β€” controls how daemonize happens:
    • -D β€” do not fork, (almost) anyway (runs in foreground, does not fork into daemon mode)
    • -DD β€” do not daemonize creator (the main process stays undaemonized)
    • -DDD β€” daemonize (this is the default)
  • -e β€” log messages printed in terminal colors (needs -E to work!)
  • -E β€” sends all the log messages to stderr
  • -f config-file β€” reads the configuration from config-file (default is /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 with all the 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 means 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. for example: -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 to look for kamailio modules in (default: /usr/lib/x86_64-linux-gnu/kamailio/modules or /usr/lib64/kamailio/modules)
  • -m shared_mem_size β€” size of the shared memory that gets allocated, in Megabytes
  • --modparam=modname:paramname:type:value β€” set the module parameter. type has to be s for a string value and i for an int value. example: --modparam=corex:alias_subdomains:s:" NAME ".org
  • -M private_mem_size β€” size of the private memory 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 this equals -n)
  • -O optimization-level β€” script optimization level (this one's a 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's necessary to add a "received=" field to a via
  • -R β€” same as -r but uses reverse dns (want both? go -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 the internal manager for shared memory (shm). options are: fm, qm or tlsf
  • -X name β€” specify the internal manager for private memory (pkg). if you leave it out, the one for shm gets used instead
  • -Y dir β€” runtime dir path
  • -w working-dir β€” specifies the working directory. in the very improbable event that kamailio crashes, the core file gets generated in here πŸ™ˆ
  • -W type β€” poll method (depending on what your OS supports it can be: poll, epoll_lt, epoll_et, sigio_rt, select, kqueue, /dev/poll)

πŸ—‚οΈ FILES πŸ—‚οΈ

  • /usr/sbin/kamailio
  • /etc/kamailio/kamailio.cfg
  • /usr/lib/x86_64-linux-gnu/kamailio/modules/*

🫢 AUTHORS 🫢

see /usr/share/doc/kamailio/AUTHORS


🌈 SEE ALSO 🌈


and that's the whole page bestie, you ate that πŸ’… this gorgeous thing is brought to you by the kamailio manual, dated 03.02.2021, and it slays under the name kamailio(8) β€” go forth and SIP, you absolute icon πŸ‘‘βœ¨

πŸ“¦ where this page comes from