SIP Router - New features in 3.0.x version

The page collects the summary of the new features in SIP Router 3.0.0 version.

Kamailio (OpenSER) 3.0.0 was released on Jan 11, 2010, based on SIP Router 3.0.0 branch. You can find as well a comprehensive list of what is new in Kamailio (OpenSER) 3.0.0 at:

New SIP Router modules

  • call_control
    • connector to call control application
  • drouting
    • prefix/time based routing module
  • 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

New in old SIP Router modules

  • 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.
    • database changes: added lcr_id column to lcr and gw tables, replaced ping column of gw table with defunct column, replaced old indexes of gw and lcr tables with new ones.
  • 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
  • permissions
    • database changes: increased size of tag field of trusted table from 32 to 64 chars

New in SIP Router Core

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.

Navigation

Wiki

Other

QR Code
QR Code features:new-in-3.0.x (generated for current page)