</example>
</section>
+ <section id="blst_methods_add">
+ <title><varname>blst_methods_add</varname> (unsigned integer)</title>
+ <para>
+ Bitmap of method types that trigger blacklisting on
+ transaction timeouts. (This setting has no
+ effect on blacklisting because of send failures.)
+ </para>
+ <para>
+ The following values are associated to the request methods:
+ INVITE=1, CANCEL=2, ACK=4 (not retransmitted, thus, never
+ times-out), BYE=8, INFO=16, REGISTER=32, SUBSCRIBE=64,
+ NOTIFY=126, OTHER=256 (all the unknown types).
+ Check parser/msg_parser.h for farther details.
+ </para>
+ <para>
+ Change the value carefully, because requests not having
+ provisional response (everything but INVITE) can easily
+ cause the next hop to be inserted into the blacklist
+ by mistake. For exmaple the next hop is a proxy, it is alive,
+ but waiting for the response of the UAS, and has higher
+ fr_timer value.
+ </para>
+ <para>
+ The default value is 1, only INVITEs trigger blacklisting
+ </para>
+ <example>
+ <title>Set <varname>blst_methods_add</varname> parameter</title>
+ <programlisting>
+...
+# INVITEs and REGISTERs trigger blacklisting
+modparam("tm", "blst_methods_add", 33)
+...
+ </programlisting>
+ </example>
+ </section>
+
+ <section id="blst_methods_lookup">
+ <title><varname>blst_methods_lookup</varname> (unsigned integer)</title>
+ <para>
+ Bitmap of method types that are looked-up in the blacklist
+ before statefull forwarding.
+ See also <varname>blst_methods_add</varname>
+ </para>
+ <para>
+ The default value is 4294967287, every method type except BYE.
+ (We try to deliver BYEs no matter what)
+ </para>
+ <example>
+ <title>Set <varname>blst_methods_lookup</varname> parameter</title>
+ <programlisting>
+...
+# lookup only INVITEs
+modparam("tm", "blst_methods_lookup", 1)
+...
+ </programlisting>
+ </example>
+ </section>
</section>
return -1; /* drop, try next branch */
}
#ifdef USE_DST_BLACKLIST
- if (use_dst_blacklist){
+ if (use_dst_blacklist
+ && p_msg
+ && (p_msg->REQ_METHOD & tm_blst_methods_lookup)
+ ){
if (dst_is_blacklisted(&uac->request.dst, p_msg)){
su2ip_addr(&ip, &uac->request.dst.to);
DBG("t_send_branch: blacklisted destination: %s:%d (%d)\n",
/* maximum 503 blacklist time */
int tm_blst_503_max=3600; /* in s */
+/* backlist only INVITE timeouts by default */
+unsigned int tm_blst_methods_add=METHOD_INVITE;
+/* look-up the blacklist for every method except BYE by default */
+unsigned int tm_blst_methods_lookup=~METHOD_BYE;
/* are we processing original or shmemed request ? */
enum route_mode rmode=MODE_REQUEST;
extern int tm_blst_503_default; /* in s */
extern int tm_blst_503_min; /* in s */
extern int tm_blst_503_max; /* in s */
+extern unsigned int tm_blst_methods_add;
+extern unsigned int tm_blst_methods_lookup;
/* reply processing status */
enum rps {
(t->uac[r_buf->branch].last_received==0)){
/* no reply received */
#ifdef USE_DST_BLACKLIST
- if (use_dst_blacklist)
+ if (use_dst_blacklist
+ && r_buf->my_T
+ && r_buf->my_T->uas.request
+ && (r_buf->my_T->uas.request->REQ_METHOD & tm_blst_methods_add)
+ )
dst_blacklist_add( BLST_ERR_TIMEOUT, &r_buf->dst,
- (r_buf->my_T)?r_buf->my_T->uas.request:NULL);
+ r_buf->my_T->uas.request);
#endif
#ifdef USE_DNS_FAILOVER
/* if this is an invite, the destination resolves to more ips, and
{"blst_503_def_timeout",PARAM_INT, &tm_blst_503_default },
{"blst_503_min_timeout",PARAM_INT, &tm_blst_503_min },
{"blst_503_max_timeout",PARAM_INT, &tm_blst_503_max },
+ {"blst_methods_add", PARAM_INT, &tm_blst_methods_add },
+ {"blst_methods_lookup", PARAM_INT, &tm_blst_methods_lookup },
{0,0,0}
};