From miconda@gmail.com Tue May 6 10:17:09 2014 From: Daniel-Constantin Mierla 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 10:17:01 +0200 Message-ID: <53689A7D.6040907@gmail.com> In-Reply-To: <0B9657AC-66B4-4558-885E-13BBF806AD60@edvina.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0748650074==" --===============0748650074== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On 06/05/14 09:02, Olle E. Johansson wrote: > > On 05 May 2014, at 18:18, Daniel-Constantin Mierla > wrote: > >> Hello, >> >> there are two ways: >> >> - 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 option, since I'm missing > something important here. t_relay_to() has the flags: - http://kamailio.org/docs/modules/stable/modules/tm.html#tm.f.t_relay_to Cheers, Daniel > > > [...] > >>> If not, do we need more flexibility in handling this particular >>> tcp_send error (or other similar ones)? Other systems may wish to >>> try additional destinations 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 tcp_send at tcp_main.c:1846 >>> Regards, >>> Hugh >>> route[RELAY] { >>> xlog("L_INFO", "$rm: route[RELAY]\n"); >>> loose_route(); >>> $var(lr_ret) = $rc; >>> if ($var(lr_ret) == 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 outbound failed\n"); >>> sl_send_reply("500", "Something bad happened"); >>> } >>> exit; >>> } >>> . . . >>> } >>> May 1 17:01:08 kamailio-cep[28226]: INFO: