From oej@edvina.net Tue May 6 09:02:07 2014 From: "Olle E. Johansson" To: sr-dev@lists.kamailio.org Subject: Re: [sr-dev] Forcing TCP connection reuse doesn't use the failure_route when the connection has gone. Date: Tue, 06 May 2014 09:02:05 +0200 Message-ID: <0B9657AC-66B4-4558-885E-13BBF806AD60@edvina.net> In-Reply-To: <5367B9C3.8030602@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2092768159==" --===============2092768159== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On 05 May 2014, at 18:18, Daniel-Constantin Mierla wrot= e: > Hello, >=20 > there are two ways: >=20 > - handle the response code for t_relay() together with setting the flag for= not sending responses internally t_relay() doesn't seem to accept any flags. Can you please expand on this opt= ion, since I'm missing something important here. [...] >> If not, do we need more flexibility in handling this particular tcp_send e= rror (or other similar ones)? Other systems may wish to try additional destin= ations from the failure route. We need to discuss how to manage persistent connections in a better way. This= applies both to TCP and TCP+TLS. /O >> Snippets of my cfg and logs are below. The con_reuse flag is checked in tc= p_send at tcp_main.c:1846 >> =20 >> Regards, >> Hugh >> =20 >> route[RELAY] { >> xlog("L_INFO", "$rm: route[RELAY]\n"); >> loose_route(); >> $var(lr_ret) =3D $rc; >> if ($var(lr_ret) =3D=3D 2) { >> xlog("L_INFO", "$rm: loose route with outbound\n"= ); >> t_on_failure("FAIL_OUTBOUND"); >> set_forward_no_connect(); >> if (t_relay() < 0) { >> xlog("L_WARN", "$rm: loose route with out= bound failed\n"); >> sl_send_reply("500", "Something bad happen= ed"); >> } >> exit; >> } >> . . . >> } >> =20 >> May 1 17:01:08 kamailio-cep[28226]: INFO: