00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00033 #include "../../cfg/cfg.h"
00034 #include "../../parser/msg_parser.h"
00035 #include "timer.h"
00036 #include "t_fwd.h"
00037 #include "t_cancel.h"
00038 #include "config.h"
00039
00040 struct cfg_group_tm default_tm_cfg = {
00041
00042
00043
00044
00045
00046
00047
00048 1,
00049 1,
00050 FR_TIME_OUT,
00051 INV_FR_TIME_OUT,
00052 INV_FR_TIME_OUT_NEXT,
00053 WT_TIME_OUT,
00054 DEL_TIME_OUT,
00055 RETR_T1,
00056 RETR_T2,
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067 MAX_INV_LIFETIME,
00068 MAX_NONINV_LIFETIME,
00069 1,
00070 1,
00071 "trying -- your call is important to us",
00072 500,
00073 1,
00074 0,
00075 1,
00076 UM_CANCEL_STATEFULL,
00077 500,
00078 "Server Internal Error",
00079 1,
00080 STR_NULL,
00081
00082 0,
00083
00084
00085 0,
00086
00087 0,
00088 3600,
00089 METHOD_INVITE,
00090
00091 ~METHOD_BYE,
00092
00093 1,
00094 1,
00095 0,
00096 0,
00097 1,
00098
00099 1
00100
00101 };
00102
00103 void *tm_cfg = &default_tm_cfg;
00104
00105 cfg_def_t tm_cfg_def[] = {
00106 {"ruri_matching", CFG_VAR_INT | CFG_ATOMIC, 0, 1, 0, 0,
00107 "perform Request URI check in transaction matching"},
00108 {"via1_matching", CFG_VAR_INT | CFG_ATOMIC, 0, 1, 0, 0,
00109 "perform first Via header check in transaction matching"},
00110 {"fr_timer", CFG_VAR_INT | CFG_ATOMIC, 0, 0, timer_fixup, 0,
00111 "timer which hits if no final reply for a request "
00112 "or ACK for a negative INVITE reply arrives "
00113 "(in milliseconds)"},
00114 {"fr_inv_timer", CFG_VAR_INT | CFG_ATOMIC, 0, 0, timer_fixup, 0,
00115 "timer which hits if no final reply for an INVITE arrives "
00116 "after a provisional message was received (in milliseconds)"},
00117 {"fr_inv_timer_next", CFG_VAR_INT, 0, 0, 0, 0,
00118 "The value [ms] of fr_inv_timer for subsequent branches during serial forking."},
00119 {"wt_timer", CFG_VAR_INT | CFG_ATOMIC, 0, 0, timer_fixup, 0,
00120 "time for which a transaction stays in memory to absorb "
00121 "delayed messages after it completed"},
00122 {"delete_timer", CFG_VAR_INT | CFG_ATOMIC, 0, 0, timer_fixup, 0,
00123 "time after which a to-be-deleted transaction currently "
00124 "ref-ed by a process will be tried to be deleted again."},
00125 {"retr_timer1", CFG_VAR_INT | CFG_ATOMIC, 0, 0, timer_fixup_ms, 0,
00126 "initial retransmission period (in milliseconds)"},
00127 {"retr_timer2", CFG_VAR_INT | CFG_ATOMIC, 0, 0, timer_fixup_ms, 0,
00128 "maximum retransmission period (in milliseconds)"},
00129 {"max_inv_lifetime", CFG_VAR_INT | CFG_ATOMIC, 0, 0, timer_fixup, 0,
00130 "maximum time an invite transaction can live "
00131 "from the moment of creation"},
00132 {"max_noninv_lifetime", CFG_VAR_INT | CFG_ATOMIC, 0, 0, timer_fixup, 0,
00133 "maximum time a non-invite transaction can live "
00134 "from the moment of creation"},
00135 {"noisy_ctimer", CFG_VAR_INT, 0, 1, 0, 0,
00136 "if set, INVITE transactions that time-out (FR INV timer) "
00137 "will be always replied"},
00138 {"auto_inv_100", CFG_VAR_INT | CFG_ATOMIC, 0, 1, 0, 0,
00139 "automatically send 100 to an INVITE"},
00140 {"auto_inv_100_reason", CFG_VAR_STRING, 0, 0, 0, 0,
00141 "reason text of the automatically send 100 to an INVITE"},
00142 {"unix_tx_timeout", CFG_VAR_INT, 0, 0, 0, 0,
00143 "Unix socket transmission timeout, in milliseconds"},
00144 {"restart_fr_on_each_reply", CFG_VAR_INT | CFG_ATOMIC , 0, 1, 0, 0,
00145 "restart final response timer on each provisional reply"},
00146 {"pass_provisional_replies", CFG_VAR_INT | CFG_ATOMIC, 0, 1, 0, 0,
00147 "enable/disable passing of provisional replies "
00148 "to TMCB_LOCAL_RESPONSE_OUT callbacks"},
00149 {"aggregate_challenges", CFG_VAR_INT , 0, 1, 0, 0,
00150 "if the final response is a 401 or a 407, aggregate all the "
00151 "authorization headers (challenges) "
00152 "(rfc3261 requires this to be on)"},
00153 {"unmatched_cancel", CFG_VAR_INT, 0, 2, 0, 0,
00154 "determines how CANCELs with no matching transaction are handled "
00155 "(0: statefull forwarding, 1: stateless forwarding, 2: drop)"},
00156 {"default_code", CFG_VAR_INT | CFG_ATOMIC, 400, 699, 0, 0,
00157 "default SIP response code sent by t_reply(), if the function "
00158 "cannot retrieve its parameters"},
00159 {"default_reason", CFG_VAR_STRING, 0, 0, 0, 0,
00160 "default SIP reason phrase sent by t_reply(), if the function "
00161 "cannot retrieve its parameters"},
00162 {"reparse_invite", CFG_VAR_INT, 0, 1, 0, 0,
00163 "if set to 1, the CANCEL and negative ACK requests are "
00164 "constructed from the INVITE message which was sent out "
00165 "instead of building them from the received request"},
00166 {"ac_extra_hdrs", CFG_VAR_STR, 0, 0, 0, 0,
00167 "header fields prefixed by this parameter value are included "
00168 "in the CANCEL and negative ACK messages if they were present "
00169 "in the outgoing INVITE (depends on reparse_invite)"},
00170 {"blst_503", CFG_VAR_INT | CFG_ATOMIC, 0, 1, 0, 0,
00171 "if set to 1, blacklist 503 SIP response sources"},
00172 {"blst_503_def_timeout", CFG_VAR_INT | CFG_ATOMIC, 0, 0, 0, 0,
00173 "default 503 blacklist time (in s), when no Retry-After "
00174 "header is present"},
00175 {"blst_503_min_timeout", CFG_VAR_INT | CFG_ATOMIC, 0, 0, 0, 0,
00176 "minimum 503 blacklist time (in s)"},
00177 {"blst_503_max_timeout", CFG_VAR_INT | CFG_ATOMIC, 0, 0, 0, 0,
00178 "maximum 503 blacklist time (in s)"},
00179 {"blst_methods_add", CFG_VAR_INT | CFG_ATOMIC, 0, 0, 0, 0,
00180 "bitmap of method types that trigger blacklisting on "
00181 "transaction timeouts"},
00182 {"blst_methods_lookup", CFG_VAR_INT | CFG_ATOMIC, 0, 0, 0, 0,
00183 "Bitmap of method types that are looked-up in the blacklist "
00184 "before statefull forwarding"},
00185 {"cancel_b_method", CFG_VAR_INT, 0, 2, cancel_b_flags_fixup, 0,
00186 "How to cancel branches on which no replies were received: 0 - fake"
00187 " reply, 1 - retransmitting the request, 2 - send cancel"},
00188 {"reparse_on_dns_failover", CFG_VAR_INT | CFG_ATOMIC, 0, 1,
00189 reparse_on_dns_failover_fixup, 0,
00190 "if set to 1, the SIP message after a DNS failover is "
00191 "constructed from the outgoing message buffer of the failed "
00192 "branch instead of from the received request"},
00193 {"disable_6xx_block", CFG_VAR_INT | CFG_ATOMIC, 0, 1, 0, 0,
00194 "if set to 1, 6xx is treated like a normal reply (breaks rfc)"},
00195 {"local_ack_mode", CFG_VAR_INT | CFG_ATOMIC, 0, 2, 0, 0,
00196 "if set to 1 or 2, local 200 ACKs are sent to the same address as the"
00197 " corresponding INVITE (1) or the source of the 200 reply (2) instead"
00198 " of using the contact and the route set (it breaks the rfc, if "
00199 " it is not set to 0 but allows dealing with NATed contacts in some "
00200 "simple cases)"
00201 },
00202 {"local_cancel_reason", CFG_VAR_INT | CFG_ATOMIC, 0, 1, 0, 0,
00203 "if set to 1, a Reason header is added to locally generated CANCELs"
00204 " (see RFC3326)" },
00205 {"e2e_cancel_reason", CFG_VAR_INT | CFG_ATOMIC, 0, 1, 0, 0,
00206 "if set to 1, Reason headers from received CANCELs are copied into"
00207 " the corresponding generated hop-by-hop CANCELs"},
00208 {0, 0, 0, 0, 0, 0}
00209 };