This is an old revision of the document!


New in v3.0.0

Testing period: September - October, 2009
Release due to: October 2009

IMPORTANT: Source code for Kamailio 3.0 is hosted on GIT repository at http://sip-router.org

IMPORTANT: SVN trunk on SourceForge.net is updated only for branches 1.5 or lower.

List of new features

!!! New in core

  • updates to transport layers: UDP, TCP/TLS and SCTP
  • asynchronous TCP sending
  • asynchronous message processing support
  • access to new features in parts like: memory managers, locking and synchronization, timers, DNS
  • build framework that allow creation of libraries from code, thus ability to make core more lightweight and remove duplications in an efficient way
  • send route - route called just before sending the message, meaning it will show the final content (headers and body updated) and makes available the destination IP address - more flexibility in handling DNS blacklists and filters
  • reload of some config variables, routes with names, flags with names
  • support to include files in config via include_file(“filename”)
  • support for defines (#!define, #!ifdef, #!ifndef, #!else, #!endif)

switch statement

  • support for regular expression matching for string
  • optimization for integer matching

sctp

  • support for sctp variants
  • macros for sctp statistics
  • blacklist support at the sctp level. If sctp_send_retries are used, the blacklist will work only for send (using SCTP_SEND_FAILED notifications). If sctp_send_retries is not used (default), there are 2 possible blacklist reasons: SEND or CONNECT (assoc. failed to be opened).
  • connection reuse & connection tracking

config file interpreter

  • type casts operators: (int), (str).
  • new operators eq, ne for string compares and ieq, ine for integer compares. The names are not yet final (use them at your own risk). Future version might use ==/!= only for ints (ieq/ine) and eq/ne for strings (under debate).

They are almost equivalent to = = or !=, but they force the conversion of their operands (eq to string and ieq to int), allowing among other things better type checking on startup and more optimisations. Non equiv. examples: 0 = = ”” (true) is not equivalent to 0 eq ”” (false: it evaluates to “0” eq ””). “a” ieq “b” (true: (int)“a” is 0 and (int)“b” is 0) is not equivalent to “a”

= "b" (false).

Note: internally = = and != are converted on startup to eq/ne/ieq/ine whenever possible (both operand types can be safely determined at start time and they are the same).

  • try to guess what the user wanted when operators that support multiple types are used on different typed operands. In general convert the right operand to the type of the left operand and then perform the operation. Exception: the left operand is undef. This applies to the following operators: +, == and !=.

Special case: undef as left operand:
For +: undef + expr → undef is converted to string ⇒ ”” + expr.
For = = and !=: undef = = expr → undef is converted to type_of expr.
If expr is undef, then undef = = undef is true (internally is converted to string).

  • expression evaluation changes: auto-convert to interger or string in function of the operators:
       int(undef)==0,  int("")==0, int("123")==123, int("abc")==0
       str(undef)=="", str(123)=="123".
  • new script operators: defined, strlen, strempty
    • defined expr - returns true if expr is defined, and false if not. Note: only a standalone avp or pvar can be undefined, everything else is defined.
    • strlen(expr) - returns the lenght of expr evaluated as string.
    • strempty(expr) - returns true if expr evaluates to the empty string (equivalent to expr==””). e.g.: if (defined $v && !strempty($v)) $len=strlen($v);
  • msg:len max_len comparison obsoleted and removed (it did not make any sense, msg:len > max_len was always false, use something like 4096 or 16384 in its place).
  • module search path support: loadpath takes now a list of directories separated by ':'. The list is searched in-order. For each directory d $d/${module_name}.so and $d/${module_name}/${module_name}.so are tried.
  • dns TXT, EBL and PTR support (both cache and non-cached resolver)
  • support for dual module interfaces: ser and kamailio
  • script mode can be switched between ser compatible, kamailio compatible and max compatibility (compatible with both as much as possible), using
      #!SER
      #!KAMAILIO
      #!OPENSER
      #!ALL
      #!MAXCOMPAT

where #!KAMAILIO is equivalent with #!OPENSER and #!ALL with #!MAXCOMPAT

event_route

  • route executed by core or modules when a specific event happens
    • event_route[htable:mod-init] - executed by htable module after module has been initialized

extended avps

new config variables

  • max_while_loops - maximum iterations allowed for a while (can be changed at runtime). Default 100.

New modules

  • auth identity
  • call_control
    • connector to call control application
  • drouting
    • prefix/time based routing module
  • cfg_db
  • cfg_rpc
  • ctl
  • memcached
    • hash table access for the popular memcached server
    • also support atomic operations (increment, decrement) on integers
  • kex
    • some of the features and updates of Kamailio core
  • pdb
    • number portability specific featured module
    • query portability database daemon
  • tmx
    • TM module extensions
    • $T_inv(pv) - access to pseudo-variables and attributes of INVITE while processing the CANCEL
  • topoh
    • topology hiding module
    • transparent for config file writer
    • independent of statless/stateful mode
    • temporary branch: tmp/core_events
  • iptrtpproxy
    • nat traversal using kernel space for media relaying
  • mi_rpc
  • xmlrpc

New in old modules

  • seas not ported yet to sip router core framework
  • carrierroute
    • new function cr_nofallback_route - route like existing cr_prime_route function, but uses CRC32 hash
    • new hash function random - for random routing distribution
  • htable
    • ability to count items matching name by a regular expression - $shtcn(ht⇒regexp)
    • ability to count items matching value by a regular expression - $shtcv(ht⇒regexp)
    • execute event_route[htable:mod-init] if it is defined, after module has been initialized
  • imc
    • support to specify extra headers to be added to local generated messages
  • lcr
    • added support for independent LCR instances, which improve virtualization of sip-router. for example, different domains can now manage their own least cost routes to their own gateways.
    • replaced gateway aliveness checking with new defunct_gw() function, which script writer can use to defunct an unresponsive or busy gateway for a desired period of time.
    • for simplicity, removed gateway group related functions load_gws_from_grp() and from_gw_grp() and group parameter from to_gw() function. use LCR instances as replacement.
  • msilo
    • check expiration time of REGISTER for m_dump() using contact parameters
  • presence_xml
    • new PV class: $xml(…)
    • handling of xml documents using XPath (evaluate expressions, update content)
  • pv
  • registrar
    • save(…) returns different code in case of insert, update or delete
  • textops
    • msg_apply_changes() - new function to apply changes done to SIP message (e.g., via subst(), append_hf(), remove_hf(), etc…)
      • the original content of SIP message is lost and the new content is processed further (e.g., if a header was removed, after using this function the check for existence of that header will return false; if a new header is added, after using the function, the check for existence of that header will return true)
  • utils
    • ability to interpret xcap documents
    • function: xcap_auth_status(watcher_uri, presentity_uri)
  • userblacklist
    • new function check_user_whitelist - check if the user is whitelisted in the userblacklist table

New tools

  • sercmd
    • command line application (similar to Asterisk cli)

External Links


Personal Tools