1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5 <section id="tm.parameters" xmlns:xi="http://www.w3.org/2001/XInclude">
9 <revnumber>$Revision$</revnumber>
15 <title>Parameters</title>
17 <section id="fr_timer">
18 <title><varname>fr_timer</varname> (integer)</title>
20 Timer which hits if no final reply for a request or ACK for a
21 negative INVITE reply arrives (in milliseconds).
24 Default value is 30 seconds.
27 <title>Set <varname>fr_timer</varname> parameter</title>
30 modparam("tm", "fr_timer", 10)
36 <section id="fr_inv_timer">
37 <title><varname>fr_inv_timer</varname> (integer)</title>
39 Timer which hits if no final reply for an INVITE arrives after a
40 provisional message was received (in milliseconds).
43 Default value is 120 seconds.
46 <title>Set <varname>fr_inv_timer</varname> parameter</title>
49 modparam("tm", "fr_inv_timer", 200)
55 <section id="wt_timer">
56 <title><varname>wt_timer</varname> (integer)</title>
58 Time for which a transaction stays in memory to absorb delayed
59 messages after it completed; also, when this timer hits,
60 retransmission of local cancels is stopped (a puristic but complex
61 behavior would be not to enter wait state until local branches are
62 finished by a final reply or FR timer--we simplified).
65 Default value is 5 seconds.
68 <title>Set <varname>wt_timer</varname> parameter</title>
71 modparam("tm", "wt_timer", 10)
77 <section id="delete_timer">
78 <title><varname>delete_timer</varname> (integer)</title>
80 Time after which a to-be-deleted transaction currently ref-ed by a
81 process will be tried to be deleted again.
84 Default value is 200 milliseconds.
87 <title>Set <varname>delete_timer</varname> parameter</title>
90 modparam("tm", "delete_timer", 5)
96 <section id="retr_timer1">
97 <title><varname>retr_timer1</varname> (integer)</title>
99 Initial retransmission period (in milliseconds).
102 Default value is 500 milliseconds.
105 <title>Set <varname>retr_timer1</varname> parameter</title>
108 modparam("tm", "retr_timer1", 1000)
114 <section id="retr_timer2">
115 <title><varname>retr_timer2</varname> (integer)</title>
117 Maximum retransmission period (in milliseconds). The retransmission
118 interval starts with <varname>retr_timer1</varname> and increases until
119 it reaches this value. After this it stays constant at
120 <varname>retr_timer2</varname>.
123 Default value is 4000 milliseconds.
126 <title>Set <varname>retr_timer2</varname> parameter</title>
129 modparam("tm", "retr_timer2", 2000)
135 <section id="noisy_ctimer">
136 <title><varname>noisy_ctimer</varname> (integer)</title>
138 If set, INVITE transactions that time-out (FR INV timer) will be
139 always replied. If it's not set, the transaction has only one
140 branch and no response was ever received on this branch, it
141 will be silently dropped (no 408 reply will be generated)
142 This behavior is overridden if a request is forked, the transaction
143 has a failure route or callback, or some functionality explicitly
144 turned it on for a transaction (like acc does to avoid unaccounted
145 transactions due to expired timer).
146 Turn this off only if you know the client UACs will timeout and their
147 timeout interval fro INVITEs is lower or equal than tm's
148 <varname>fr_inv_timer</varname>.
151 Default value is 1 (on).
154 <title>Set <varname>noisy_ctimer</varname> parameter</title>
157 modparam("tm", "noisy_ctimer", 1)
163 <section id="unix_tx_timeout">
164 <title><varname>unix_tx_timeout</varname> (integer)</title>
166 Unix socket transmission timeout, in milliseconds.
169 If unix sockets are used (e.g.: to communicate with sems) and sending
170 a message on a unix socket takes longer then
171 <varname>unix_tx_timeout</varname>, the send will fail.
174 The default value is 500 milliseconds.
177 <title>Set <varname>unix_tx_timeout</varname> parameter</title>
180 modparam("tm", "unix_tx_timeout", 250)
186 <section id="aggregate_challenges">
187 <title><varname>aggregate_challenges</varname> (integer)</title>
189 If set (default), the final reply is a 401 or a 407 and more then
190 one branch received a 401 or 407, then all the WWW-Authenticate and
191 Proxy-Authenticate headers from all the 401 and 407 replies will
192 be aggregated in a new final reply. If only one branch received the
193 winning 401 or 407 then this reply will be forwarded (no new one
195 If 0 only the first 401, or if no 401 was received the first 407, will
196 be forwarded (no header aggregation).
199 Default value is 1 (required by rfc3261).
202 <title>Set <varname>aggregate_challenges</varname> parameter</title>
205 modparam("tm", "aggregate_challenges", 0)
211 <section id="reparse_invite">
212 <title><varname>reparse_invite</varname> (integer)</title>
214 If set (default), the CANCEL and negative ACK requests are
215 constructed from the INVITE message which was sent out instead
216 of building them from the received request. The disadvantage is
217 that the outgoing INVITE has to be partially re-parsed, the advantage
218 is that the CANCEL/ACK is always RFC 3261-compliant, it always
219 contains the same route-set as the INVITE message. Do not disable
220 the INVITE re-parsing for example in the following cases:
223 - The INVITE contains a preloaded route-set, and SER forwards
224 the message to the next hop according to the Route header. The
225 Route header is not removed in the CANCEL without
226 <varname>reparse_invite</varname>=1.
229 - SER record-routes, thus an in-dialog INVITE contains a Route
230 header which is removed during loose routing. If the in-dialog
231 INVITE is rejected, the negative ACK still contains the Route
232 header without <varname>reparse_invite</varname>=1.
238 <title>Set <varname>reparse_invite</varname> parameter</title>
241 modparam("tm", "reparse_invite", 0)
247 <section id="ac_extra_hdrs">
248 <title><varname>ac_extra_hdrs</varname> (string)</title>
250 Header fields prefixed by this parameter value are included
251 in the CANCEL and negative ACK messages if they were present
252 in the outgoing INVITE.
255 Note, that the parameter value effects only those headers
256 which are not covered by RFC-3261 (which are neither mandatory
257 nor prohibited in CANCEL and ACK), and the parameter can be used
258 only together with <varname>reparse_invite</varname>=1.
264 <title>Set <varname>ac_extra_hdrs</varname> parameter</title>
267 modparam("tm", "ac_extra_hdrs", "myfavoriteheaders-")
273 <section id="blst_503">
274 <title><varname>blst_503</varname> (integer)</title>
276 If set and the blacklist support is enabled, every 503 reply source is
277 added to the blacklist. The initial blacklist timeout (or ttl) depends
278 on the presence of a Retry-After header in the reply and the values of
279 the following tm parameters: <varname>blst_503_def_timeout</varname>,
280 <varname>blst_503_min_timeout</varname> and
281 <varname>blst_503_max_timeout</varname>.
284 <emphasis>WARNING:</emphasis>blindly allowing 503 blacklisting could
285 be very easily exploited for DOS attacks in most network setups.
288 The default value is 0 (disabled due to the reasons above).
291 <title>Set <varname>blst_503</varname> parameter</title>
294 modparam("tm", "blst_503", 1)
300 <section id="blst_503_def_timeout">
301 <title><varname>blst_503_def_timeout</varname> (integer)</title>
304 Blacklist interval in seconds for a 503 reply with no Retry-After
306 See also <varname>blst_503</varname>,
307 <varname>blst_503_min_timeout</varname> and
308 <varname>blst_503_max_timeout</varname>.
311 The default value is 0, which means that if no Retry-After header is
312 present, the 503 reply source will not be blacklisted (rfc conformant
316 <title>Set <varname>blst_503_def_timeout</varname> parameter</title>
319 modparam("tm", "blst_503_def_timeout", 120)
325 <section id="blst_503_min_timeout">
326 <title><varname>blst_503_min_timeout</varname> (integer)</title>
329 Minimum blacklist interval in seconds for a 503 reply with a
330 Retry-After header. It will be used if the Retry-After value is
332 See also <varname>blst_503</varname>,
333 <varname>blst_503_def_timeout</varname> and
334 <varname>blst_503_max_timeout</varname>.
337 The default value is 0
340 <title>Set <varname>blst_503_min_timeout</varname> parameter</title>
343 modparam("tm", "blst_503_min_timeout", 30)
349 <section id="blst_503_max_timeout">
350 <title><varname>blst_503_max_timeout</varname> (integer)</title>
353 Maximum blacklist interval in seconds for a 503 reply with a
354 Retry-After header. It will be used if the Retry-After value is
356 See also <varname>blst_503</varname>,
357 <varname>blst_503_def_timeout</varname> and
358 <varname>blst_503_min_timeout</varname>.
361 The default value is 3600
364 <title>Set <varname>blst_503_max_timeout</varname> parameter</title>
367 modparam("tm", "blst_503_max_timeout", 604800)
373 <section id="blst_methods_add">
374 <title><varname>blst_methods_add</varname> (unsigned integer)</title>
376 Bitmap of method types that trigger blacklisting on
377 transaction timeouts. (This setting has no
378 effect on blacklisting because of send failures.)
381 The following values are associated to the request methods:
382 INVITE=1, CANCEL=2, ACK=4 (not retransmitted, thus, never
383 times-out), BYE=8, INFO=16, REGISTER=32, SUBSCRIBE=64,
384 NOTIFY=126, OTHER=256 (all the unknown types).
385 Check parser/msg_parser.h for farther details.
388 Change the value carefully, because requests not having
389 provisional response (everything but INVITE) can easily
390 cause the next hop to be inserted into the blacklist
391 by mistake. For exmaple the next hop is a proxy, it is alive,
392 but waiting for the response of the UAS, and has higher
396 The default value is 1, only INVITEs trigger blacklisting
399 <title>Set <varname>blst_methods_add</varname> parameter</title>
402 # INVITEs and REGISTERs trigger blacklisting
403 modparam("tm", "blst_methods_add", 33)
409 <section id="blst_methods_lookup">
410 <title><varname>blst_methods_lookup</varname> (unsigned integer)</title>
412 Bitmap of method types that are looked-up in the blacklist
413 before statefull forwarding.
414 See also <varname>blst_methods_add</varname>
417 The default value is 4294967287, every method type except BYE.
418 (We try to deliver BYEs no matter what)
421 <title>Set <varname>blst_methods_lookup</varname> parameter</title>
424 # lookup only INVITEs
425 modparam("tm", "blst_methods_lookup", 1)
431 <section id="cancel_b_method">
432 <title><varname>cancel_b_method</varname> (integer)</title>
434 Method used when attempting to CANCEL an unreplied transaction branch
435 (a branch where no reply greater the 99 was received).
436 The possible values are 0, 1, and 2.
439 <emphasis>0</emphasis> will immediately stop the request (INVITE)
440 retrasmission on the branch and it will behave as if the branch was
441 immediately replied with a 487 (a fake internal 487 reply). The
442 advantage is the unreplied branches will be terminated immediately.
443 However it introduces a race risk with a possible slightly delayed
444 2xx reply. In this case we could have an UA receiving a 2xx after a
445 487. Moreover this risk is greatly amplified by packet loss
446 (e.g. if an 180 is lost the branch will look as unreplied and
447 a CANCEL will silently drop the branch, but a 2xx can still come at
451 <emphasis>1</emphasis> will keep retransmitting the request on
452 unreplied branches. If a provisional answer is later received a CANCEL
453 will be immediately sent back (attempting to quickly trigger a 487).
454 This approach is race free and avoids the 2xx after 487 problem, but
455 it's more resource intensive: faced with a branch towards and UA that
456 doesn't answer, a CANCEL attempt will keep the transaction alive for
457 the whole timeout interval (<varname>fr_timer</varname>).
460 <emphasis>2</emphasis> will send and retransmit CANCEL even on
461 unreplied branches, stopping the request retransmissions. This has the
462 same advantages as <emphasis>1</emphasis> and also avoids the extra
463 roundtrip in the case of the provisional reply, but it's not RFC 3261
464 conforming (the RFC allows sending CANCELs only on pending branches).
467 The default value is 0 (the same behaviour as ser versions
471 <title>Set <varname>cancel_b_method</varname> parameter</title>
474 modparam("tm", "cancel_b_method", 1)
480 <section id="reparse_on_dns_failover">
481 <title><varname>reparse_on_dns_failover</varname> (integer)</title>
483 If set to 1, the SIP message after a DNS failover is constructed
484 from the outgoing message buffer of the failed branch instead of
485 from the received request.
488 It must be set if multiple branches are installed, the SIP message is
489 modified differently in them, and at least one of them can result
490 in DNS failover. If the parameter is not set the per-branch modifications
491 are lost after the failover.
494 Note: If the parameter is set, branch route block and TMCB_REQUEST_FWDED
495 callback are not called in case of the failover.
498 Disadvantage: only the via header is replaced in the message buffer, so
499 the outgoing socket address is not corrected in any other part of the message.
500 It is dangerous on multihomed hosts: when the new SIP request after
501 the DNS failover is sent via different interface than the first request,
502 the message can contain incorrect ip address in the Record-Route header
509 <title>Set <varname>reparse_on_dns_failover</varname> parameter</title>
512 modparam("tm", "reparse_on_dns_failover", 0)