1 Release notes for SIP Express Router (ser)
2 ***********************************************
11 - textops - functions:
12 - remove_hf_re("regexp") -- filter message headers out
13 by matching the header name field against a regular
15 - avp - export new selects table to allow dissecting the content of an
16 attribute by interpreting it as a "name-addr" value
17 - auth - experimental support for one-time nonces: when enabled a nonce
18 will be accepted only for one response (each new request will
19 be challenged). See one_time_nonce.
20 - experimental support for nc checking when qop=auth
21 (fast, non-locking implementation, see nonce_count,
22 nc_array_size, nc_array_order and nid_pool_no)
23 - switched to base64 nonces
24 - record nonce generation time inside the nonce so that a
25 received nonce can be checked against ser start time
26 (if older => stale). This allows gracefully handling ser
27 restarts with different auth configs.
28 - added extra authentication checks support, to protect
29 against various reply attacks.
31 - nonce_auth_max_drift - maximum difference in seconds
32 from the current time, if a nonce appears to be
33 created in the future (if exceeded the nonce is
35 - one_time_nonce - if enabled each nonce is allowed
36 only once => each new request (including
37 retransmissions!) will be challenged. It should be
38 used only in stateful mode (so that tm deals with
39 the retransmissions). The major disadvantage is that
40 the UA won't be able to used any cached credentials
41 (=> extra messages, extra round trips, more work for
43 - otn_in_flight_no - maximum number of in-flight nonces
44 for one-time-nonces. It must be a number of the form
45 2^k (if not it will be automatically rounded down).
46 The memory used will be otn_in_flight_no/8
47 - otn_in_flight_order - like otn_in_flight_no, but
48 instead of specifying the number as 2^k, it directly
49 sets k (otn_in_flight_no=2^otn_in_flight_order)
50 - nonce_count - if enabled and qop=auth or
51 qop=auth-int, store and check received nc values
52 (for details see rfc2617 and auth/doc). It should be
53 used only in stateful mode (so that tm deals with
54 the retransmissions which would otherwise be
55 challenged). The major advantage is greatly
56 enhanced security (extremely small probability of
57 a succesfull replay attack) combine with support
58 for cached credentials (if the UAs do support qop
60 - nc_array_size - size of the array used for storing
61 nc values, default 1Mb. It will be rounded down to
62 a 2^k value. It represents the maximum number of
63 in-flight nonces supported
64 - nc_array_order - equivalent to nc_array_size, but
65 instead of specifying the size in bytes, it can
66 be used to directly set the power of 2 used
67 (nc_array_size=2^nc_array_order)
68 - nid_pool_no - number of nc and one-time-nonce array
69 and index partitions, useful for increasing
70 performance on multi-cpu systems (default 1,
72 - auth_checks_register, auth_checks_no_dlg,
73 auth_checks_in_dlg - flags specifying which extra
74 message part/parts will be checked for change before
75 allowing nonce reuse. See the auth module docs for
76 for more information (modules/auth/README).
77 - blst - new module containing script blacklist manipulations functions
78 (the source of a message can be blacklisted, removed from the
79 blacklist or checked for presence in the blacklist).
80 - tm - added API function t_get_canceled_ident(): returns the hash
81 coordinates (bucket/index) of the transaction the currently
82 processed CANCEL is targeting. Requires AS support enabled.
83 - added API function ack_local_uac(): allow generating the ACKs
84 for 2xx'ed locally originated INVITEs - new headers and body can
85 now also be appended to it. Requires AS support enabled.
86 - matching of E2E ACKs no longer requires full From HF identity,
87 but rather only tag equality (this behaviour can be changed by
88 defining TM_E2E_ACK_CHECK_FROM_URI)
89 - added t_reset_fr(), t_reset_retr(), t_reset_max_lifetime()
90 - t_relay_to renamed to t_relay_to_avp (undocumented function)
91 - t_relay() can now also take host and port parameters (e.g.
92 t_relay(host, port)), behaving like a statefull
93 forwad(host, port) version (forward to host:port using the same
94 protocol on which the message was received)
95 - t_relay_to_udp(), t_relay_to_tcp() and t_relay_to_tls() work
96 now even with no parameters: in this case the message is
97 forwarded using the request uri, but with the specified protocol
98 (equivalent to a t_relay() with a forced protocol)
99 - method for canceling unreplied branches can now be selected
100 using the new cancel_b_method tm parameter.
101 - support for adding a 503 reply source to the blacklist for
102 the time specified in the Retry-After header (see the new tm
103 parameters blst_503, blst_503_def_timeout, blst_503_min_timeout
104 and blst_503_max_timeout).
105 - different error replies for too many branches (500 but with
106 different text), resolve error (478) or send error
108 - tm can be configured not to automatically send 100 replies
109 for invites either globally (see the auto_inv_100 parameter)
110 or on a per transaction basis (see t_set_auto_inv_100(...))
111 - t_relay* error reply are delayed till the end of the script
112 to allow the script writer to overwrite them
113 - branches are always canceled hop by hop
114 - cancels for silently canceled branches (no replies ever
115 received) are automatically generated if later a provisional
116 reply arrives on such a branch
117 - noisy_ctimer is now 1 (on) by default
118 - added maximum transaction lifetime - a transaction is not
119 allowed to be active longer then this interval. See
120 t_set_max_lifetime(), max_inv_lifetime and max_noninv_lifetime.
121 - support for changing the retransmission intervals on the fly,
122 on a per transaction basis (it is enabled if tm is compiled
123 with -DTM_DIFF_RT_TIMEOUT -- default): t_set_retr(t1, t2).
124 - transaction are deleted the moment they are not referenced
125 anymore (removed the need for the delete timer) -- this
126 should improve memory usage on very busy proxies.
127 - lots of callbacks added
128 - new onsend callbacks support (require defining TMCB_ONSEND prior
130 - behaviour when receiving a CANCEL which doesn't match any
131 transaction can be selected using the unmatched_cancel param.
133 - cancel_b_method - selects one of the three methods
134 for dealing with unreplied branches when the
135 transaction must be canceled. The possible values
136 are 0 (old behaviour) for stopping request
137 retransmission on the branch and act as if
138 the branch was immediately replied with a 487,
139 1 for continuing to retransmit the request until an
140 answer is received or the timeout kicks in (default)
142 2 for stopping the request retransmission and sending
143 CANCEL on the branch (not rfc conforming).
144 For more information see tm docs.
145 - blst_503 - if set and if the blacklist is used
146 (use_dst_blacklist=1), add the source of a 503 reply
148 - blst_503_def_timeout - if the Retry-After header from
149 a 503 reply is missing, use this value for the
150 blacklist timeout (in s). Depends on blst_503.
151 The default value is 0 ( do not blacklist if no
152 Retry-After is present).
153 - blst_503_min_timeot (in s) - if the 503 reply
154 Retry-After header value is less, use this value
155 for the blacklist timeout. Depends on blst_503.
156 The default value is 0.
157 - blst_503_max_timeout (in s) - if the 503 reply
158 Retry-After header value is greater, use this value
159 instead. Depends on blst_503.
160 The default value is 3600 s.
161 - auto_inv_100 - if set (default) tm will automatically
162 send an 100 reply to INVITEs (see also
163 t_set_auto_inv_100())
164 - noisy_ctimer is now 1 by default
165 - max_inv_lifetime & max_noninv_lifetime - default
166 maximum lifetimes for an invite or non-invite
167 transaction. After this interval has passed from
168 the transaction creation the transaction will be
169 either switched into the wait state or in the
170 final response retransmission state => a transaction
171 will be kept in memory for maximum:
172 max_*inv_lifetime + fr_timer /*ack w.*/ +wait_timer.
173 - unmatched_cancel - selects between forwarding cancels
174 that do not match any transaction statefully (0,
175 default value), statelessly (1) or dropping them
176 (2). Note that the statefull forwarding has an
177 additional hidden advantage: tm will be able to
178 recognize INVITEs that arrive after their CANCEL.
179 Note also that this feature could be used to try
180 a memory exhaustion DOS attack against a proxy that
181 authenticates all requests, by continuously flooding
182 the victim with CANCELs to random destinations
183 (since the CANCEL cannot be authenticated, each
184 received bogus CANCEL will create a new transaction
185 that will live by default 30s).
187 - t_reset_fr() -- resets the current transaction
188 fr_inv_timer and fr_timer to the default values
189 (set via the tm modparams fr_inv_timer and fr_timer).
190 - t_reset_retr() -- resets the current transaction
191 retransmission intervals on the fly, to the default
192 values (set via the tm modparams retr_timer1 and
194 - t_reset_max_lifetime() -- resets the current
195 transaction maximum lifetime to the default value
196 (set via the tm modparam max_inv_lifetime or
197 max_noninv_lifetime).
198 - t_grep_status("code") -- returns true if any branch
199 received code as the final reply (or if no final
200 reply was yet received, but a "code" provisional
202 - t_set_auto_inv_100(on/off) - switch automatically
203 sending 100 replies to INVITEs on/off on a per
204 transaction basis. It overrides the tm param.
206 - t_set_max_lifetime(inv, noninv) - changes the
207 maximum transaction lifetime on the fly, for the
208 current or next to be created transaction.
209 - t_set_retr(t1, t2) - changes the retransmissions
210 intervals on the fly, on a per transaction basis.
212 - most tcp config vars migrated to the dynamic config framework
213 (can be changed at runtime, e.g.
214 sercmd cfg.set_now_int tcp connection_lifetime 180 )
215 - fallback to tcp or other congestion controlled transport
216 protocol if a forwarded udp sip request is greater then
217 udp_mtu (config). Default off. See udp_mtu and
219 - sctp support (one-to-many, work in progress, for now linux
221 - partial cygwin (windows) support revived: core+static modules,
222 no ipv6, no tcp, no dynamic modules
223 - most of the config variables can now be changed on the fly,
224 without ser restart (migration work in progress)
225 - tcp improvements (better tcp timers, send fd cache, special
227 - dns naptr support (see dns_try_naptr and dns_<proto>_pref)
228 - dns srv based load balancing support (see dns_srv_lb)
229 - support for locking ser's pages in memory, pre-mapping
230 all the shared memory on startup (fill it with 0)
232 - devel: new PROC_INIT rank, init_child(PROC_INIT) called first
233 - futex support on linux (better behaviour when waiting on
234 long held locks, almost no performance impact otherwise)
235 - when dns search list was used for resolution, store the "link"
236 between the short name and long name in cache as CNAME record
238 new config variables:
239 tcp_rd_buf_size = buffer size used for tcp reads.
240 A high buffer size increases performance on server with few
241 connections and lot of traffic on them, but also increases
242 memory consumption (so for lots of connection is better
243 to use a low value). Note also that this value limits the
244 maximum datagram size that can be received over tcp.
245 Default: 4096, can be changed at runtime.
246 tcp_wq_blk_size = block size used for tcp async writes. It should be big
247 enough to hold a few datagrams. If it's smaller then a
248 datagram (in fact a tcp write()) size, it will be rounded
249 up. It has no influenced on the number of datagrams
250 queued (for that see tcp_conn_wq_max or tcp_wq_max).
251 It has mostly debugging and testing value (can be ignored).
252 Default: 2100 (~ 2 INVITEs), can be changed at runtime.
253 tcp_no_connect = yes/no - disable connects, ser will only accept new
254 connections, it will never try to open new ones.
255 Default: no, can be changed at runtime.
256 udp_mtu = number - fallback to another protocol (udp_mtu_try_proto must be
257 set also either globally or per packet) if the constructed
258 request size is greater then udp_mtu.
259 Recommended size: 1300. Default: 0 (off).
260 udp_mtu_try_proto = TCP|TLS|SCTP|UDP - if udp_mtu !=0 and udp forwarded
261 request size (after adding all the "local" headers) >
262 udp_mtu, use this protocol instead of udp. Only the
263 Via header will be updated (e.g. The Record-Route
264 will be the one built for udp).
265 Default: UDP (off). Recommended: TCP.
266 force_rport =yes/no - like force_rport(), but works globally.
267 disable_sctp = yes/no - disable sctp support (default auto, see enable_sctp)
268 enable_sctp = 0/1/2 - disable (0)/enable (1)/auto (2) sctp support,
270 sctp_children = number - sctp children no (similar to udp children)
271 sctp_socket_rcvbuf = number - size for the sctp socket receive buffer
272 sctp_socket_sndbuf = number - size for the sctp socket send buffer
273 sctp_autoclose = seconds - number of seconds before autoclosing an idle
274 assocation (default: 180 s).
275 sctp_send_ttl = milliseconds - number of milliseconds before an unsent
276 message/chunk is dropped (default: 32000 ms or 32 s).
277 sctp_send_retries - how many times to attempt re-sending a message on a
278 re-opened association, if the sctp stack did give up
279 sending it (it's not related to sctp protocol level
280 retransmission). Useful to improve reliability with
281 peers that reboot/restart or fail over to another
282 machine. WARNING: use with care and low values (e.g.
283 1-3) to avoid "multiplying" traffic to unresponding
285 server_id = number - A configurable unique server id that can be used to
286 discriminate server instances within a cluster of
287 servers when all other information, such as IP addresses
289 loadpath = <modules path> - directory where to load the modules from (-L
290 equivalent); modules can be loaded simply by specifying their name
291 (loadmodule "maxfwd")
292 tcp_fd_cache = yes | no (default yes) - if enabled FDs used for sending
293 will be cached inside the process calling tcp_send (performance increase
294 for sending over tcp at the cost of slightly slower connection closing and
296 tcp_async = yes | no (default yes) - if enabled all the tcp writes that
297 would block / wait for connect to finish, will be queued and attempted
298 latter (see also tcp_conn_wq_max and tcp_wq_max).
299 tcp_buf_write = obsoleted synonim for tcp_async
300 tcp_conn_wq_max = bytes (default 32 K) - maximum bytes queued for write
301 allowed per connection. Attempting to queue more bytes would result
302 in an error and in the connection being closed (too slow). If
303 tcp_write_buf is not enabled, it has no effect.
304 tcp_wq_max = bytes (default 10 Mb) - maximum bytes queued for write allowed
305 globally. It has no effect if tcp_write_buf is not enabled.
306 tcp_defer_accept = yes | no (default no) on freebsd / number of seconds
307 before timeout on linux (default disabled) - tcp accepts will be
308 delayed until some data is received (improves performance on proxies
309 with lots of opened tcp connections). See linux tcp(7) TCP_DEFER_ACCEPT
310 or freebsd ACCF_DATA(0). For now linux and freebsd only.
311 WARNING: the linux TCP_DEFER_ACCEPT is buggy (<=2.6.23) and doesn't
312 work exactly as expected (if no data is received it will retransmit
313 syn acks for ~ 190 s, irrespective of the set timeout and then it will
314 silently drop the connection without sending a RST or FIN). Try to
315 use it together with tcp_syncnt (this way the number of retrans.
316 SYNACKs can be limited => the timeout can be controlled in some way).
317 tcp_delayed_ack = yes | no (default yes when supported) - initial ACK for
318 opened connections will be delayed and sent with the first data
319 segment (see linux tcp(7) TCP_QUICKACK). For now linux only.
320 tcp_syncnt = number of syn retr. (default not set) - number of SYN
321 retransmissions before aborting a connect attempt (see linux tcp(7)
322 TCP_SYNCNT). Linux only.
323 tcp_linger2 = seconds (not set by default) - lifetime of orphaned sockets
324 in FIN_WAIT2 state (overrides tcp_fin_timeout on, see linux tcp(7)
325 TCP_LINGER2). Linux only.
326 tcp_keepalive = yes | no (default yes) - enables keepalive for tcp.
327 tcp_keepidle = seconds (not set by default) - time before starting to send
328 keepalives, if the connection is idle. Linux only.
329 tcp_keepintvl = seconds (not set by default) - time interval between
330 keepalive probes, when the previous probe failed. Linux only.
331 tcp_keepcnt = number (not set by default) - number of keepalives sent before
332 dropping the connection. Linux only.
333 tcp_crlf_ping = yes | no (set by default) - enable CRLF keepalives aka
335 pmtu_discovery = 0 | 1 (default 0) - set DF bit in outbound IP if enabled
336 dns_srv_lb = yes | no (default no) - enable dns srv weight based load
337 balancing (see doc/dns.txt)
338 dns_try_naptr = yes | no (default no) - enable naptr support
339 (see doc/dns.txt for more info)
340 dns_{udp,tcp,tls,sctp}_pref = number - ser preference for each protocol
341 when doing naptr lookups. By default dns_udp_pref=30, dns_tcp_pref=20,
342 dns_tls_pref=10 and dns_sctp_pref=20. To use the remote site preferences
343 set all dns_*_pref to the same positive value (e.g. dns_udp_pref=1,
344 dns_tcp_pref=1, dns_tls_pref=1, dns_sctp_pref=1). To completely ignore
345 NAPTR records for a specific protocol, set the corresponding protocol
346 preference to -1 (or any other negative number). (see doc/dns.txt for
348 dns_search_full_match = yes | no (default yes) - when name was resolved
349 using dns search list, check the domain added in the answer matches with
350 one from the search list (small performance hit, but more safe)
351 mlock_pages = yes |no (default no) - locks all ser pages into memory making
352 it unswappable (in general one doesn't want his sip proxy swapped out :-))
353 shm_force_alloc = yes | no (default no) - tries to pre-fault all the
354 shared memory, before starting. When on start time will increase, but
355 combined with mlock_pages will guarantee ser will get all its memory from
356 the beginning (no more kswapd slow downs)
357 real_time = <int> (flags) (default off). - sets real time priority
358 for all the ser processes, or the timers.
359 Possible values: 0 - off
362 4 - all processes, except the timers
363 Example: real_time= 7 => everything switched to real time priority.
364 rt_prio = <int> (default 0) - real time priority used for everything except
365 the timers, if real_time is enabled
366 rt_policy= <0..3> (default 0)- real time scheduling policy, 0 = SCHED_OTHER,
367 1= SCHED_RR and 2=SCHED_FIFO
368 rt_timer1_prio=<int> (default 0) - like rt_prio but for the "fast" timer
369 process (if real_time & 1)
370 rt_timer1_policy=<0..3> (default 0) - like rt_policy but for the "fast" timer
371 rt_timer2_prio=<int> (default 0) - like rt_prio but for the "slow" timer
372 rt_timer2_policy=<0..3> (default 0) - like rt_policy but for the "slow" timer
373 tcp_source_ipv4 = IPv4 address
374 tcp_source_ipv6 = IPv6 address
375 Set the given source IP for all outbound TCP connections.
376 If setting the IP fails the TCP connection will use the default.
377 dns_cache_init = on | off (default on) - if off, the dns cache is not
378 initialized at startup and cannot be enabled runtime, that saves some
380 dst_blacklist_init = on | off (default on) - if off, the blacklist
381 is not initialized at startup and cannot be enabled runtime,
382 that saves some memory.
385 udp_mtu_try_proto(TCP|TLS|SCTP|UDP) - same as udp_mtu_try_proto=... (see
386 above), but works per packet and not globally.
390 - check defines and includes used at compile time and if different
391 force rebuilding everything in the current dir (creates a new file:
392 makecfg.lst that stores the compile defines & includes used at compile
394 - make cfg / config support: store the build config in an autogenerated file
395 (config.mak) and use it for future compiles (e.g.:
396 make cfg include_modules=mysql skip_modules=print CPU=pentium-m; make all).
397 Main advantages are easier usage and faster builds (e.g. make proper is
398 +16 times faster, make clean ~9 times, make with previously generated
399 config is 2.6 times faster and a make that has nothing to do is ~9 times
412 - tls - new module that enables tls support (set enable_tls=yes
413 in the config file and load the tls module)
414 - ctl - new fifo/unixsocket/xmlrpc like module, using a space
415 efficient binary encoding for the requests.
416 It supports multiple clients on tcp, udp, unix stream or
417 unix datagram modes. By default (no modparams) it opens
418 one unix stream control socket in /tmp/ser_ctl.
419 It also includes extended fifo support: multiple fifos,
420 fifo over tcp, udp and unix sockets (see ctl/ctl.cfg).
421 Use utils/sercmd/sercmd to send commands to it.
422 - dispatcher - added hashing after request uri and to uri
423 - added a new flag parameter which can be used (for now) to
424 select only the username or the username, host and port when
425 hashing after an uri (to, from or request uri)
426 - improved uri hashing (password is ignored, port is used only
428 - tm - aggregate challenges (WWW/Proxy-Authenticate) from all the
429 401 & 407 if the final reply is a 401/407. To turn this off
430 and fall back to the old behaviour set tm aggregate_challenges
432 - if a relayed 503 is the final reply, replace it by a 500
433 - if a 503 reply is received try the dns based failover
434 (forward to another ip if the original destination uri
435 resolved to several SRV, A or AAAA records)
436 - on 6xx immediately cancel all the branches for which a
437 provisional response was received and wait for all the
438 branches to finish (either timeout, the 487 from the CANCEL
439 or a final response still on the wire in the moment the
441 - better final reply selection: 6xx is preferred over other
442 negative replies; from several 4xx prefer 401, 407, 415, 420,
443 484 (in this order). For all the other cases, return the lowest
445 - special functions for checking for timeout, if a reply was
446 received or if the current transaction was canceled
447 - dns failover and dst blacklist support
448 - migrated to the new timers (tm timers completely rewritten)
449 - improved speed and less memory usage
450 - much more precise retransmissions timing
451 - params: - retr_timer1p1, retr_timer1p2, retr_timer1p3 removed
452 and replaced by retr_timer1 and retr_timer2
453 - all timer values are now expressed in milliseconds
454 (they were in seconds before).
455 Affected params: fr_timer, fr_inv_timer, wt_timer,
456 delete_timer, retr_timer1, retr_timer2
457 - retr_timer1 (first retransmission) changed to 500 ms
458 - delete_timer changed to 200 ms
459 - unix_tx_timeout expressed now in milliseconds; default
460 value changed to 500 ms
462 - t_branch_timeout() -- returns true if the failure
463 route is executed for a branch that did timeout
464 (failure_route only).
465 - t_branch_replied() -- returns true if the failure
466 route is executed for a branch that did receive at
467 least one reply in the past (the current reply
468 is not taken into account). It can be used
469 together with t_branch_timeout() to distinguish
470 between a remote side that doesn't respond (some
471 provisional reply received) and one that is completely
472 dead. (failure_route only)
473 - t_any_timeout() -- returns true if any of the current
474 transaction branches did timeout.
475 - t_any_replied() -- returns true if at least one branch
476 of the current transaction received one reply in the
477 past. If called from a failure_route or an
478 onreply_route, the "current" reply is not taken into
480 - t_is_canceled() -- returns true if the current
481 transaction has been canceled.
482 - new t_set_fr(timeout_fr_inv, timeout_fr) -- allows
483 changing the transaction timer from script, even if
484 the transaction was already created (see tm docs for
486 - t_relay will not stop script execution anymore in case of
488 - textops - search() can be used in the onsend_route where it will search
489 on the "new" message (after applying all script changes, adding
490 Vias a.s.o) and not on the original message
493 - compiled by default with tls hooks support (so that no recompile is
494 needed before loading the tls module and enabling the tls support)
495 - enable_tls config option added (the reverse of disable_tls)
496 - added STUN keep-alive functionality in accordance with
497 draft-ietf-behave-rfc3489bis-04.txt
498 - dns cache and dns failover support added (see doc/dns.txt)
499 - destination blacklist added -- destinations to which forwarding fails
500 (send error, tm timeout a.s.o) are temporarily added to a blacklist which
501 is consulted before each send => faster send error detection
502 in the near future (see doc/dst_blacklist.txt)
503 - default log level switched to 0 (only messages < L_WARN will be printed
505 - separate memdbg log level which controls the memory/malloc related
506 debug messages (to see them ser must be compiled with malloc debuging:
507 -DDBG_QM_MALLOC or -DDBG_FM_MALLOC and memdbg must be <= debug )
508 - added named routes: names can be used instead of numbers in all the
509 route commads or route declarations. route(number) is equivalent to
516 - added named flags, declared at the beginning of the config file with:
517 flags flag1_name[:position], flag2_name ...
519 flags test, a:1, b:2 ;
522 if (isflagset(a)){ # equiv. to isflagset(1)
525 resetflag(b); # equiv. to resetflag(2)
526 - added return [val] which returns from a route. if no value is specified, or
527 a route reaches its end without executing a return statement, it returns 1.
528 If return is used in the top level route is equivalent with exit [val].
529 - drop /exit [n] now will end the script execution
530 exit n will exit with code n (usefull in onreply/onsend routes where
531 if script code !=0 a reply is generated/the message is sent or to force
533 - added $? which can be used to check the return code of the last executed
534 route{} (e.g. route(1); if ($?==1){ /* ... */}else if ($?==2) ... )
535 - onsend_route added: special route executed before a request is sent.
536 Only a limited number of commands are allowed (drop, if
537 + all the checks, msg flag manipulations, send(), log(),
538 textops::search()). In this route the final destination
539 of the message is available an can be checked (with
540 snd_ip, snd_port, to_ip, to_port, snd_proto, snd_af).
541 This route is executed only when forwarding requests.
542 It's not executed for replies, retransmissions, or
543 locally generated messages (e.g. via fifo uac).
545 onsend_route{ if(to_ip==1.2.3.4 && !isflagset(12)){
546 log(1, "message blocked\n");
550 - onsend_route specific checks:
551 - snd_ip, snd_port - behave like src_ip/src_port, but contain the
552 ip/port ser will use to send the message
553 - to_ip, to_port - like above, but contain the ip/port the message will
554 be sent to (not to be confused with dst_ip/dst-port, which are the
555 destination of the original message: ser's ip and port on which the
556 message was received)
557 - snd_proto, snd_af - behave like proto/af but contain the
558 protocol/address family that ser will use to send the message
559 - msg:len - when used in an onsend_route, msg:len will contain the length
560 of the message on the wire (after all the changes in the script are
561 applied, Vias are added a.s.o) and not the lentgh of the original
563 - timer: - improved performance/precision, new api, see doc/timers.txt
564 - tcp: - improved performance (io event handling), using OS specific
566 - 1024 connections limit removed (see tcp_max_connections)
567 - resolver: - timeouts, retries a.s.o can now be set from ser.cfg
568 (see below dns_* and man resolv.conf(6)).
569 The maximum time a dns request can take (before failing) is:
570 (dns_retr_time*dns_retr_no)*(search_list_domains)
571 If dns_try_ipv6 is yes, mutliply it again by 2.
572 The fastest possible dns config (max 1s):
576 dns_use_search_list=no
577 - default on reply route added: onreply_route {.. } will add a default
578 onreply route that will be executed for any reply (usefull to catch
579 replies without using tm)
580 - branch_routes added (tm triggered), only a very limited number of commands
581 are available (see tm docs)
582 - avps directly accessible from script with %avp_name (variable style)
583 new config variables:
584 enable_tls/disable_tls = enable/disable tls support, default disable.
585 Note: a tls "engine" is still needed (e.g. the tls module must
586 be loaded, enable_tls by itself is not enough).
587 exit_timeout = seconds - how much time ser will wait for all the shutdown
588 procedures to complete. If this time is exceeded, all the remaining
589 processes are immediately killed and ser exits immediately (it might
590 also generate a core dump if the cleanup part takes too long).
591 Default: 60 s. Use 0 to disable.
592 stun_refresh_interval = number in millisecond (default 0); value for
593 attribute REFRESH INTERVAL
594 stun_allow_stun = 0 | 1 (off | on - default 1); use STUN or not if compiled
595 stun_allow_fp = 0 | 1 (off | on - default 1); use FINGERPRINT attribute
596 use_dns_cache = on | off (default on)
597 use_dns_failover = on | off (default off)
598 dns_cache_flags = number (default 0)
599 dns_cache_negative_ttl = number in seconds (default 60)
600 dns_cache_min_ttl = time in seconds (default 0)
601 dns_cache_max_ttl = time in seconds (default MAXINT)
602 dns_cache_mem = maximum memory used for the dns cache in Kb (default 500 K)
603 dns_cache_gc_interval = interval in seconds after which the dns cache is
604 garbage collected (default: 120 s)
605 use_dst_blacklist = on | off (default off)
606 dst_blacklist_expire = time in s (default 60)
607 dst_blacklist_mem = maximum memory used for the blacklist in Kb (default 250
609 dst_blacklist_gc_interval = interval in seconds after which the destination
610 blacklist is garbage collected (default 60)
611 tos = number - ip type of service (TOS) value
612 dns_try_ipv6 = yes/no - if yes and a dns lookup fails, it will retry it
613 for ipv6 (AAAA record). Default: yes
614 dns_retr_time = time - time in s before retrying a dns request.
615 Default: system specific, depends also on the/etc/resolv.conf content
617 dns_retr_no = no. - number of dns retransmissions before giving up.
618 Default: see above (usually 4)
619 dns_servers_no = no. - how many dns servers from the ones defined in
620 /etc/resolv.conf will be used. Default: all of them.
621 dns_use_search_list= yes/no - if no, the search list in /etc/resolv.conf
622 will be ignored (=> fewer lookups => gives up faster). Default: yes.
623 HINT: even if you don't have a search list defined, setting this option
624 to "no" will still be "faster", because an empty search list is in
625 fact search "" (so even if the search list is empty/missing there will
626 still be 2 dns queries, eg. foo+'.' and foo+""+'.')
627 tcp_connection_lifetime = value (s) - how long the lifetime of a
628 tcp connection will be exteneded after an IO event (accept, connect,
629 read, write). Default: 120 s.
630 tcp_poll_method = poll|select|sigio_rt|epoll_et|epoll-lt|kqueue|devpoll -
631 poll method used (by default the best one for the current OS is selected)
632 tcp_max_connections = no. - maximum number of tcp connections (if the number
633 is exceeded no new tcp connections will be accepted). Default: 2048.
636 utils/sercmd - command line serctl like tool for interrogating ser ctl
637 module (uses the binrpc encoding). Supports various
638 connection methods (udp, tcp, unix stream & datagram sockets),
639 reply formating (see -f, e.g. sercmd -f "pid:%v %v\n" core.ps)
640 , interactive mode, command line completion (if compiled with
643 WARNING: - older 0.10.99-dev version (< 0.10.99-dev46) returned a 480 reply
644 on invite transaction timeout, if a provisional reply was received. Newer
645 versions reverted to returning 408 on all timeouts (one can use
646 t_branch_timeout() and t_branch_replied() to distinguish between the two
651 0.9.4 fixes/improvements (0.9.4 is a bug fix release for 0.9.3)
655 - mutlicast options are set for all the sockets
656 - mediaproxy: memory leak, unchecked memory allocations
657 - postgress: some bugs and cleanups (compiles cleanly now)
658 - tm: shm cloned lumps (SER-55)
659 - tm: t_fifo: 64-bit fix
660 - tm: dst_uri clone fix
661 - tm: t_newtran/t_restransmit* races (!)
665 - serctl, better ISA detection, signals
667 - multicast options are properly set
677 - alpha experimental support
678 - mips2/cobalt experimental support
680 - OS X (darwin) support
681 - sparc32 single cpu highly experimental support
685 - enum - support for more than one NAPTR
686 - msilo - explicit multidomain support -- recipient's user ID is stored in
687 the columns username and domain -- r_uri column kept for compatibility
688 reasons (will be removed in future) but not filled by this version of
690 - mysql - implements a connection pool, all modules will use same connection
691 to access the database
692 - nathelper received port test (flag 16 for nat_uac_test): compares the
693 source port of the message with sip port in the first Via and returns
695 - permsions - support for multiple allow/deny files, allow_register function
696 - TM has a new parameter: restart_fr_on_each_reply. If set (default)
697 fr_inv timer will be restarted for each provisional reply, if not set
698 it will be restarted only for the first reply and for replies >=180
699 (but only if increasing, eg.: 180, 181 ...). Usefull when dealing with bad
700 UAs that re-transmit 180s.
701 - TM saves the avp list into transactions, and make it available into
702 callbacks, failure and reply routes.
703 - TM contains new command - t_write_unix("/tmp/sems.sock", "announcement")
704 sends a message using unix socket interface instead of FIFO interface.
705 - TM contains new config variable - unix_tx_timeout -- it specifies the
706 transmit timeout of t_write_sock
707 - VM functionality was transfered into TM module. Instead of fetching the
708 email value from DB (as VM), TM looks for the "email" attribute to get the
710 vm() function was replaced with t_write_req()
711 vm_reply() fifo functions was replcated by TM with t_reply() fifo function
712 NOTE!! because current version of SEMS/AA try to send reply via vm_reply,
713 it will not work with the TM version.
714 - xlog - printing the body of any header by specifying the name; new
715 specifiers for user-agent, message buffer, message length, message's flags,
719 - avp / avp_db / avp_radius - load and check avps per caller or callee
720 - avpops - flexible module for operations with avps and database, introducing
721 a pseudo-varible support in SER configuration file
722 - cpl-c - implementation of Call Processing Language
723 - dispatcher - implements a dispatcher for incoming requests using hashes
724 over parts of the request to select the destination
725 - diversion - implements the Diversion extensions as per
726 draft-levy-sip-diversion-08
727 - flatstore - simple module that implements very fast inserts for accounting
729 - gflags - keeps a bitmap of flags in shared memory and may be used to change
730 behaviour of server based on value of the flags
731 - options - answer server options requests
732 - speeddial - provides on-server speed dial facilities
733 - uri_db - split from uri module, performs various checks related to SIP URI
737 - vm - the functionality was transfered to tm module (see t_write_req(...)
742 UNIX domain socket server implemented
744 - command line: removed -p port and extended -l:
745 -l [proto:]addr[:port] , where proto=udp|tcp and
746 addr= host|ip_address|interface_name. The format is the same
747 as for listen in the config file. ipv6 addresses must be enclosed in
749 - added from_uri & to_uri: behave exactly like uri but use the
751 (e.g.: if (from_uri==myself) ..., if (to_uri=~"^sip:test@")... )
752 - config: better escape support in strings (e.g. \", \<cr>, \x0a, \012)
753 - bad network addresses are now automatically fixed
754 (e.g. 192.168.1.80/27 => 192.168.1.64/27)
755 - avp (Attribute-Value Pair) support added
756 - avp alias support added
757 - multicast support added (see mcast_loopback & mcast_ttl)
758 - saving of procces group id enabled, if the -G option is specified
759 (a safe way to quickly kill all ser processes)
760 - core dump-ing is enabled by default, see also disable_core_dump
761 - protocol and port can be specified in the alias and listen lines, e.g.:
762 alias= tcp:foo.bar:* udp:test.bar:5080 foo.com
763 listen= eth0 tcp:eth0:5065 udp:127.0.0.1 [3ffe::1]
764 - multiple operator support: ==, != for special operations (e.g myself, ip)
765 ==, !=, ~= for strings
766 ==, !=, >, <, >=, <= for integers
767 - database api changed to support usage of different drivers
768 simultaneously. The database URL must start now with the name of the
769 driver (module). Example: for mysql the DB URL
770 'sql://user:password@dbhost:port/database' must be specified now as
771 'mysql://user:password@dbhost:port/database'
772 - new config variables:
773 mcast_loopback = <yes/no> - loopback sent multicast datagram, default no.
774 mcast_ttl = number - set multicast ttl, default OS specific (usually 1).
775 sock_mode = <permissions> (e.g. sock_mode=0600: default value = 0660)
776 ser unix sockets and fifo will be created with this permissions
777 (old name fifo_mode is still supported, but deprecated)
778 sock_user = username|"uid"
779 sock_group = groupname|"gid"
780 change the owner and/or group of the ser unix sockets or fifo
781 Short example config snippet:
782 sock_mode=0600 # ser socket/fifo mode
783 sock_user="www-data" # ser socket/fifo owner
785 user=nobody # ser user (ser will suid to it)
786 disable_core_dump= yes|no
787 by default core dump limits are set to unlimited or a high enough
788 value, set this config variable o yes to disable core dump-ing
789 (will set core limits to 0)
790 open_files_limit= number
791 if set and bigger than the current open file limit, ser will try
792 to increase its open file limit to this number. Note: ser must be
793 started as root to be able to increase a limit past the hard limit
794 (which, for open files, is 1024 on most systems)
795 tcp_connect_timeout= seconds
796 time before an ongoing connect will be aborted
797 tcp_send_timeout= seconds
798 time after a tcp connection will be closed if it is not available
799 for writing in this interval (and ser wants to send something on it)
800 tcp_accept_aliases= yes|no
801 if a message received over a tcp connection has "alias" in its via
802 a new tcp alias port will be created for the connection the message
803 came from (the alias port will be set to the via one).
804 Based on draft-ietf-sip-connect-reuse-00.txt, but using only the port
805 (host aliases are too dangerous IMHO, involve extra DNS
806 lookups and the need for them is questionable)
807 See force_tcp_alias for more details.
808 log_facility = LOG_LOCAL0
809 if ser logs to syslog, you can control the facility for logging. Very
810 useful when you want to divert all ser logs to a different log file.
811 See man page syslog(3) for more detailes.
812 unix_sock = "/tmp/ser.sock"
813 The name of the socket the unixsock server should listen on.
814 unix_sock_children = 1
815 The number of children that will listen on the unix domain socket.
816 unix_tx_timeout = 2000
817 Timeout (in ms) used when sending replies through unix sockets.
818 - new script commands:
819 force_send_socket([proto:]address[:port])
820 sends the message from the specified socket (it _must_ be one of the
821 sockets ser listens on). If the protocol doesn't match (e.g. udp
822 message "forced" to a tcp socket) the closest socket of the same
825 force_tcp_alias(port)
826 adds a tcp port alias for the current connection (if tcp).
827 Usefull if you want to send all the trafic to port_alias through
828 the same connection this request came from [it could help
829 for firewall or nat traversal].
830 With no parameters adds the port from the message via as the alias.
831 When the "aliased" connection is closed (e.g. it's idle for too
832 much time), all the port aliases are removed.
833 Note: by default ser closes idle connection after 3 minutes (stable)
834 or 1 minute (unstable) so to take full advantage of tcp aliases for
835 things like firewall and nat traversal, redefine TCP_CON_*TIMEOUT
836 in tcp_conn.h and recompile. Also right now there can be maximum
837 3 port aliases to a connection (you shouldn't need more than one).
838 To change this redefine TCP_CON_MAX_ALIASES in the same file
839 (set it to you desired value + 1; 1 is needed for the real port).
842 - ngrep patch for displaying new lines in captured SIP messages is no longer
843 needed; use ngrep V 1.42 with the option "-W byline"
847 ***********************************************
848 * Changes/fixes introduced in 0.8.12
849 ***********************************************
850 +--------------------------------------------------------+
851 | WARNING: if you want to use a 0.8.11 config script |
852 | with 0.8.12, replace if ( len_gt(number) ) with: |
853 | if ( msg:len > bumber ) |
854 +--------------------------------------------------------+
860 - subst('s/re/repl/flags') support
862 - added switch to check the config file (-c)
863 - changes: removed len_gt() and replaced with if (msg:len op number|max_len)
864 - multiple operator support: ==, != for special operations (e.g myself, ip)
865 ==, !=, ~= for strings
866 ==, !=, >, <, >=, <= for integers
867 - new config variables:
868 advertised_address= ip | string
869 address advertised in via and in the DST_* lumps (e.g RR)
870 This is the default value, if empty (default) the socket
871 address will be used.
872 WARNING: - don't set it unless you know what you are doing
874 - you can set anything here, no check is made
875 (e.g. foo.bar will be accepted even if
876 foo.bar doesn't exist)
878 port advertised in via and in the DST_*lumps (e.g. RR)
879 This is the default value, if empty (default) the socket
881 Same warnings as above.
882 - new script commands:
883 set_advertised_address(ip|string)
884 same as advertised_address but it affects only the current message:
885 Message host/lump address= the set_advertised one if
886 present, else advertised_address else socket address.
887 set_advertised_port(no)
888 same as advertised_port but it affects only the current
889 message; see set_advertised_address & s/address/port/g
892 - usernames are case insensitive
895 - lookup function succeeds when appending of a branch failed
898 - support for rpid stored in database (thanks to Jakob Schlyter)
902 - memory leak in digest credentials parser fixed
903 - authenticathion ha1 didn't include domain if username was of the form
904 user@domain and calculate_ha1 was set to yes (modules/auth_db)
905 - tm reply processing race condition (modules/tm), special thanks go to
907 - Many bugs in pa module fixed, works with registrar again.
912 - fifo processing code will write responses only to other
913 fifos and only if they are not hard-linked, also default
914 ser fifo persmissions were changed to 0600.
916 Performance improvements
917 ========================
918 - tuned internal malloc implementation parameters to better reflect the
919 actual workload (malloc is a little bit faster now)
923 ***********************************************
924 * Changes introduced in 0.8.11
925 ***********************************************
927 +--------------------------------------------------------+
928 | CAUTION: the 0.8.11 release include changes which |
929 | are incompatible with scripts and databases used |
930 | in previous versions. Care is advised when upgrading |
931 | from previous releases to 0.8.11. |
932 +--------------------------------------------------------+
937 - TCP support and cross-transport forwarding [core]
938 - loose routing support [rr module]
940 - vm -- voicemail interface [vm]
941 - ENUM support [enum]
942 - presence agent [pa]
943 - dynamic domain management -- allows to manipulate
944 hosting of multiple domains in run-time [module]
945 - flat-text-file database support [dbtext]
946 - rich access control lists [permissions]
947 - Feature Improvements
948 - click-to-dial, which is based on improved tm/FIFO
949 that better supports external applications [tm module]
950 - web accounting -- acc module can report to serweb
951 on placed calls [acc module]
952 - improved exec module (header fields passed now
953 as environment variables to scripts) [exec module]
954 - Architectural Improvements
955 - powerpc fast locking support
957 - 64 bits arch. support (e.g. netbsd/sparc64).
958 - New Experimental Features (not tested at all yet)
959 - nathelper utility for Cisco/ATA NAT traversal [nathelper]
960 - another NAT traversal utility [mangler]
961 - postgress support [postgress]
963 - pdt module (prefix2domain) [pdt]
965 Changes to use of ser scripts
966 =============================
968 About Multiple Transport Support
969 --------------------------------
970 SER now suports multiple transport protocols: UDP and TCP. As there
971 may be UAs which support only either protocol and cannot speak to
972 each other directly, we recommend to alway record-route SIP requests,
973 to keep the transport-translating SER in path. Also, if a destination
974 transport is not known, stateful forwarding is recommended -- use of
975 stateless forwarding for TCP2UDP would result in loss of reliability.
980 - reply_route has been renamed to failure_route -- the old name caused
982 - forward_tcp and forward_udp can force SER to forward via specific
987 - radius and sql support integrated in this module; you need to
988 recompile to enable it
989 - acc_flag is now called log_flag to better reflect it relates
990 to the syslog mode (as opposed to sql/radius); for the same
991 reasons, the accounting action is now called "acc_log_request"
992 and the option for missed calls "log_missed_calls"
993 - log_fmt allows now to specify what will be printed to syslog
997 - auth module has been split in auth, auth_db, auth_radius, group
998 group_radius, uri and uri_radius
999 - all the parameters that were part of former auth module are now
1000 part of auth_db module
1001 - auth_db module contains all functions needed for database
1003 - auth_radius contains functions needed for radius authentication
1004 - group module contains group membership checking functions
1005 - group_radius contains radius group membeship checking functions
1006 - is_in_group has been renamed to is_user_in and places to groups
1008 - check_to and check_from have been moved to the uri module
1013 - im is no longer used and has been obsoleted by TM
1017 - exec_uri and exec_user have been obsoleted by exec_dset;
1018 exec_dset is identical to exec_uri in capabilities; it
1019 additionaly passes content of request elements (header
1020 fields and URI parts) in environment variables; users of
1021 exec_user can use exec_dset now and use the "URI_USER"
1022 variable to learn user part of URI
1023 - exec_dset and exec_msg return false, if return value of
1024 script does not euqal zero
1025 - exec_dset takes an additional parameter, which enables
1026 validation of SIP URIs returned by external application
1030 - presence support for Jabber users is enabled loading the PA
1031 module and using handle_subscribe("jabber") for SUBSCRIBE
1032 requests to jabber user
1036 - m_store has now a parameter to set what should be considered
1037 for storing as destination uri. This enables support for saving
1038 the messages on negative replies.
1042 - radius_acc module has been removed and radius accounting
1043 is now part of acc module
1045 registrar/usrloc modules:
1046 -------------------------
1047 - multi domain support, the modules user username@domain as AOR
1049 - descent modification time ordering of contacts
1050 - case sensitive/insensitive comparison of URI can be enabled
1054 - addRecordRoute has been replaced with record_route
1055 - rewriteFromRoute has been replaced with loose_route()
1056 - a new option, "enable_full_lr" can be set to make life
1057 with misimplemented UAs easier and put LR in from "lr=on"
1058 - rr module can insert two Record-Route header fields when
1059 necesarry (disconnected networks, UDP->TCP and so on)
1063 - t_reply_unsafe, used in former versions within reply_routes,
1064 is deprecated; now t_reply is used from any places in script
1065 - t_on_negative is renamed to t_on_failure -- the old name just
1066 caused too much confusion
1067 - FIFO t_uac used by some applications (like serweb) has been
1068 replaced with t_uac_dlg (which allows easier use by dialog-
1069 oriented applications, like click-to-dial)
1070 - if you wish to do forward to another destination from
1071 failure_route (reply_route formerly), you need to call t_relay
1072 or t_relay_to explicitely now
1073 - t_relay_to has been replaced with t_relay_to_udp and t_relay_to_tcp