Debian Codegraph @

doc/misc/NEWS

raw
1 Release notes for Kamailio/SIP Router (sr)
2 ***********************************************
3
4 Starting with release 3.2, release notes have
5 been posted to the Kamailio website. Release
6 notes for previous versions are posted below.
7
8 For releases after 3.1, please visit:
9
10 https://www.kamailio.org/wikidocs/features/new-in-5.2.x
11 https://www.kamailio.org/wikidocs/features/new-in-5.1.x
12 https://www.kamailio.org/wikidocs/features/new-in-5.0.x
13 https://www.kamailio.org/wikidocs/features/new-in-4.4.x
14 https://www.kamailio.org/wikidocs/features/new-in-4.3.x
15 https://www.kamailio.org/wikidocs/features/new-in-4.2.x
16 https://www.kamailio.org/wikidocs/features/new-in-4.1.x
17 https://www.kamailio.org/wikidocs/features/new-in-4.0.x
18 https://www.kamailio.org/wikidocs/features/new-in-3.3.x
19 https://www.kamailio.org/wikidocs/features/new-in-3.2.x
20
21 Earlier verisons are listed below.
22 ===================================================
23
24 sip-router 3.1 changes
25
26 core:
27 - Dragonfly BSD support
28 - statistics / counters support for tcp and sctp (enable by default)
29 - statistics / counters api
30 - networks addresses support in ip comparisons (src_ip, dst_ip, to_ip)
31 with strings or rvalue expressions.
32 E.g.: $ip=10.0.0.0; if (src_ip == $ip +"/8") ....
33 - lots of module functions automatically support now expressions or
34 variables in function parameters. This applies to all the module
35 functions declared without a fixup, with a fixup and the corresponding
36 free_fixup function or with a compatible ser or kamailio style standard
37 fixup (declared in sr_module.h or mod_fix.h).
38 E.g.: f($a, "b = " + $b); t_set_fr($v + 2 + $x).
39 t_set_fr($foo) (equivalent now with t_set_fr("$foo")).
40 - all the module functions can now be called with any constant expression
41 as parameters. E.g.: f("7 *" +" 6 = " + 7 * 6);
42 - major performance increase on Linux multi-cpu machines that send a lot
43 of UDP IPv4 packets (40-50% faster in stateless mode). For it to work
44 udp4_raw must be enabled or set into auto mode in sr.cfg and sr must be
45 started as root or with CAP_NET_RAW. Note that even if udp4_raw is
46 off (default), if sr was started with enough privileges, it can be
47 enabled at runtime.
48 The support for using raw sockets is also available on FreeBSD (compiled
49 by default but not tested for performance yet), NetBSD, OpenBSD and
50 Darwin (not tested and not compiled by default, needs
51 make cfg extra_defs=-DUSE_RAW_SOCKS). To check if the support is
52 compiled, use ser -V |grep --color RAW_SOCKS or for a running
53 ser: sercmd core.udp4_raw_info.
54 See udp4_raw, udp4_raw_mtu and udp4_raw_ttl below.
55 - asynchronous TLS support
56 - onreply_route {...} is now equivalent with onreply_route[0] {...}
57 - global, per protocol blacklist ignore masks (via extended send_flags).
58 See dst_blacklist_udp_imask a.s.o (dst_blacklist_*_imask).
59 - per message blacklist ignore masks
60 - route() now supports rvalue expressions (e.g. route("test"+$i))
61 - support for permanent entries in the DNS cache.
62
63 new config variables:
64 - udp4_raw - enables raw socket support for sending UDP IPv4 datagrams
65 (40-50% performance increase on linux multi-cpu).
66 Possible values: 0 - disabled (default), 1 - enabled, -1 auto.
67 In "auto" mode it will be enabled if possible (sr started as root or
68 with CAP_NET_RAW).
69 udp4_raw can be used on Linux and FreeBSD. For other BSDs and Darwin
70 one must compile with -DUSE_RAW_SOCKS.
71 On Linux one should also set udp4_raw_mtu if the MTU on any network
72 interface that could be used for sending is smaller than 1500.
73 Can be set at runtime as long as sr was started with enough privileges
74 (core.udp4_raw).
75 - udp4_raw_mtu - MTU value used for UDP IPv4 packets when udp4_raw is
76 enabled. It should be set to the minimum MTU of all the network
77 interfaces that could be used for sending. The default value is 1500.
78 Note that on BSDs it does not need to be set (if set it will be ignored,
79 the proper MTU will be used automatically by the kernel). On Linux it
80 should be set.
81 Can be set at runtime (core.udp4_raw_mtu).
82 - udp4_raw_ttl - TTL value used for UDP IPv4 packets when udp4_raw is
83 enabled. By default it is set to auto mode (-1), meaning that the
84 same TTL will be used as for normal UDP sockets.
85 Can be set at runtime (core.udp4_raw_ttl).
86 - dst_blacklist_udp_imask - global blacklist events ignore mask for udp
87 (a blacklist event/reason set in this variable will be ignored when
88 deciding whether or not to blacklist an udp destination). Can be set
89 at runtime. Default: 0 (no blacklist reason is ignored).
90 Possible values: 0 -disabled, 2 - send error; 4 - connect error,
91 8 - icmp (reserverd), 16 - transaction timeout,
92 32 - 503 received, 64 - administratively prohibited
93 (manually set).
94 - dst_blacklist_tcp_imask - like dst_blacklist_udp_imask, but for tcp.
95 - dst_blacklist_tls_imask - like dst_blacklist_tls_imask, but for tcp.
96 - dst_blacklist_sctp_imask -like dst_blacklist_sctp_imask, but for tcp.
97 - dns_cache_rec_pref - DNS cache record preference:
98 0 - do not check duplicates (default)
99 1 - prefer old records
100 2 - prefer new records
101 3 - prefer records with longer lifetime
102
103 modules:
104 - counters: functions and RPCs for manipulating counters (statistics):
105 modparam("counters", "script_counter", name)
106 cnt_inc(name)
107 cnt_add(name, val)
108 cnt_reset(name)
109 - blst: functions for ignoring blacklist events per message:
110 blst_set_ignore(mask): set the events in mask in the per
111 per message blacklist ignore mask for a request
112 (see dst_blacklist_udp_imask for possible values).
113 The basic operation is: msg_blst_ignore_mask|=mask.
114 blst_clear_ignore(mask): like blst_set_ignore(mask), but instead
115 of setting some events, it clears them
116 (msg_blst_ignore_mask&=~mask).
117 blst_rpl_set_ignore(mask): like blst_set_ignore(mask), but sets
118 the mask for possible local replies to the current message.
119 blst_rpl_clear_ignore(mask): like blst_rpl_ignore(mask), but
120 clears instead of setting.
121 - tls:
122 certificate revocation list (CRL) support.
123 asynchronous TLS support
124 new TLS RPCs (tls.info, tls.options), tls.list more detailed.
125 removed handshake_timeout and send_timeout module parameters /
126 config variables. The values from tcp are used instead
127 (tcp_connect_timeout and tcp_send_timeout).
128 runtime config support
129 more config options:
130 crl - certificate revocation list file path (PEM format).
131 send_close_notify - enables/disables sending close notify
132 alerts prior to closing the corresponding TCP connection.
133 Sending the close notify prior to tcp shutdown is "nicer"
134 from a TLS point of view, but it has a measurable
135 performance impact. Default: off. Can be set at runtime
136 (tls.send_close_notify).
137 con_ct_wq_max - per connection tls maximum clear text write
138 queue size. The TLS clear-text write queues are used when a
139 send attempt has to be delayed due to an on-going TLS level
140 renegotiation. Can be set at runtime (tls.con_ct_wq_max).
141 Default: 65536 (64 Kb).
142 ct_wq_max - maximum total for all the tls clear text write
143 queues (summed). Can be set at runtime (tls.ct_wq_max).
144 Default: 10485760 (10 Mb).
145 ct_wq_blk_size - internal TLS pre-write (clear-text) queue
146 minimum block size (advance tunning or debugging).
147 Can be set at runtime (tls.ct_wq_blk_size).
148 Default: 4096 (4 Kb).
149 verbose debug messages can be enable by re-compiling with
150 -DTLS_RD_DEBUG (for the read path) and -DTLS_WR_DEBUG
151 (for the write path).
152 new options for better tuning memory usage for modern openssl
153 versions: ssl_release_buffers (default 1), ssl_freelist_max_len
154 (default 0), ssl_max_send_fragment, ssl_read_ahead (default 0).
155 For more info see modules/doc/tls/README.
156 compression is now disabled by default. To enable it set
157 tls_disable_compression to 0, but note that memory usage will
158 increase dramatically especially for large number of
159 connections (>1000).
160 tm:
161 - reason header support (RFC3326) both for CANCELs generated due to a
162 received final reply and for hop by hop CANCELs generated because of a
163 received CANCEL.
164 E.g.: reason header added for a CANCEL generated after a 200 reply was
165 received on one of the branches "Reason: SIP;cause=200".
166 The reason header support can be turned on/off using either tm
167 module parameters or in the end to end CANCEL case also on a per
168 transaction basis, using a script function:
169 local_cancel_reason = 0 | 1 (default 1/on) - turns on adding reason
170 headers for CANCELs generated due to a final reply. Can be changed
171 at runtime.
172 e2e_cancel_reason = 0 | 1 (default 1/on) - turns on copying reason
173 headers from a received end to end CANCEL (the generated hop by hop
174 CANCELs will have the same reason headers as the received CANCEL).
175 Can be changed at runtime.
176 t_set_no_e2e_cancel_reason(0|1) - enable/disable cancel reason
177 header copying on a per transaction basis (0 - enable, 1 disable).
178 - t_reply() can be used both from the main/core onreply_route{} and tm
179 onreply_route[...]{}s.
180
181
182
183 sip-router 3.0 changes
184
185 core:
186 - type casts operators: (int), (str).
187 - new operators eq, ne for string compares and ieq, ine for interger
188 compares. The names are not yet final (use them at your own risk).
189 Future version might use ==/!= only for ints (ieq/ine) and eq/ne for
190 strings (under debate).
191 They are almost equivalent to == or !=, but they force the conversion
192 of their operands (eq to string and ieq to int), allowing among other
193 things better type checking on startup and more optimizations.
194 Non equiv. examples: 0 == "" (true) is not equivalent to 0 eq ""
195 (false: it evaluates to "0" eq ""). "a" ieq "b" (true: (int)"a" is 0
196 and (int)"b" is 0) is not equivalent to "a" == "b" (false).
197 Note: internally == and != are converted on startup to eq/ne/ieq/ine
198 whenever possible (both operand types can be safely determined at
199 start time and they are the same).
200 - try to guess what the user wanted when operators that support multiple
201 types are used on different typed operands. In general convert the
202 the right operand to the type of the left operand and then perform the
203 operation. Exception: the left operand is undef.
204 This applies to the following operators: +, == and !=.
205 Special case: undef as left operand:
206 For +: undef + expr -> undef is converted to string => "" + expr.
207 For == and !=: undef == expr -> undef is converted to type_of expr.
208 If expr is undef, then undef == undef is true (internally is converted
209 to string).
210 - expression evaluation changes: auto-convert to interger or string
211 in function of the operators:
212 int(undef)==0, int("")==0, int("123")==123, int("abc")==0
213 str(undef)=="", str(123)=="123".
214 - new script operators: defined, strlen, strempty
215 defined expr - returns true if expr is defined, and false if not.
216 Note: only a standalone avp or pvar can be
217 undefined, everything else is defined.
218 strlen(expr) - returns the length of expr evaluated as string.
219 strempty(expr) - returns true if expr evaluates to the empty
220 string (equivalent to expr=="").
221 e.g.: if (defined $v && !strempty($v)) $len=strlen($v);
222 - msg:len max_len comparison obsoleted and removed (it did not make any
223 sense, msg:len > max_len was always false, use something like
224 4096 or 16384 in its place).
225 - module search path support: loadpath takes now a list of directories
226 separated by ':'. The list is searched in-order. For each directory d
227 $d/${module_name}.so and $d/${module_name}/${module_name}.so are tried.
228 - dns TXT, EBL and PTR support (both cache and non-cached resolver)
229 - support for dual module interfaces: ser and kamailio
230 config script changes:
231 - script mode can be switched between ser compatible, kamailio compatible
232 and max compatibility (compatible with both as much as possible), using
233 #!SER
234 #!KAMAILIO
235 #!OPENSER
236 #!ALL
237 #!MAXCOMPAT
238 where #!KAMAILIO is equivalent with #!OPENSER and #!ALL with #!MAXCOMPAT
239 - support for kamailio style pvars
240 - C-like switch()/case (integer only)
241 - while()
242 - include file support: include_file "somefile"
243 - event route support: event_route[module_name:eventid]
244 - user and shm_force_alloc must now appear prior to any modparam() or route
245 block.
246 - per message send_flags support (see set_forward_no_connect(),
247 set_forward_reply_no_connect(), set_forward_close() & set_reply_close())
248
249 build system:
250 - multiple modules directories are now supported (defined in Makefile.dirs)
251
252 new config variables:
253 - max_while_loops - maximum iterations allowed for a while (can be changed
254 at runtime). Default 100.
255 - log_name - set the application name used when printing to syslog.
256 - mem_summary - memory debugging info logged on exit or on SIGUSR1.
257 The value is a combination of flags: 0 - off,
258 1 - dump all used memory blocks and some statistics (lots of output),
259 2 - dump a summary of the used memory blocks (works only if
260 compiled with DBG_QM_MALLOC or DBG_F_MALLOC).
261 Default: 1.
262 Can be changed at runtime.
263 - shm = number or shm_mem = number - size of shared memory in MB. It's
264 overwritten if a value is specified on the command line (-m val).
265 Default: 32 Mb. Must appear prior to any modparam() or route block.
266
267 new script commands:
268 add_local_rport() - adds the rport parameter to the added via header
269 (rfc3581).
270 set_forward_no_connect() - the message will be forwarded only if there is
271 already an existing connection to the destination (it applies only to
272 connection oriented protocols like tcp, tls and in the future sctp).
273 set_reply_no_connect() - like set_forward_no_connect(), but works for
274 replies to the current message.
275 set_forward_close() - try to close the connection after forwarding the
276 current message (it applies only when the underlying protocol is
277 connection oriented).
278 set_reply_close() - like set_forward_close(), but it works for replies to
279 the current message.
280
281 tm:
282 disable_6xx_block parameter - if set, will treat 6xx replies like normal
283 replies (non rfc conformant). Default: off.
284 See also t_set_disable_6xx().
285 t_set_disable_6xx(0|1) - can be used to turn off/on the special 6xx handling
286 on a per transaction basis.
287 t_set_disable_failover(0|1) - can be used to turn off/on dns failover on a
288 per transaction basis.
289
290
291
292 2.1.0 changes
293
294 modules:
295 - textops - functions:
296 - remove_hf_re("regexp") -- filter message headers out
297 by matching the header name field against a regular
298 expression.
299 - avp - export new selects table to allow dissecting the content of an
300 attribute by interpreting it as a "name-addr" value
301 - auth - experimental support for one-time nonces: when enabled a nonce
302 will be accepted only for one response (each new request will
303 be challenged). See one_time_nonce.
304 - experimental support for nc checking when qop=auth
305 (fast, non-locking implementation, see nonce_count,
306 nc_array_size, nc_array_order and nid_pool_no)
307 - switched to base64 nonces
308 - record nonce generation time inside the nonce so that a
309 received nonce can be checked against ser start time
310 (if older => stale). This allows gracefully handling ser
311 restarts with different auth configs.
312 - added extra authentication checks support, to protect
313 against various reply attacks.
314 - params:
315 - nonce_auth_max_drift - maximum difference in seconds
316 from the current time, if a nonce appears to be
317 created in the future (if exceeded the nonce is
318 considered stale).
319 - one_time_nonce - if enabled each nonce is allowed
320 only once => each new request (including
321 retransmissions!) will be challenged. It should be
322 used only in stateful mode (so that tm deals with
323 the retransmissions). The major disadvantage is that
324 the UA won't be able to used any cached credentials
325 (=> extra messages, extra round trips, more work for
326 the proxy)
327 - otn_in_flight_no - maximum number of in-flight nonces
328 for one-time-nonces. It must be a number of the form
329 2^k (if not it will be automatically rounded down).
330 The memory used will be otn_in_flight_no/8
331 - otn_in_flight_order - like otn_in_flight_no, but
332 instead of specifying the number as 2^k, it directly
333 sets k (otn_in_flight_no=2^otn_in_flight_order)
334 - nonce_count - if enabled and qop=auth or
335 qop=auth-int, store and check received nc values
336 (for details see rfc2617 and auth/doc). It should be
337 used only in stateful mode (so that tm deals with
338 the retransmissions which would otherwise be
339 challenged). The major advantage is greatly
340 enhanced security (extremely small probability of
341 a successful replay attack) combine with support
342 for cached credentials (if the UAs do support qop
343 and auth)
344 - nc_array_size - size of the array used for storing
345 nc values, default 1Mb. It will be rounded down to
346 a 2^k value. It represents the maximum number of
347 in-flight nonces supported
348 - nc_array_order - equivalent to nc_array_size, but
349 instead of specifying the size in bytes, it can
350 be used to directly set the power of 2 used
351 (nc_array_size=2^nc_array_order)
352 - nid_pool_no - number of nc and one-time-nonce array
353 and index partitions, useful for increasing
354 performance on multi-cpu systems (default 1,
355 recommended 4)
356 - auth_checks_register, auth_checks_no_dlg,
357 auth_checks_in_dlg - flags specifying which extra
358 message part/parts will be checked for change before
359 allowing nonce reuse. See the auth module docs for
360 for more information (modules/auth/README).
361 - blst - new module containing script blacklist manipulations functions
362 (the source of a message can be blacklisted, removed from the
363 blacklist or checked for presence in the blacklist).
364 - tm - added API function t_get_canceled_ident(): returns the hash
365 coordinates (bucket/index) of the transaction the currently
366 processed CANCEL is targeting. Requires AS support enabled.
367 - added API function ack_local_uac(): allow generating the ACKs
368 for 2xx'ed locally originated INVITEs - new headers and body can
369 now also be appended to it. Requires AS support enabled.
370 - matching of E2E ACKs no longer requires full From HF identity,
371 but rather only tag equality (this behaviour can be changed by
372 defining TM_E2E_ACK_CHECK_FROM_URI)
373 - added t_reset_fr(), t_reset_retr(), t_reset_max_lifetime()
374 - t_relay_to renamed to t_relay_to_avp (undocumented function)
375 - t_relay() can now also take host and port parameters (e.g.
376 t_relay(host, port)), behaving like a statefull
377 forward(host, port) version (forward to host:port using the same
378 protocol on which the message was received)
379 - t_relay_to_udp(), t_relay_to_tcp() and t_relay_to_tls() work
380 now even with no parameters: in this case the message is
381 forwarded using the request uri, but with the specified protocol
382 (equivalent to a t_relay() with a forced protocol)
383 - method for canceling unreplied branches can now be selected
384 using the new cancel_b_method tm parameter.
385 - support for adding a 503 reply source to the blacklist for
386 the time specified in the Retry-After header (see the new tm
387 parameters blst_503, blst_503_def_timeout, blst_503_min_timeout
388 and blst_503_max_timeout).
389 - different error replies for too many branches (500 but with
390 different text), resolve error (478) or send error
391 (477).
392 - tm can be configured not to automatically send 100 replies
393 for invites either globally (see the auto_inv_100 parameter)
394 or on a per transaction basis (see t_set_auto_inv_100(...))
395 - t_relay* error reply are delayed till the end of the script
396 to allow the script writer to overwrite them
397 - branches are always canceled hop by hop
398 - cancels for silently canceled branches (no replies ever
399 received) are automatically generated if later a provisional
400 reply arrives on such a branch
401 - noisy_ctimer is now 1 (on) by default
402 - added maximum transaction lifetime - a transaction is not
403 allowed to be active longer than this interval. See
404 t_set_max_lifetime(), max_inv_lifetime and max_noninv_lifetime.
405 - support for changing the retransmission intervals on the fly,
406 on a per transaction basis (it is enabled if tm is compiled
407 with -DTM_DIFF_RT_TIMEOUT -- default): t_set_retr(t1, t2).
408 - transaction are deleted the moment they are not referenced
409 anymore (removed the need for the delete timer) -- this
410 should improve memory usage on very busy proxies.
411 - lots of callbacks added
412 - new onsend callbacks support (require defining TMCB_ONSEND prior
413 to compiling tm)
414 - behaviour when receiving a CANCEL which doesn't match any
415 transaction can be selected using the unmatched_cancel param.
416 - params:
417 - cancel_b_method - selects one of the three methods
418 for dealing with unreplied branches when the
419 transaction must be canceled. The possible values
420 are 0 (old behaviour) for stopping request
421 retransmission on the branch and act as if
422 the branch was immediately replied with a 487,
423 1 for continuing to retransmit the request until an
424 answer is received or the timeout kicks in (default)
425 and
426 2 for stopping the request retransmission and sending
427 CANCEL on the branch (not rfc conforming).
428 For more information see tm docs.
429 - blst_503 - if set and if the blacklist is used
430 (use_dst_blacklist=1), add the source of a 503 reply
431 to the blacklist
432 - blst_503_def_timeout - if the Retry-After header from
433 a 503 reply is missing, use this value for the
434 blacklist timeout (in s). Depends on blst_503.
435 The default value is 0 ( do not blacklist if no
436 Retry-After is present).
437 - blst_503_min_timeot (in s) - if the 503 reply
438 Retry-After header value is less, use this value
439 for the blacklist timeout. Depends on blst_503.
440 The default value is 0.
441 - blst_503_max_timeout (in s) - if the 503 reply
442 Retry-After header value is greater, use this value
443 instead. Depends on blst_503.
444 The default value is 3600 s.
445 - auto_inv_100 - if set (default) tm will automatically
446 send an 100 reply to INVITEs (see also
447 t_set_auto_inv_100())
448 - noisy_ctimer is now 1 by default
449 - max_inv_lifetime & max_noninv_lifetime - default
450 maximum lifetimes for an invite or non-invite
451 transaction. After this interval has passed from
452 the transaction creation the transaction will be
453 either switched into the wait state or in the
454 final response retransmission state => a transaction
455 will be kept in memory for maximum:
456 max_*inv_lifetime + fr_timer /*ack w.*/ +wait_timer.
457 - unmatched_cancel - selects between forwarding cancels
458 that do not match any transaction statefully (0,
459 default value), statelessly (1) or dropping them
460 (2). Note that the statefull forwarding has an
461 additional hidden advantage: tm will be able to
462 recognize INVITEs that arrive after their CANCEL.
463 Note also that this feature could be used to try
464 a memory exhaustion DOS attack against a proxy that
465 authenticates all requests, by continuously flooding
466 the victim with CANCELs to random destinations
467 (since the CANCEL cannot be authenticated, each
468 received bogus CANCEL will create a new transaction
469 that will live by default 30s).
470 - functions:
471 - t_reset_fr() -- resets the current transaction
472 fr_inv_timer and fr_timer to the default values
473 (set via the tm modparams fr_inv_timer and fr_timer).
474 - t_reset_retr() -- resets the current transaction
475 retransmission intervals on the fly, to the default
476 values (set via the tm modparams retr_timer1 and
477 retr_timer2).
478 - t_reset_max_lifetime() -- resets the current
479 transaction maximum lifetime to the default value
480 (set via the tm modparam max_inv_lifetime or
481 max_noninv_lifetime).
482 - t_grep_status("code") -- returns true if any branch
483 received code as the final reply (or if no final
484 reply was yet received, but a "code" provisional
485 reply).
486 - t_set_auto_inv_100(on/off) - switch automatically
487 sending 100 replies to INVITEs on/off on a per
488 transaction basis. It overrides the tm param.
489 auto_inv_100.
490 - t_set_max_lifetime(inv, noninv) - changes the
491 maximum transaction lifetime on the fly, for the
492 current or next to be created transaction.
493 - t_set_retr(t1, t2) - changes the retransmissions
494 intervals on the fly, on a per transaction basis.
495 core:
496 - most tcp config vars migrated to the dynamic config framework
497 (can be changed at runtime, e.g.
498 sercmd cfg.set_now_int tcp connection_lifetime 180 )
499 - fallback to tcp or other congestion controlled transport
500 protocol if a forwarded udp sip request is greater than
501 udp_mtu (config). Default off. See udp_mtu and
502 udp_mtu_try_proto.
503 - sctp support (one-to-many, work in progress, for now linux
504 and freebsd only)
505 - partial cygwin (windows) support revived: core+static modules,
506 no ipv6, no tcp, no dynamic modules
507 - most of the config variables can now be changed on the fly,
508 without ser restart (migration work in progress)
509 - tcp improvements (better tcp timers, send fd cache, special
510 options support)
511 - dns naptr support (see dns_try_naptr and dns_<proto>_pref)
512 - dns srv based load balancing support (see dns_srv_lb)
513 - support for locking ser's pages in memory, pre-mapping
514 all the shared memory on startup (fill it with 0)
515 - real time options
516 - devel: new PROC_INIT rank, init_child(PROC_INIT) called first
517 - futex support on linux (better behaviour when waiting on
518 long held locks, almost no performance impact otherwise)
519 - when dns search list was used for resolution, store the "link"
520 between the short name and long name in cache as CNAME record
521
522 new config variables:
523 tcp_rd_buf_size = buffer size used for tcp reads.
524 A high buffer size increases performance on server with few
525 connections and lot of traffic on them, but also increases
526 memory consumption (so for lots of connection is better
527 to use a low value). Note also that this value limits the
528 maximum datagram size that can be received over tcp.
529 Default: 4096, can be changed at runtime.
530 tcp_wq_blk_size = block size used for tcp async writes. It should be big
531 enough to hold a few datagrams. If it's smaller than a
532 datagram (in fact a tcp write()) size, it will be rounded
533 up. It has no influenced on the number of datagrams
534 queued (for that see tcp_conn_wq_max or tcp_wq_max).
535 It has mostly debugging and testing value (can be ignored).
536 Default: 2100 (~ 2 INVITEs), can be changed at runtime.
537 tcp_no_connect = yes/no - disable connects, ser will only accept new
538 connections, it will never try to open new ones.
539 Default: no, can be changed at runtime.
540 udp_mtu = number - fallback to another protocol (udp_mtu_try_proto must be
541 set also either globally or per packet) if the constructed
542 request size is greater than udp_mtu.
543 Recommended size: 1300. Default: 0 (off).
544 udp_mtu_try_proto = TCP|TLS|SCTP|UDP - if udp_mtu !=0 and udp forwarded
545 request size (after adding all the "local" headers) >
546 udp_mtu, use this protocol instead of udp. Only the
547 Via header will be updated (e.g. The Record-Route
548 will be the one built for udp).
549 Default: UDP (off). Recommended: TCP.
550 force_rport =yes/no - like force_rport(), but works globally.
551 disable_sctp = yes/no - disable sctp support (default auto, see enable_sctp)
552 enable_sctp = 0/1/2 - disable (0)/enable (1)/auto (2) sctp support,
553 default auto (2)
554 sctp_children = number - sctp children no (similar to udp children)
555 sctp_socket_rcvbuf = number - size for the sctp socket receive buffer
556 sctp_socket_sndbuf = number - size for the sctp socket send buffer
557 sctp_autoclose = seconds - number of seconds before autoclosing an idle
558 association (default: 180 s).
559 Can be changed at runtime, but it will affect only new
560 associations. E.g.:
561 $ sercmd cfg.set_now_int sctp autoclose 120
562 sctp_send_ttl = milliseconds - number of milliseconds before an unsent
563 message/chunk is dropped (default: 32000 ms or 32 s).
564 Can be changed at runtime, e.g.:
565 $ sercmd cfg.set_now_int sctp send_ttl 180000
566 sctp_send_retries - how many times to attempt re-sending a message on a
567 re-opened association, if the sctp stack did give up
568 sending it (it's not related to sctp protocol level
569 retransmission). Useful to improve reliability with
570 peers that reboot/restart or fail over to another
571 machine. WARNING: use with care and low values (e.g.
572 1-3) to avoid "multiplying" traffic to unresponding
573 hosts (default: 0).
574 Can be changed at runtime.
575 sctp_assoc_tracking = yes/no - controls whether or not sctp associations
576 are tracked inside ser/sip-router. Turning it off would result in
577 less memory being used and slightly better performance, but it will also
578 disable some other features that depend on it (e.g. sctp_assoc_reuse).
579 Default: yes.
580 Can be changed at runtime (sercmd sctp assoc_tracking 0), but changes
581 will be allowed only if all the other features that depend on it are
582 turned off (for example it can be turned off only if first
583 sctp_assoc_reuse was turned off).
584 Note: turning sctp_assoc_tracking on/off will delete all the tracking
585 information for all the currently tracked associations and might introduce
586 a small temporary delay in the sctp processing if lots of associations
587 were tracked.
588 Config options depending on sctp_assoc_tracking being on:
589 sctp_assoc_reuse.
590 sctp_assoc_reuse = yes/no - controls sctp association reuse. For now only
591 association reuse for replies is affected by it. Default: yes.
592 Depends on sctp_assoc_tracking being on.
593 Note that even if turned off, if the port in via corresponds to the
594 source port of the association the request was sent on or if rport is
595 turned on (force_rport() or via containing a rport option), the
596 association will be automatically reused by the sctp stack.
597 Can be changed at runtime (sctp assoc_reuse), but it can be turned on
598 only if sctp_assoc_tracking is on.
599 sctp_max_assocs = number - maximum number of allowed open sctp associations.
600 -1 means maximum allowed by the OS. Default: -1.
601 Can be changed at runtime (e.g.:
602 sercmd cfg.set_now_int sctp max_assocs 10 ).
603 When the maximum associations number is exceeded and a new associations
604 is opened by a remote host, the association will be immediately closed.
605 However it is possible that some sip packets get through (especially if
606 they are sent early, as part of the 4-way handshake).
607 When ser/sip-router tries to open a new association and the max_assocs
608 is exceeded the exact behaviour depends on whether or not
609 sctp_assoc_tracking is on. If on, the send triggering the active open
610 will gracefully fail, before actually opening the new association and no
611 packet will be sent. However if sctp_assoc_tracking is off, the
612 association will first be opened and then immediately closed. In general
613 this means that the initial sip packet will be sent (as part of the 4-way
614 handshake).
615 sctp_srto_initial = milliseconds - initial value of the retr. timeout, used
616 in RTO calculations (default: OS specific).
617 Can be changed at runtime (sctp srto_initial) but it will affect only new
618 associations.
619 sctp_srto_max = milliseconds - maximum value of the retransmission timeout
620 (RTO) (default: OS specific).
621 WARNING: values lower than the sctp sack_delay will cause lots of
622 retransmissions and connection instability (see sctp_srto_min for more
623 details).
624 Can be changed at runtime (sctp srto_max) but it will affect only new
625 associations.
626 sctp_srto_min = milliseconds - minimum value of the retransmission timeout
627 (RTO) (default: OS specific).
628 WARNING: values lower than the sctp sack_delay of any peer might cause
629 retransmissions and possible interoperability problems. According to the
630 standard the sack_delay should be between 200 and 500 ms, so avoid trying
631 values lower than 500 ms unless you control all the possible sctp peers
632 and you do make sure their sack_delay is higher or their sack_freq is 1.
633 Can be changed at runtime (sctp srto_min) but it will affect only new
634 associations.
635 sctp_asocmaxrxt = number - maximum retransmissions attempts per association
636 (default: OS specific). It should be set to sctp_pathmaxrxt * no. of
637 expected paths.
638 Can be changed at runtime (sctp asocmaxrxt) but it will affect only new
639 associations.
640 sctp_init_max_attempts = number - maximum INIT retransmission attempts
641 (default: OS specific).
642 Can be changed at runtime (sctp init_max_attempts).
643 sctp_init_max_timeo = milliseconds - maximum INIT retransmission timeout (RTO
644 max for INIT). Default: OS specific.
645 Can be changed at runtime (sctp init_max_timeo).
646 sctp_hbinterval = milliseconds - sctp heartbeat interval. Setting it to -1
647 will disable the heartbeats. Default: OS specific.
648 Can be changed at runtime (sctp hbinterval) but it will affect only new
649 associations.
650 sctp_pathmaxrxt = number - maximum retransmission attempts per path (see also
651 sctp_asocmaxrxt). Default: OS specific.
652 Can be changed at runtime (sctp pathmaxrxt) but it will affect only new
653 associations.
654 sctp_sack_delay = milliseconds - delay until an ACK is generated after
655 receiving a packet. Default: OS specific.
656 WARNING: a value higher than srto_min can cause a lot of retransmissions
657 (and strange problems). A value higher than srto_max will result in very
658 high connections instability. According to the standard the sack_delay
659 value should be between 200 and 500 ms.
660 Can be changed at runtime (sctp sack_delay) but it will affect only new
661 associations.
662 sctp_sack_freq = number - number of packets received before an ACK is sent
663 (without waiting for the sack_delay to expire). Default: OS specific.
664 Note: on linux with lksctp up to and including 1.0.9 is not possible to
665 set this value (having it in the config will produce a warning on
666 startup).
667 Can be changed at runtime (sctp sack_freq) but it will affect only new
668 associations.
669 sctp_max_burst = number - maximum burst of packets that can be emitted by an
670 association. Default: OS specific.
671 Can be changed at runtime (sctp max_burst) but it will affect only new
672 associations.
673 server_id = number - A configurable unique server id that can be used to
674 discriminate server instances within a cluster of
675 servers when all other information, such as IP addresses
676 are the same.
677 loadpath = <modules path> - directory where to load the modules from (-L
678 equivalent); modules can be loaded simply by specifying their name
679 (loadmodule "maxfwd")
680 tcp_fd_cache = yes | no (default yes) - if enabled FDs used for sending
681 will be cached inside the process calling tcp_send (performance increase
682 for sending over tcp at the cost of slightly slower connection closing and
683 extra FDs kept open)
684 tcp_async = yes | no (default yes) - if enabled all the tcp writes that
685 would block / wait for connect to finish, will be queued and attempted
686 latter (see also tcp_conn_wq_max and tcp_wq_max).
687 tcp_buf_write = obsoleted synonim for tcp_async
688 tcp_conn_wq_max = bytes (default 32 K) - maximum bytes queued for write
689 allowed per connection. Attempting to queue more bytes would result
690 in an error and in the connection being closed (too slow). If
691 tcp_write_buf is not enabled, it has no effect.
692 tcp_wq_max = bytes (default 10 Mb) - maximum bytes queued for write allowed
693 globally. It has no effect if tcp_write_buf is not enabled.
694 tcp_defer_accept = yes | no (default no) on freebsd / number of seconds
695 before timeout on linux (default disabled) - tcp accepts will be
696 delayed until some data is received (improves performance on proxies
697 with lots of opened tcp connections). See linux tcp(7) TCP_DEFER_ACCEPT
698 or freebsd ACCF_DATA(0). For now linux and freebsd only.
699 WARNING: the linux TCP_DEFER_ACCEPT is buggy (<=2.6.23) and doesn't
700 work exactly as expected (if no data is received it will retransmit
701 syn acks for ~ 190 s, irrespective of the set timeout and then it will
702 silently drop the connection without sending a RST or FIN). Try to
703 use it together with tcp_syncnt (this way the number of retrans.
704 SYNACKs can be limited => the timeout can be controlled in some way).
705 tcp_delayed_ack = yes | no (default yes when supported) - initial ACK for
706 opened connections will be delayed and sent with the first data
707 segment (see linux tcp(7) TCP_QUICKACK). For now linux only.
708 tcp_syncnt = number of syn retr. (default not set) - number of SYN
709 retransmissions before aborting a connect attempt (see linux tcp(7)
710 TCP_SYNCNT). Linux only.
711 tcp_linger2 = seconds (not set by default) - lifetime of orphaned sockets
712 in FIN_WAIT2 state (overrides tcp_fin_timeout on, see linux tcp(7)
713 TCP_LINGER2). Linux only.
714 tcp_keepalive = yes | no (default yes) - enables keepalive for tcp.
715 tcp_keepidle = seconds (not set by default) - time before starting to send
716 keepalives, if the connection is idle. Linux only.
717 tcp_keepintvl = seconds (not set by default) - time interval between
718 keepalive probes, when the previous probe failed. Linux only.
719 tcp_keepcnt = number (not set by default) - number of keepalives sent before
720 dropping the connection. Linux only.
721 tcp_crlf_ping = yes | no (set by default) - enable CRLF keepalives aka
722 SIP outbound.
723 pmtu_discovery = 0 | 1 (default 0) - set DF bit in outbound IP if enabled
724 dns_srv_lb = yes | no (default no) - enable dns srv weight based load
725 balancing (see doc/dns.txt)
726 dns_try_naptr = yes | no (default no) - enable naptr support
727 (see doc/dns.txt for more info)
728 dns_{udp,tcp,tls,sctp}_pref = number - ser preference for each protocol
729 when doing naptr lookups. By default dns_udp_pref=30, dns_tcp_pref=20,
730 dns_tls_pref=10 and dns_sctp_pref=20. To use the remote site preferences
731 set all dns_*_pref to the same positive value (e.g. dns_udp_pref=1,
732 dns_tcp_pref=1, dns_tls_pref=1, dns_sctp_pref=1). To completely ignore
733 NAPTR records for a specific protocol, set the corresponding protocol
734 preference to -1 (or any other negative number). (see doc/dns.txt for
735 more info)
736 dns_search_full_match = yes | no (default yes) - when name was resolved
737 using dns search list, check the domain added in the answer matches with
738 one from the search list (small performance hit, but more safe)
739 mlock_pages = yes |no (default no) - locks all ser pages into memory making
740 it unswappable (in general one doesn't want his sip proxy swapped out :-))
741 shm_force_alloc = yes | no (default no) - tries to pre-fault all the
742 shared memory, before starting. When on start time will increase, but
743 combined with mlock_pages will guarantee ser will get all its memory from
744 the beginning (no more kswapd slow downs)
745 real_time = <int> (flags) (default off). - sets real time priority
746 for all the ser processes, or the timers.
747 Possible values: 0 - off
748 1 - the "fast" timer
749 2 - the "slow" timer
750 4 - all processes, except the timers
751 Example: real_time= 7 => everything switched to real time priority.
752 rt_prio = <int> (default 0) - real time priority used for everything except
753 the timers, if real_time is enabled
754 rt_policy= <0..3> (default 0)- real time scheduling policy, 0 = SCHED_OTHER,
755 1= SCHED_RR and 2=SCHED_FIFO
756 rt_timer1_prio=<int> (default 0) - like rt_prio but for the "fast" timer
757 process (if real_time & 1)
758 rt_timer1_policy=<0..3> (default 0) - like rt_policy but for the "fast" timer
759 rt_timer2_prio=<int> (default 0) - like rt_prio but for the "slow" timer
760 rt_timer2_policy=<0..3> (default 0) - like rt_policy but for the "slow" timer
761 tcp_source_ipv4 = IPv4 address
762 tcp_source_ipv6 = IPv6 address
763 Set the given source IP for all outbound TCP connections.
764 If setting the IP fails the TCP connection will use the default.
765 dns_cache_init = on | off (default on) - if off, the dns cache is not
766 initialized at startup and cannot be enabled runtime, that saves some
767 memory.
768 dst_blacklist_init = on | off (default on) - if off, the blacklist
769 is not initialized at startup and cannot be enabled runtime,
770 that saves some memory.
771
772 new script commands:
773 udp_mtu_try_proto(TCP|TLS|SCTP|UDP) - same as udp_mtu_try_proto=... (see
774 above), but works per packet and not globally.
775
776
777 build system:
778 - check defines and includes used at compile time and if different
779 force rebuilding everything in the current dir (creates a new file:
780 makecfg.lst that stores the compile defines & includes used at compile
781 time)
782 - make cfg / config support: store the build config in an autogenerated file
783 (config.mak) and use it for future compiles (e.g.:
784 make cfg include_modules=mysql skip_modules=print CPU=pentium-m; make all).
785 Main advantages are easier usage and faster builds (e.g. make proper is
786 +16 times faster, make clean ~9 times, make with previously generated
787 config is 2.6 times faster and a make that has nothing to do is ~9 times
788 faster).
789
790
791
792
793 2.0.0 changes
794
795
796 new archs:
797
798
799 modules:
800 - tls - new module that enables tls support (set enable_tls=yes
801 in the config file and load the tls module)
802 - ctl - new fifo/unixsocket/xmlrpc like module, using a space
803 efficient binary encoding for the requests.
804 It supports multiple clients on tcp, udp, unix stream or
805 unix datagram modes. By default (no modparams) it opens
806 one unix stream control socket in /tmp/ser_ctl.
807 It also includes extended fifo support: multiple fifos,
808 fifo over tcp, udp and unix sockets (see ctl/ctl.cfg).
809 Use utils/sercmd/sercmd to send commands to it.
810 - dispatcher - added hashing after request uri and to uri
811 - added a new flag parameter which can be used (for now) to
812 select only the username or the username, host and port when
813 hashing after an uri (to, from or request uri)
814 - improved uri hashing (password is ignored, port is used only
815 if != 5060 or 5061)
816 - tm - aggregate challenges (WWW/Proxy-Authenticate) from all the
817 401 & 407 if the final reply is a 401/407. To turn this off
818 and fall back to the old behaviour set tm aggregate_challenges
819 parameter to 0.
820 - if a relayed 503 is the final reply, replace it by a 500
821 - if a 503 reply is received try the dns based failover
822 (forward to another ip if the original destination uri
823 resolved to several SRV, A or AAAA records)
824 - on 6xx immediately cancel all the branches for which a
825 provisional response was received and wait for all the
826 branches to finish (either timeout, the 487 from the CANCEL
827 or a final response still on the wire in the moment the
828 CANCEL was sent)
829 - better final reply selection: 6xx is preferred over other
830 negative replies; from several 4xx prefer 401, 407, 415, 420,
831 484 (in this order). For all the other cases, return the lowest
832 code (as before)
833 - special functions for checking for timeout, if a reply was
834 received or if the current transaction was canceled
835 - dns failover and dst blacklist support
836 - migrated to the new timers (tm timers completely rewritten)
837 - improved speed and less memory usage
838 - much more precise retransmissions timing
839 - params: - retr_timer1p1, retr_timer1p2, retr_timer1p3 removed
840 and replaced by retr_timer1 and retr_timer2
841 - all timer values are now expressed in milliseconds
842 (they were in seconds before).
843 Affected params: fr_timer, fr_inv_timer, wt_timer,
844 delete_timer, retr_timer1, retr_timer2
845 - retr_timer1 (first retransmission) changed to 500 ms
846 - delete_timer changed to 200 ms
847 - unix_tx_timeout expressed now in milliseconds; default
848 value changed to 500 ms
849 - functions:
850 - t_branch_timeout() -- returns true if the failure
851 route is executed for a branch that did timeout
852 (failure_route only).
853 - t_branch_replied() -- returns true if the failure
854 route is executed for a branch that did receive at
855 least one reply in the past (the current reply
856 is not taken into account). It can be used
857 together with t_branch_timeout() to distinguish
858 between a remote side that doesn't respond (some
859 provisional reply received) and one that is completely
860 dead. (failure_route only)
861 - t_any_timeout() -- returns true if any of the current
862 transaction branches did timeout.
863 - t_any_replied() -- returns true if at least one branch
864 of the current transaction received one reply in the
865 past. If called from a failure_route or an
866 onreply_route, the "current" reply is not taken into
867 account.
868 - t_is_canceled() -- returns true if the current
869 transaction has been canceled.
870 - new t_set_fr(timeout_fr_inv, timeout_fr) -- allows
871 changing the transaction timer from script, even if
872 the transaction was already created (see tm docs for
873 more).
874 - t_relay will not stop script execution anymore in case of
875 send error
876 - textops - search() can be used in the onsend_route where it will search
877 on the "new" message (after applying all script changes, adding
878 Vias a.s.o) and not on the original message
879
880 core:
881 - compiled by default with tls hooks support (so that no recompile is
882 needed before loading the tls module and enabling the tls support)
883 - enable_tls config option added (the reverse of disable_tls)
884 - added STUN keep-alive functionality in accordance with
885 draft-ietf-behave-rfc3489bis-04.txt
886 - dns cache and dns failover support added (see doc/dns.txt)
887 - destination blacklist added -- destinations to which forwarding fails
888 (send error, tm timeout a.s.o) are temporarily added to a blacklist which
889 is consulted before each send => faster send error detection
890 in the near future (see doc/dst_blacklist.txt)
891 - default log level switched to 0 (only messages < L_WARN will be printed
892 by default)
893 - separate memdbg log level which controls the memory/malloc related
894 debug messages (to see them ser must be compiled with malloc debugging:
895 -DDBG_QM_MALLOC or -DDBG_FM_MALLOC and memdbg must be <= debug )
896 - added named routes: names can be used instead of numbers in all the
897 route commads or route declarations. route(number) is equivalent to
898 route("number").
899 Example:
900 route("test");
901 route["test"]{
902 ...
903 }
904 - added named flags, declared at the beginning of the config file with:
905 flags flag1_name[:position], flag2_name ...
906 Example:
907 flags test, a:1, b:2 ;
908 route{
909 setflag(test);
910 if (isflagset(a)){ # equiv. to isflagset(1)
911 ....
912 }
913 resetflag(b); # equiv. to resetflag(2)
914 - added return [val] which returns from a route. if no value is specified, or
915 a route reaches its end without executing a return statement, it returns 1.
916 If return is used in the top level route is equivalent with exit [val].
917 - drop /exit [n] now will end the script execution
918 exit n will exit with code n (useful in onreply/onsend routes where
919 if script code !=0 a reply is generated/the message is sent or to force
920 script errors)
921 - added $? which can be used to check the return code of the last executed
922 route{} (e.g. route(1); if ($?==1){ /* ... */}else if ($?==2) ... )
923 - onsend_route added: special route executed before a request is sent.
924 Only a limited number of commands are allowed (drop, if
925 + all the checks, msg flag manipulations, send(), log(),
926 textops::search()). In this route the final destination
927 of the message is available and can be checked (with
928 snd_ip, snd_port, to_ip, to_port, snd_proto, snd_af).
929 This route is executed only when forwarding requests.
930 It's not executed for replies, retransmissions, or
931 locally generated messages (e.g. via fifo uac).
932 short example:
933 onsend_route{ if(to_ip==1.2.3.4 && !isflagset(12)){
934 log(1, "message blocked\n");
935 drop;
936 }
937 }
938 - onsend_route specific checks:
939 - snd_ip, snd_port - behave like src_ip/src_port, but contain the
940 ip/port ser will use to send the message
941 - to_ip, to_port - like above, but contain the ip/port the message will
942 be sent to (not to be confused with dst_ip/dst-port, which are the
943 destination of the original message: ser's ip and port on which the
944 message was received)
945 - snd_proto, snd_af - behave like proto/af but contain the
946 protocol/address family that ser will use to send the message
947 - msg:len - when used in an onsend_route, msg:len will contain the length
948 of the message on the wire (after all the changes in the script are
949 applied, Vias are added a.s.o) and not the lentgh of the original
950 message
951 - timer: - improved performance/precision, new api, see doc/timers.txt
952 - tcp: - improved performance (io event handling), using OS specific
953 optimizations
954 - 1024 connections limit removed (see tcp_max_connections)
955 - resolver: - timeouts, retries a.s.o can now be set from ser.cfg
956 (see below dns_* and man resolv.conf(6)).
957 The maximum time a dns request can take (before failing) is:
958 (dns_retr_time*dns_retr_no)*(search_list_domains)
959 If dns_try_ipv6 is yes, multiply it again by 2.
960 The fastest possible dns config (max 1s):
961 dns_try_ipv6=no
962 dns_retr_time=1
963 dns_retr_no=1
964 dns_use_search_list=no
965 - default on reply route added: onreply_route {.. } will add a default
966 onreply route that will be executed for any reply (useful to catch
967 replies without using tm)
968 - branch_routes added (tm triggered), only a very limited number of commands
969 are available (see tm docs)
970 - avps directly accessible from script with %avp_name (variable style)
971 new config variables:
972 enable_tls/disable_tls = enable/disable tls support, default disable.
973 Note: a tls "engine" is still needed (e.g. the tls module must
974 be loaded, enable_tls by itself is not enough).
975 exit_timeout = seconds - how much time ser will wait for all the shutdown
976 procedures to complete. If this time is exceeded, all the remaining
977 processes are immediately killed and ser exits immediately (it might
978 also generate a core dump if the cleanup part takes too long).
979 Default: 60 s. Use 0 to disable.
980 stun_refresh_interval = number in millisecond (default 0); value for
981 attribute REFRESH INTERVAL
982 stun_allow_stun = 0 | 1 (off | on - default 1); use STUN or not if compiled
983 stun_allow_fp = 0 | 1 (off | on - default 1); use FINGERPRINT attribute
984 use_dns_cache = on | off (default on)
985 use_dns_failover = on | off (default off)
986 dns_cache_flags = number (default 0)
987 dns_cache_negative_ttl = number in seconds (default 60)
988 dns_cache_min_ttl = time in seconds (default 0)
989 dns_cache_max_ttl = time in seconds (default MAXINT)
990 dns_cache_mem = maximum memory used for the dns cache in Kb (default 500 K)
991 dns_cache_gc_interval = interval in seconds after which the dns cache is
992 garbage collected (default: 120 s)
993 use_dst_blacklist = on | off (default off)
994 dst_blacklist_expire = time in s (default 60)
995 dst_blacklist_mem = maximum memory used for the blacklist in Kb (default 250
996 K)
997 dst_blacklist_gc_interval = interval in seconds after which the destination
998 blacklist is garbage collected (default 60)
999 tos = number - ip type of service (TOS) value
1000 dns_try_ipv6 = yes/no - if yes and a dns lookup fails, it will retry it
1001 for ipv6 (AAAA record). Default: yes
1002 dns_retr_time = time - time in s before retrying a dns request.
1003 Default: system specific, depends also on the/etc/resolv.conf content
1004 (usually 5s).
1005 dns_retr_no = no. - number of dns retransmissions before giving up.
1006 Default: see above (usually 4)
1007 dns_servers_no = no. - how many dns servers from the ones defined in
1008 /etc/resolv.conf will be used. Default: all of them.
1009 dns_use_search_list= yes/no - if no, the search list in /etc/resolv.conf
1010 will be ignored (=> fewer lookups => gives up faster). Default: yes.
1011 HINT: even if you don't have a search list defined, setting this option
1012 to "no" will still be "faster", because an empty search list is in
1013 fact search "" (so even if the search list is empty/missing there will
1014 still be 2 dns queries, eg. foo+'.' and foo+""+'.')
1015 tcp_connection_lifetime = value (s) - how long the lifetime of a
1016 tcp connection will be extended after an IO event (accept, connect,
1017 read, write). Default: 120 s.
1018 tcp_poll_method = poll|select|sigio_rt|epoll_et|epoll-lt|kqueue|devpoll -
1019 poll method used (by default the best one for the current OS is selected)
1020 tcp_max_connections = no. - maximum number of tcp connections (if the number
1021 is exceeded no new tcp connections will be accepted). Default: 2048.
1022
1023 tools:
1024 utils/sercmd - command line serctl like tool for interrogating ser ctl
1025 module (uses the binrpc encoding). Supports various
1026 connection methods (udp, tcp, unix stream & datagram sockets),
1027 reply formating (see -f, e.g. sercmd -f "pid:%v %v\n" core.ps)
1028 , interactive mode, command line completion (if compiled with
1029 libreadline) a.s.o.
1030
1031 WARNING: - older 0.10.99-dev version (< 0.10.99-dev46) returned a 480 reply
1032 on invite transaction timeout, if a provisional reply was received. Newer
1033 versions reverted to returning 408 on all timeouts (one can use
1034 t_branch_timeout() and t_branch_replied() to distinguish between the two
1035 timeout types)
1036
1037
1038
1039 0.9.4 fixes/improvements (0.9.4 is a bug fix release for 0.9.3)
1040
1041 general:
1042 - gcc 4.0 support
1043 - multicast options are set for all the sockets
1044 - mediaproxy: memory leak, unchecked memory allocations
1045 - postgress: some bugs and cleanups (compiles cleanly now)
1046 - tm: shm cloned lumps (SER-55)
1047 - tm: t_fifo: 64-bit fix
1048 - tm: dst_uri clone fix
1049 - tm: t_newtran/t_restransmit* races (!)
1050 - usloc: memory leak
1051
1052 solaris:
1053 - serctl, better ISA detection, signals
1054 *bsd:
1055 - multicast options are properly set
1056 openbsd:
1057 - tcp 64 bit fix
1058
1059
1060
1061 0.9.3 changes
1062
1063
1064 new archs:
1065 - alpha experimental support
1066 - mips2/cobalt experimental support
1067 - x86_64 support
1068 - OS X (darwin) support
1069 - sparc32 single cpu highly experimental support
1070 - ppc64 support
1071
1072 modules:
1073 - enum - support for more than one NAPTR
1074 - msilo - explicit multidomain support -- recipient's user ID is stored in
1075 the columns username and domain -- r_uri column kept for compatibility
1076 reasons (will be removed in future) but not filled by this version of
1077 module
1078 - mysql - implements a connection pool, all modules will use same connection
1079 to access the database
1080 - nathelper received port test (flag 16 for nat_uac_test): compares the
1081 source port of the message with sip port in the first Via and returns
1082 true if different.
1083 - permsions - support for multiple allow/deny files, allow_register function
1084 - TM has a new parameter: restart_fr_on_each_reply. If set (default)
1085 fr_inv timer will be restarted for each provisional reply, if not set
1086 it will be restarted only for the first reply and for replies >=180
1087 (but only if increasing, eg.: 180, 181 ...). Useful when dealing with bad
1088 UAs that re-transmit 180s.
1089 - TM saves the avp list into transactions, and make it available into
1090 callbacks, failure and reply routes.
1091 - TM contains new command - t_write_unix("/tmp/sems.sock", "announcement")
1092 sends a message using unix socket interface instead of FIFO interface.
1093 - TM contains new config variable - unix_tx_timeout -- it specifies the
1094 transmit timeout of t_write_sock
1095 - VM functionality was transfered into TM module. Instead of fetching the
1096 email value from DB (as VM), TM looks for the "email" attribute to get the
1097 value.
1098 vm() function was replaced with t_write_req()
1099 vm_reply() fifo functions was replaced by TM with t_reply() fifo function
1100 NOTE!! because current version of SEMS/AA try to send reply via vm_reply,
1101 it will not work with the TM version.
1102 - xlog - printing the body of any header by specifying the name; new
1103 specifiers for user-agent, message buffer, message length, message's flags,
1104 message id.
1105
1106 new modules:
1107 - avp / avp_db / avp_radius - load and check avps per caller or callee
1108 - avpops - flexible module for operations with avps and database, introducing
1109 a pseudo-variable support in SER configuration file
1110 - cpl-c - implementation of Call Processing Language
1111 - dispatcher - implements a dispatcher for incoming requests using hashes
1112 over parts of the request to select the destination
1113 - diversion - implements the Diversion extensions as per
1114 draft-levy-sip-diversion-08
1115 - flatstore - simple module that implements very fast inserts for accounting
1116 purposes
1117 - gflags - keeps a bitmap of flags in shared memory and may be used to change
1118 behaviour of server based on value of the flags
1119 - options - answer server options requests
1120 - speeddial - provides on-server speed dial facilities
1121 - uri_db - split from uri module, performs various checks related to SIP URI
1122 over database fields
1123
1124 removed modules:
1125 - vm - the functionality was transfered to tm module (see t_write_req(...)
1126 method)
1127
1128 core:
1129 - new parts:
1130 UNIX domain socket server implemented
1131 - changes:
1132 - command line: removed -p port and extended -l:
1133 -l [proto:]addr[:port] , where proto=udp|tcp and
1134 addr= host|ip_address|interface_name. The format is the same
1135 as for listen in the config file. ipv6 addresses must be enclosed in
1136 [].
1137 - added from_uri & to_uri: behave exactly like uri but use the
1138 "From:"/"To:" uris
1139 (e.g.: if (from_uri==myself) ..., if (to_uri=~"^sip:test@")... )
1140 - config: better escape support in strings (e.g. \", \<cr>, \x0a, \012)
1141 - bad network addresses are now automatically fixed
1142 (e.g. 192.168.1.80/27 => 192.168.1.64/27)
1143 - avp (Attribute-Value Pair) support added
1144 - avp alias support added
1145 - multicast support added (see mcast_loopback & mcast_ttl)
1146 - saving of process group id enabled, if the -G option is specified
1147 (a safe way to quickly kill all ser processes)
1148 - core dump-ing is enabled by default, see also disable_core_dump
1149 - protocol and port can be specified in the alias and listen lines, e.g.:
1150 alias= tcp:foo.bar:* udp:test.bar:5080 foo.com
1151 listen= eth0 tcp:eth0:5065 udp:127.0.0.1 [3ffe::1]
1152 - multiple operator support: ==, != for special operations (e.g myself, ip)
1153 ==, !=, ~= for strings
1154 ==, !=, >, <, >=, <= for integers
1155 - database api changed to support usage of different drivers
1156 simultaneously. The database URL must start now with the name of the
1157 driver (module). Example: for mysql the DB URL
1158 'sql://user:password@dbhost:port/database' must be specified now as
1159 'mysql://user:password@dbhost:port/database'
1160 - new config variables:
1161 mcast_loopback = <yes/no> - loopback sent multicast datagram, default no.
1162 mcast_ttl = number - set multicast ttl, default OS specific (usually 1).
1163 sock_mode = <permissions> (e.g. sock_mode=0600: default value = 0660)
1164 ser unix sockets and fifo will be created with this permissions
1165 (old name fifo_mode is still supported, but deprecated)
1166 sock_user = username|"uid"
1167 sock_group = groupname|"gid"
1168 change the owner and/or group of the ser unix sockets or fifo
1169 Short example config snippet:
1170 sock_mode=0600 # ser socket/fifo mode
1171 sock_user="www-data" # ser socket/fifo owner
1172 sock_group=nogroup
1173 user=nobody # ser user (ser will suid to it)
1174 disable_core_dump= yes|no
1175 by default core dump limits are set to unlimited or a high enough
1176 value, set this config variable o yes to disable core dump-ing
1177 (will set core limits to 0)
1178 open_files_limit= number
1179 if set and bigger than the current open file limit, ser will try
1180 to increase its open file limit to this number. Note: ser must be
1181 started as root to be able to increase a limit past the hard limit
1182 (which, for open files, is 1024 on most systems)
1183 tcp_connect_timeout= seconds
1184 time before an ongoing connect will be aborted
1185 tcp_send_timeout= seconds
1186 time after a tcp connection will be closed if it is not available
1187 for writing in this interval (and ser wants to send something on it)
1188 tcp_accept_aliases= yes|no
1189 if a message received over a tcp connection has "alias" in its via
1190 a new tcp alias port will be created for the connection the message
1191 came from (the alias port will be set to the via one).
1192 Based on draft-ietf-sip-connect-reuse-00.txt, but using only the port
1193 (host aliases are too dangerous IMHO, involve extra DNS
1194 lookups and the need for them is questionable)
1195 See force_tcp_alias for more details.
1196 log_facility = LOG_LOCAL0
1197 if ser logs to syslog, you can control the facility for logging. Very
1198 useful when you want to divert all ser logs to a different log file.
1199 See man page syslog(3) for more details.
1200 unix_sock = "/tmp/ser.sock"
1201 The name of the socket the unixsock server should listen on.
1202 unix_sock_children = 1
1203 The number of children that will listen on the unix domain socket.
1204 unix_tx_timeout = 2000
1205 Timeout (in ms) used when sending replies through unix sockets.
1206 - new script commands:
1207 force_send_socket([proto:]address[:port])
1208 sends the message from the specified socket (it _must_ be one of the
1209 sockets ser listens on). If the protocol doesn't match (e.g. udp
1210 message "forced" to a tcp socket) the closest socket of the same
1211 protocol is used.
1212 force_tcp_alias()
1213 force_tcp_alias(port)
1214 adds a tcp port alias for the current connection (if tcp).
1215 Useful if you want to send all the traffic to port_alias through
1216 the same connection this request came from [it could help
1217 for firewall or nat traversal].
1218 With no parameters adds the port from the message via as the alias.
1219 When the "aliased" connection is closed (e.g. it's idle for too
1220 much time), all the port aliases are removed.
1221 Note: by default ser closes idle connection after 3 minutes (stable)
1222 or 1 minute (unstable) so to take full advantage of tcp aliases for
1223 things like firewall and nat traversal, redefine TCP_CON_*TIMEOUT
1224 in tcp_conn.h and recompile. Also right now there can be maximum
1225 3 port aliases to a connection (you shouldn't need more than one).
1226 To change this redefine TCP_CON_MAX_ALIASES in the same file
1227 (set it to you desired value + 1; 1 is needed for the real port).
1228
1229 utilities:
1230 - ngrep patch for displaying new lines in captured SIP messages is no longer
1231 needed; use ngrep V 1.42 with the option "-W byline"
1232
1233
1234
1235 ***********************************************
1236 * Changes/fixes introduced in 0.8.12
1237 ***********************************************
1238 +--------------------------------------------------------+
1239 | WARNING: if you want to use a 0.8.11 config script |
1240 | with 0.8.12, replace if ( len_gt(number) ) with: |
1241 | if ( msg:len > bumber ) |
1242 +--------------------------------------------------------+
1243
1244 New Features
1245 ============
1246
1247 texops:
1248 - subst('s/re/repl/flags') support
1249 core:
1250 - added switch to check the config file (-c)
1251 - changes: removed len_gt() and replaced with if (msg:len op number|max_len)
1252 - multiple operator support: ==, != for special operations (e.g myself, ip)
1253 ==, !=, ~= for strings
1254 ==, !=, >, <, >=, <= for integers
1255 - new config variables:
1256 advertised_address= ip | string
1257 address advertised in via and in the DST_* lumps (e.g RR)
1258 This is the default value, if empty (default) the socket
1259 address will be used.
1260 WARNING: - don't set it unless you know what you are doing
1261 (e.g. nat traversal)
1262 - you can set anything here, no check is made
1263 (e.g. foo.bar will be accepted even if
1264 foo.bar doesn't exist)
1265 advertised_port= no
1266 port advertised in via and in the DST_*lumps (e.g. RR)
1267 This is the default value, if empty (default) the socket
1268 port will be used.
1269 Same warnings as above.
1270 - new script commands:
1271 set_advertised_address(ip|string)
1272 same as advertised_address but it affects only the current message:
1273 Message host/lump address= the set_advertised one if
1274 present, else advertised_address else socket address.
1275 set_advertised_port(no)
1276 same as advertised_port but it affects only the current
1277 message; see set_advertised_address & s/address/port/g
1278
1279 usrloc:
1280 - usernames are case insensitive
1281
1282 registrar:
1283 - lookup function succeeds when appending of a branch failed
1284
1285 auth_db:
1286 - support for rpid stored in database (thanks to Jakob Schlyter)
1287
1288 Bug fixes
1289 =========
1290 - memory leak in digest credentials parser fixed
1291 - authentication ha1 didn't include domain if username was of the form
1292 user@domain and calculate_ha1 was set to yes (modules/auth_db)
1293 - tm reply processing race condition (modules/tm), special thanks go to
1294 Dong Liu
1295 - Many bugs in pa module fixed, works with registrar again.
1296
1297 Security updates
1298 ================
1299
1300 - fifo processing code will write responses only to other
1301 fifos and only if they are not hard-linked, also default
1302 ser fifo persmissions were changed to 0600.
1303
1304 Performance improvements
1305 ========================
1306 - tuned internal malloc implementation parameters to better reflect the
1307 actual workload (malloc is a little bit faster now)
1308
1309
1310
1311 ***********************************************
1312 * Changes introduced in 0.8.11
1313 ***********************************************
1314
1315 +--------------------------------------------------------+
1316 | CAUTION: the 0.8.11 release include changes which |
1317 | are incompatible with scripts and databases used |
1318 | in previous versions. Care is advised when upgrading |
1319 | from previous releases to 0.8.11. |
1320 +--------------------------------------------------------+
1321
1322 New features
1323 =============
1324 - RFC3261 support
1325 - TCP support and cross-transport forwarding [core]
1326 - loose routing support [rr module]
1327 - New modules
1328 - vm -- voicemail interface [vm]
1329 - ENUM support [enum]
1330 - presence agent [pa]
1331 - dynamic domain management -- allows to manipulate
1332 hosting of multiple domains in run-time [module]
1333 - flat-text-file database support [dbtext]
1334 - rich access control lists [permissions]
1335 - Feature Improvements
1336 - click-to-dial, which is based on improved tm/FIFO
1337 that better supports external applications [tm module]
1338 - web accounting -- acc module can report to serweb
1339 on placed calls [acc module]
1340 - improved exec module (header fields passed now
1341 as environment variables to scripts) [exec module]
1342 - Architectural Improvements
1343 - powerpc fast locking support
1344 - netbsd support
1345 - 64 bits arch. support (e.g. netbsd/sparc64).
1346 - New Experimental Features (not tested at all yet)
1347 - nathelper utility for Cisco/ATA NAT traversal [nathelper]
1348 - another NAT traversal utility [mangler]
1349 - postgress support [postgress]
1350 - fcp module [fcp]
1351 - pdt module (prefix2domain) [pdt]
1352
1353 Changes to use of ser scripts
1354 =============================
1355
1356 About Multiple Transport Support
1357 --------------------------------
1358 SER now supports multiple transport protocols: UDP and TCP. As there
1359 may be UAs which support only either protocol and cannot speak to
1360 each other directly, we recommend to alway record-route SIP requests,
1361 to keep the transport-translating SER in path. Also, if a destination
1362 transport is not known, stateful forwarding is recommended -- use of
1363 stateless forwarding for TCP2UDP would result in loss of reliability.
1364
1365
1366 core
1367 ----
1368 - reply_route has been renamed to failure_route -- the old name caused
1369 too much confusion
1370 - forward_tcp and forward_udp can force SER to forward via specific
1371 transport protocol
1372
1373 acc module:
1374 -----------
1375 - radius and sql support integrated in this module; you need to
1376 recompile to enable it
1377 - acc_flag is now called log_flag to better reflect it relates
1378 to the syslog mode (as opposed to sql/radius); for the same
1379 reasons, the accounting action is now called "acc_log_request"
1380 and the option for missed calls "log_missed_calls"
1381 - log_fmt allows now to specify what will be printed to syslog
1382
1383 auth module:
1384 ------------
1385 - auth module has been split in auth, auth_db, auth_radius, group
1386 group_radius, uri and uri_radius
1387 - all the parameters that were part of former auth module are now
1388 part of auth_db module
1389 - auth_db module contains all functions needed for database
1390 authentication
1391 - auth_radius contains functions needed for radius authentication
1392 - group module contains group membership checking functions
1393 - group_radius contains radius group membership checking functions
1394 - is_in_group has been renamed to is_user_in and places to groups
1395 module
1396 - check_to and check_from have been moved to the uri module
1397
1398
1399 im module:
1400 ----------
1401 - im is no longer used and has been obsoleted by TM
1402
1403 exec module:
1404 ------------
1405 - exec_uri and exec_user have been obsoleted by exec_dset;
1406 exec_dset is identical to exec_uri in capabilities; it
1407 additionally passes content of request elements (header
1408 fields and URI parts) in environment variables; users of
1409 exec_user can use exec_dset now and use the "URI_USER"
1410 variable to learn user part of URI
1411 - exec_dset and exec_msg return false, if return value of
1412 script does not euqal zero
1413 - exec_dset takes an additional parameter, which enables
1414 validation of SIP URIs returned by external application
1415
1416 jabber module:
1417 --------------
1418 - presence support for Jabber users is enabled loading the PA
1419 module and using handle_subscribe("jabber") for SUBSCRIBE
1420 requests to jabber user
1421
1422 msilo module:
1423 -------------
1424 - m_store has now a parameter to set what should be considered
1425 for storing as destination uri. This enables support for saving
1426 the messages on negative replies.
1427
1428 radius_acc module:
1429 ------------------
1430 - radius_acc module has been removed and radius accounting
1431 is now part of acc module
1432
1433 registrar/usrloc modules:
1434 -------------------------
1435 - multi domain support, the modules user username@domain as AOR
1436 if enabled
1437 - descent modification time ordering of contacts
1438 - case sensitive/insensitive comparison of URI can be enabled
1439
1440 rr module:
1441 ----------
1442 - addRecordRoute has been replaced with record_route
1443 - rewriteFromRoute has been replaced with loose_route()
1444 - a new option, "enable_full_lr" can be set to make life
1445 with misimplemented UAs easier and put LR in from "lr=on"
1446 - rr module can insert two Record-Route header fields when
1447 necessary (disconnected networks, UDP->TCP and so on)
1448
1449 tm module:
1450 ----------
1451 - t_reply_unsafe, used in former versions within reply_routes,
1452 is deprecated; now t_reply is used from any places in script
1453 - t_on_negative is renamed to t_on_failure -- the old name just
1454 caused too much confusion
1455 - FIFO t_uac used by some applications (like serweb) has been
1456 replaced with t_uac_dlg (which allows easier use by dialog-
1457 oriented applications, like click-to-dial)
1458 - if you wish to do forward to another destination from
1459 failure_route (reply_route formerly), you need to call t_relay
1460 or t_relay_to explicitely now
1461 - t_relay_to has been replaced with t_relay_to_udp and t_relay_to_tcp
1462