Friday, May 31, 2019

New Kamailio module – app_lua_sr

A new module named app_lua_sr has been pushed to git master branch. It collects the functions that correspond to the Lua srlibrary, previously exported from app_lua module:
The Lua sr library is the old way of exposing Kamailio API to Lua scripting. With the introduction of KEMI in Kamailio v5.0, the KSR library has been exported to Lua, with a larger set of functions, therefore over the time app_lua_sr will be deprecated and removed. Splitting the code from app_lua that is no longer needed for KEMI is the first step in this process.
If you are using sr library in your Lua script, consider to migrate to KEMI alternatives offered by KSR library. For now you can still keep your old Lua script with sr library, requiring following updates to kamailio.cfg:
# old config
loadmodule "app_lua.so"
modparam("app_lua", "register", "sl")
 
# new config
loadmodule "app_lua.so"
loadmodule "app_lua_sr.so"
modparam("app_lua_sr", "register", "sl")
If you find a function available in Lua sr library but not in Lua KSR library, contact us via mailing lists or open an issue on github tracker.
Thanks for flying Kamailio!

Wednesday, May 22, 2019

Kamailio v5.2.3 Released

Kamailio SIP Server v5.2.3 stable is out – a minor release including fixes in code and documentation since v5.2.2. The configuration file and database schema compatibility is preserved, which means you don’t have to change anything to update.
Kamailio® v5.2.3 is based on the latest source code of GIT branch 5.2 and it represents the latest stable version. We recommend those running previous 5.2.x or older versions to upgrade. There is no change that has to be done to configuration file or database structure comparing with the previous releases of the v5.2 branch.
Resources for Kamailio version 5.2.3
Source tarballs are available at:
Detailed changelog:
Download via GIT:
 # git clone https://github.com/kamailio/kamailio kamailio
 # cd kamailio
 # git checkout -b 5.2 origin/5.2
Relevant notes, binaries and packages will be uploaded at:
Modules’ documentation:
What is new in 5.2.x release series is summarized in the announcement of v5.2.0:
Thanks for flying Kamailio!

Friday, May 17, 2019

Kamailio – Updates To Command Line Arguments

Recently, a series of commits focused on updating the command line arguments for Kamailio. With an increased popularity of deploying Kamailio in containerised environments, the flexibility of using command line arguments when starting the SIP server can simplify the orchestration.
For long time, Kamailio accepted only arguments with short name (single character argument name), so one of these new additions was the option to handle arguments with long name, opening the door to add a lot more variants.
The list of command line arguments is printed by running ‘kamailio -h‘, with the version built from the latest Git master branch, these are:
# kamailio -h

version: kamailio 5.3.0-dev5 (x86_64/darwin) 104147-dirty
Usage: kamailio [options]
Options:
    -a mode      Auto aliases mode: enable 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)
    -A define    Add config pre-processor define (e.g., -A WITH_AUTH,
                  -A 'FLT_ACC=1', -A 'DEFVAL="str-val"')
    -b nr        Maximum receive buffer size which will not be exceeded by
                  auto-probing procedure even if  OS allows
    -c           Check configuration file for syntax errors
    -d           Debugging mode (multiple -d increase the level)
    -D           Control how daemonize is done:
                  -D..do not fork (almost) anyway;
                  -DD..do not daemonize creator;
                  -DDD..daemonize (default)
    -e           Log messages printed in terminal colors (requires -E)
    -E           Log to stderr
    -f file      Configuration file (default: /tmp/kamailio-dev/etc/kamailio/kamailio.cfg)
    -g gid       Change gid (group id)
    -G file      Create a pgid file
    -h           This help message
    --help       Long option for `-h`
    -I           Print more internal compile flags and options
    -K           Turn on "via:" host checking when forwarding replies
    -l address   Listen on the specified address/interface (multiple -l
                  mean listening on more addresses). The address format is
                  [proto:]addr_lst[:port][/advaddr],
                  where proto=udp|tcp|tls|sctp,
                  addr_lst= addr|(addr, addr_lst),
                  addr=host|ip_address|interface_name and
                  advaddr=addr[:port] (advertised address).
                  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 "sctp:(eth0)", -l "(eth0, eth1, 127.0.0.1):5065".
                  The default behaviour is to listen on all the interfaces.
    -L path      Modules search path (default: /tmp/kamailio-dev/lib64/kamailio/modules)
    -m nr        Size of shared memory allocated in Megabytes
    -M nr        Size of private memory allocated, in Megabytes
    -n processes Number of child processes to fork per interface
                  (default: 8)
    -N           Number of tcp child processes (default: equal to `-n')
    -O nr        Script optimization level (debugging option)
    -P file      Create a pid file
    -Q           Number of sctp child processes (default: equal to `-n')
    -r           Use dns to check if is necessary to add a "received="
                  field to a via
    -R           Same as `-r` but use reverse dns;
                  (to use both use `-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           disable sctp
    -t dir       Chroot to "dir"
    -T           Disable tcp
    -u uid       Change uid (user id)
    -v           Version number
    --version    Long option for `-v`
    -V           Alternative for `-v`
    -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 dir       Change the working directory to "dir" (default: "/")
    -W type      poll method (depending on support in OS, it can be: poll,
                  epoll_lt, epoll_et, sigio_rt, select, kqueue, /dev/poll)
Among the latest argument additions:
  • add domain aliases with –alias
  • set advertised address to listen sockets speficied with -l socket/advertise
  • set server id with –server-id
  • set a subst, substdef or substdefs preprocessor expression with –subst, –substdef or –substdefs
Couple of more will be added in the future, aiming to make it easier to control Kamailio from command line. If you have suggestions, do not hesitate to propose them to sr-users mailing list.
Thanks for flying Kamailio!

Tuesday, May 14, 2019

Kamailio – Winner Of Google Open Source Peer Bonus Award

Recently Google announced the first group of Open Source Peer Bonus Award winners for 2019 and we are thrilled to see Daniel-Constantin Mierla and Kamailio among them.
The Google Open Source Peer Bonus program is described as:
In the same way that a Google Peer Bonus is used to recognize a fellow Googler who has gone above and beyond, an Open Source Peer Bonus recognizes external people who have made exceptional contributions to open source.
The announcement for the 2019 winners is available at:
Daniel and Kamailio are listed among open source developers and projects that have a relevant impact out there, like Linux Kernel, Kubernetes, Angular, Pip, LLVM/CLang, Apache projects, Git or Gerrit.
We are glad to see Kamailio recognized in this way for its contribution to open source real time communications ecosystem!
Thanks for flying Kamailio!