May 23, 2022Kamailio SIP Server v5.6.0 has been released – this is a major release, meaning that it is introducing an extensive number of new features as well as improvements to existing components.

Overview of new features in v5.6.0

(for more details see the wiki page)

Highlights

  • operations using the position in the SIP message buffer bringing more flexibility in mangling SIP traffic specially from KEMI scripts
  • in-memory storage for SIP messages to save and restore content
  • alternative TLS module with statically linked libssl to avoid initialisation conflicts
  • iterator over the list of headers with operations to add or remove content
  • iterator over the lines in the body with operations to add or remove content
  • options to load modules and set module parameter values with config variables
  • option print configuration file after evaluation of #!ifdef pre-processor conditions
  • extended KEMI with more dedicated helper functions via kemix module as well as exports from the rest of modules
  • new module offering connector to NATS pub-sub messaging system
  • new module to connect to Slack channels
  • another new module offering an alternative implementation for a config HTTP client function using Rust libraries
  • dispatcher support for SRV records with option to refresh the addresses on timer
  • kamcli tool added sub-commands to create TLS certificates and manage APIBan records in relation with an internal htable
  • many new variables and transformations

Summary Of New Features

  • seven new modules:
    • misctest – facilitate OSS Fuzz troubleshooting and incorporates the former malloc_test module
    • nats – connector to NATS pub-sub messaging system
    • posops – operations using the position in the SIP message buffer
    • ruxc – useful config functions (e.g., http client query) using Rust libraries
    • siprepo – in-memory SIP message storage
    • slack – connector to Slack channels
    • tlsa – TLS module with statically linked libssl
  • sipdump module can delete traffic stored files with a time based rule
  • KEMI support for Lua 5.4.x
  • async task execution with custom data without suspending the SIP transaction
  • updates to JavaScript and Squirrel interpreters
  • variables with expressions to access the attributes of the local listen sockets
  • support for long and long long type on RPC responses
  • ability to forward SIP responses via config function
  • db cluster connections can be managed via RPC commands
  • ability to add DNS SRV records in cache at startup via corex parameters
  • DNS SRV support for dispatcher module with option to refresh records on timer
  • option to control what is printed in the cfgtrace log message (e.g., do not print config file path)
  • filter on local dialogs for statistics
  • filter on time for listing dialogs via RPC
  • more flexibility in listing dispatcher records with variants for less or more details
  • ability to test in config file if a specific dispatcher destination is active or not
  • substantial improvements and new features to IMS/VoLTE modules (ims charging, ipsec, smsops, …)
  • significant number of new variables, transformations and enhancements in the pv module
    • $rpl(key) – manage reply
    • $ccp(gname.vname) – access core custom parameters
    • $hfl(name) – header field list
    • {param.in,name[,sep]} transformation
    • $hflc(hname) variable
    • $nh(k) to work for replies using 2nd via
    • WS and WSS to $K(key) variable
    • INET/6 as alternative IPv4/6 for $K(key)
    • $nh(i) returns ip address family version
    • {s.rafter,x} and {s.rbefore,x} transformations – get part of string after of before a character with reverse search
    • {s.fmtlines,n,m} and {s.fmtlinet,n,m} – format lines by number of characters in indentation
    • $via0(attr) variable – get the attributes of first via header
    • $via1(attr) variable – get the attributes of 2nd via
    • $viaZ(attr) variable – get the attributes of last via header
    • $msgbuf(index) variable – get character from message buffer by index
    • functions for $xavu(...) params explode/implode
    • $rsi variable – return status code for replies and 0 for requests
    • transformation class {val}
      • {val.n0} – return int 0 instead of $null value, or existing value
      • {val.json} – if value is $null, return empty string; if value is string, then it is escaped for use as json value (without surrounding quotes)
      • {val.ne} – return empty string if the variable value is $null
      • {val.jsonqe} – quoted json value
    • extended $cnt(...) to work with $xavp(...)
    • $msg(lpart) variable – return last part of the message – headers and body (skips first line)
    • $Ras – return local received address in socket format
    •  set function for variable $rcv(buf)
  • option to set custom DNS TTL via config functions and reset to default value
  • rpc command to get a shared memory usage report for QM manager
  • functions to set and remove items in htable using iterators
  • function to se the expire of items in htable using iterators
  • ability to execute an event route on data received on a custom UDP socket (not used for SIP) using evrexec module
  • textopsx module enhancements
    • added functions and variables to iterate headers list
      • iterate through headers, access values via $hfitname(iname) and $hfitname(ibody)
    • headers iterator functions exported to kemi
    • added body lines iterator functions
      • iterate through lines of message body, get the value via $blitval(iname)
    • body lines iterator functions exported to kemi
    • exported msg_set_buffer(data) function
  • rpc command to reload geoip2 database
  • rpc command to set the expire of htable items
  • config functions to set value and expire at the same time for htable items
  • new features in the secsipid (stir/shaken) module
    • function secsipid_build_identity(...) to build identity value and store in pv
    • function secsipid_check(sidentity, keypath)
    • function secsipid_sign(headers, payload, keypath)
    • kemi function to get $secsipid(val)
    • function secsipid_build_identity_prvkey() to build Identity by providing private key data
  • possibility to add headers when generating jwt
  • rtpengine module enhancements:
    • added mode 2 for rtpengine_allow_op to return only manually disabled nodes
    • added un/silence_media() functions
    • added rtpengine_query_v() function
      • do a query cmd and store the response in a variable as a json
  • statsd support for histogram
  • stirshaken module – PVs to allow access to x509 subject and ppt grants
  • additions to siputils module:
    • added optional mode parameter to is_first_hop() to control the matching
    • added hdr_date_check(tdiff) function
    • added cmp_hdr_name(hname1, hname2) function
    • functions to compare uri and aor exported to kemi
  • tcpops – added function tcp_close_connection([conid])
  • textops – function remove_hf_idx(hname, idx)
  • textops – function remove_hf_match(hname, op, expr)
  • new variable in the TLS module
  • many enhancements to the core:
    • JSON logging with CEE schema support
    • rpc command to print runtime info
    • option for post-child-init callback
    • new core functions exported to KEMI
    • new global parameters to control SIP message logging format and tcp connection handling on error return code
    • ability to work with json formatted prefixes for logging
  • option to remove TCP/TLS contacts when loading from database
  • major new features in the kamcli tool

Project achievements during v5.6.0 development cycle

  • the development of the project spans approaches 21 years of activity
  • it is the 24th public major release in the history of project (SER project went out first with v0.8.x)
  • the 9th edition of its own conference, Kamailio World, was organised as a 2-days online event during September 1-2, 2021
  • presentations at other online events: Astricon, Fosdem, Cluecon, CommCon
  • continuous development at high pace – the project just about to get to 34000 commits to the master branch (about 1200 commits done for v5.6.0 alone from more than 60 different contributors)
  • the project is about to organize another online conference this year and a development event. More details will be announced in the near future.

Downloading v5.6.0

You can download the tarball of the released sources at:

Binary packages for several distributions can be found at:

Packages will be uploaded as soon as they are built by developers (Debian and Ubuntu debs as well as RPMs for Centos, RedHat, Fedora and OpenSUSE) or submitted by community for other operating systems.

A step by step installation tutorial is available at:

Documentation

Useful links:

Many thanks to those contributing with code, helping testing or advocating the project!

We are looking forward to meeting many of you at events around the world (online or in person), and invite you to join the efforts to improve Kamailio!

Thanks for flying Kamailio!