Kamailio SIP Server - New Features in 5.2.0
Previous stable version was 5.1.x, see what was new in that release at:
This is a draft of new features added in this version, manually updated, thus not always synchronized with what is new in source code repository.
New Modules
acc_json
Generate accounting records in JSON format.
app_python3
KEMI interpreter implementation for Python3.
app_ruby
KEMI interpreter implementation for Ruby.
db_redis
Database APIv1 implementation with a REDIS backend.
ims_ipsec_pcscf
IMS IPSec implementation for P-CSCF systems.
pua_json
Presence User Agent implementation with JSON messages.
New in Old Modules
acc
app_lua
LUAJIT variable to build agains LuaJIT compiler
defaut value for reload parameter set to 1
new module parameter - log_mode
app_python
benchmark
cfg_rpc
corex
functions to manage extended flags
setxflag(idx), resetxflag(idx), isxflagset(idx)
idx can be between 0 and 63
added set_send_socket() and set_recv_socket()
added set_source_address() function
added via_add_srvid() function
new function via_add_xavp_params(flags)
added sendx(uri, socket, data)
send() renamed to send_udp()
new function via_use_xavp_fields(mode)
db_mongodb
db_mysql
db_postgres
dialog
added function dlg_db_load_callid(val)
added h_id_start and h_id_step parameters
added dlg_db_load_extra() function
handle . for optional body parameter for rpc dlg.bridge_dlg
new rpc command dlg.stats_active - return stats about active dialogs by scanning internal hash table
dispatcher
add methoded to reinit state for all destinations in group
allow 'all' to update all destinations in group via RPC
added ds_list_exists() as alias to ds_list_exist()
congestion detection load balancing
new param ds_attrs_none
use xavps instead of avps
added ds_set_dst() and dst_set_domain()
new paraemter ds_db_extra_attrs
new function ds_select_routing(rules, mode, [limit])
added ping_from attribute
dmq
improved bus stability and reduce unnecessary state transfer
added 'pending' state for new, locally added nodes, until confirmed
continue to probe nodes marked as inactive/disabled
allow startup even if initial nodelist is empty
added optional target parameter to dmq_handle_message()
htable
added parameter event_callback_mode
new functions sht_has_name(…) and sht_has_str_value(…)
sht_has_name(htable, op, mval) - return >0 if there is an item matching its name with mval based on operator op
sht_has_str_valye(htable, op, mval) - return >0 if there is an item matching its string value with mval based on operator op
added sht_rm(htname, iname) - api function to remove an item from hash table
kemi functions to set values in hash table: sht_sets(), sht_seti(), sht_setxs(), sht_setxi() and sht_setex()
ims_diameter_server
ims_registrar_pcscf
ipops
json
jsonrpcs
kex
mtree
nathelper
allow variable for flags parameter of fix_nated_sdp(), add_rcv_param(), nat_uac_test()
send SIP ping if ping_nated_only=0 and sipping_flag is set
ndb_redis
nsq
p_usrloc
permissions
phonenum
pipelimit
added rpc command pl.list
allow offloading timer routine from fast timer to secondary wheel timer
allow to disable fetching cpu and network load
presence
pua_rpc
pv
new config variable $sas - return source address in socket format (proto:address:port)
added new transformation {uri.tosocket}
new function - xavp_params_implode(xname, pv)
new variable $mbu - the message buffer after applying changes, but the original buffer stays unchanged
new class of variables - $ksr(attr)
using * for header name matches any header for $hdr(name)
$msg(hdrc) returns the number of headers in sip message
$msg(fpart) - return first line and the headers
$msg(hdrs_len) - return the length of all headers
new transformation {s.unquote}
increased transformation buffer slots from 4 to 8
added transformation {s.unbracket}
rr
rtpengine
added aggressive_redetection param
setting tos value for the control commands - new parameter “control_cmd_tos”
added support for DTLS transports - added ability to explicitly request DTLS transports:
explicitly handle new option flags (transcoding)
added options block_dtmf and unblock_dtmf
added block_media and unblock_media function calls
sanity
allow variables in params
new tests for parsing Top Via header
do not send reply if mandatory headers are missing
option to skip sending the reply internally
new function - sanity_reply() that can be used in config to send a reply with a code and reason set by the module when detecting a problem inside sip message
sdpops
sipcapture
event_route[sipcapture:request] {
if(src_ip==1.2.3.4) {
sip_capture_forward("sip:2.3.4.5:5090");
return 0;
}
}
sipt
smsops
stun
tcpops
textops
new function msg_set_buffer(…) to kemi framework
is_audio_on_hold() returns hold type
added function append_body_part_hex(…)
added replace_str(match, repl, mode)
replace a string with another in the message buffer after the first line. The parameter mode coltrols if first (“f”) match or all (“a”) should be replaced
alternative to replace() that avoids regexp overhead when bare string can be matched
new function replace_body_str(mkey, rval, rmode)
new function replace_hdrs_str()
added replace_hdrs(re, sval)
tls
added support for OpenSSL engine and private keys in HSM
add support for OpenSSL engine and loading private keys from HSM
for when kamailio is a TLS edge proxy and needs to use HSM
currently we initialize the engine in worker processes as PKCS#11 libraries are not guaranteed to be fork() safe
new config params
engine: name the OpenSSL engine
engine_config: an OpenSSL config format file used to bootstrap engines
engine_algorithms: list of algorithms to delegate to the engine
tested with Gemalto SafeNet Luna (AWS CloudHSM) with RSA and EC private keys TLSv1.2 and PFS cipher suites
allow defining a tls profile (domain) for any address
token 'any' or 'all' can be used instead of the address [server:any] or [client:any]
useful when the IP address/port to listen on is not known upfront or many addresses are used to listen on
such profiles can be defined many times and must have server_name attribute (for SNI)
added server_name_mode attribute for tls domain profiles
tls.cfg - more examplea for tls domain profiles
renamed sip-router_cert.sh to tls_cert.sh - it is specific to the module, not the flavour of the application
tm
make processing of event routes for local requests reentrant
rpc tm.t_uac_start option to work with From and To headers only
added t_send_reply(code, reason)
addes relay_100 config parameter to support stateless operations
tmx
topos
execute event_route[topos:sending] with current sip message to be sent
if drop is used, then the message processing with topos is skipped
event route is executed after event_route[topos:outgoing]
new parameter event_mode to control what event_route blocks are executed
added param contact_host - set the address in Contact header
keep original contact in 3xx responses sent out
uac
remote registrations - added uac_reg_enable() and uac_reg_disable()
exported cfg function uac_reg_refresh(luuid)
call event route for uac_req_send() for second response
reg_active - new parameter to control if remote registrations are active - default 1 (active)
usrloc
partition column name can be set via modparam
new parameter rm_expired_delay - set how many seconds to delay the removal of an expired record (DB_ONLY mode)
execute cleanup by server_id
new parameter version_table
call contact expired callback for a domain with db_mode DB_ONLY
New in Core
new module exports interface
locking - added api functions for recursive lock sets
added xflags field to sip_msg_t - holds extended flags - 64 new flags in addition to the old 32 flags
new internal msg flag to add srvid param to local via
added internal flag for adding xavp fields to via params
parser - assign ids for more methods
pv - default number of buffer slots set to 40
new rpc command - core.ppdefines_full
xavp - extended to hold a bare void pointer value
added config defines for application version
print log_prefix after loglevel for more intuitive parsing
Interpreter
kemi - more core functions exported to kemi framework
kemi - added KSR.is_method_in(“mflags”)
check if current method matches one listed in the flags
flags are: I (INVITE), A (ACK), B (BYE), C (CANCEL), R (REGISTER), P (PUBLISH), S (SUBSCRIBE), N (NOTIFY), O (OPTIONS)
KSR.is_method_in(“IABC”)
kemi - renamed KSR.drop() to KSR.set_drop()
Parameters
new parameters to control the size of pv cache
pv_cache_limit - the limit how many pv declarations in the cache after which an action is taken. Default value is 2048
pv_cache_action - specify what action to be done when the size of pv cache is exceeded. If 0, print an warning log message when the limit is exceeded. If 1, warning log messages is printed and the cache systems tries to drop a $sht(…) declaration. Default is 0
aliased global param ip_free_bind to ip_nonlocal_bind - match better with linux system control option
new parameter kemi.onsend_route_callback
allow setting the name of the function to be called by kemi framework as equivalent of onsend_route {}
default value: ksr_onsend_route
set to empty string or “none” to skip the execution of this kemi callback
new parameter kemi.reply_route_callback
new parameter route_locks_size
if set, kamailio creates a group of recursive locks used to sync on execution of request_route and reply_route based on hashing ID of Call-ID header. In other words, if a message has triggered the execution of request_route or reply_route, any other message with the same Call-ID waits until the other one finishes the execution.
new parameter kemi.event_route_callback
set the name of kemi function to be executed for core event route equivalent
default value is not set (no callback function name). If set to “none”, it is also not executed.
callback function receives a string parameter with the name of the event
execute kemi event callback for “core:worker-one-init”
new core parameter xavp_via_params
new global parameter xavp_via_fields
Functions
Memory Managers
kamailio.cfg
added log_prefix parameter to print call-id, cseq, message type during SIP message processing
do not relay to foreign network if auth is not enabled
kamctl
default PID_FILE set to /var/run/kamailio/kamailio.pid
added mtree management command
more portable jsonrpc filter
kamdbctl - remove not working db migrate command
kamdbctl - schema - removed rpid and email_address columns from subscriber table
kamcli
Testing Framework