<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/4.4.4">
</HEAD>
<BODY>
Hi Juha,<BR>
<BR>
A few months ago there was a discussion on IRC and the sr-dev list about what is needed for outbound.&nbsp; This requirement to remove broken contacts was presented then by someone as something that (although not explicit in the RFC) is needed.<BR>
<BR>
If a flow is broken, particularly one over TCP where the connection is established from the UAC to the edge proxy, then it will never work again.&nbsp; As such it is extremely wasteful to continue to try and use that flow (in preference to one that will work) for each new dialog forming request.&nbsp; Further, as re-REGISTER times can be quite long, not removing broken contacts could lead to a significant/growing number of dead contacts (all of which will be tried for each new dialog forming request) in the location table.<BR>
<BR>
There is an unregister() function in the registrar module, there are also the reg_(fetch|free)_contacts() functions in the registrar module.&nbsp; None of these appear to do quite what is required.<BR>
<BR>
Peter<BR>
<BR>
<BR>
On Tue, 2013-01-08 at 04:46 +0200, Juha Heinanen wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Peter Dunkley writes:

&gt; One requirement of an outbound capable registrar is that if a flow fails
&gt; (edge proxy returns a 430) the registrar should realise that the flow is
&gt; now dead and remove that contact binding from its database so it is not
&gt; used again as well as trying the next contact.  I can't see anything that
&gt; will do this?  Is this missing?

peter,

i didn't find in rfc5626 a requirement that registrar should remove 430
flow contact, but, if there is such a requirement, in my opinion removal
should be done from failure route in the script by a function that
removes the contact.

a similar thing was discussed a while back (see below).

-- juha

From: Juha Heinanen &lt;<A HREF="mailto:jh@tutpro.com">jh@tutpro.com</A>&gt;
Sender: <A HREF="mailto:sr-dev-bounces@lists.sip-router.org">sr-dev-bounces@lists.sip-router.org</A>
To: <A HREF="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</A>
Subject: [sr-dev] git:master: usrloc(k): keep time of the last keepalive for
        natted UDP contacts
Date: Thu, 13 Sep 2012 17:08:51 +0300

Klaus wrote:

   Why only UDP? Are TCP contacts removed when the TCP connections is closed?

   IMO there should also be a mechanism to remove ALL expired unresponsive 
   contacts.

how about the following for tcp contacts:

- set_forward_no_connect();
- if t_relay() fails because tcp connection does not exist,
  unregister the AoR/contact

what would be needed is a find out that t_relay() failed due to
non-existing connection and a script function to do un-registration of
an AoR/contact.

perhaps both of these two things already exist?

-- juha

_______________________________________________
sr-dev mailing list
<A HREF="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</A>
<A HREF="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</A>
</PRE>
</BLOCKQUOTE>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<PRE>
-- 
Peter Dunkley
Technical Director
Crocodile RCS Ltd
</PRE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>