Hi Saul,<br><br>Totally agree with you. In fact in b2b modules I have respected that part of RFC and deleted on both 481 and 408 reply codes. <br>Since I looked in the code for presence, I also did the change and committed it.<br>

<br>Regards,<br>Anca<br><br><div class="gmail_quote">On Wed, Jan 25, 2012 at 11:23 AM, Andrew Pogrebennyk <span dir="ltr">&lt;<a href="mailto:apogrebennyk@sipwise.com">apogrebennyk@sipwise.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Saúl,<br>
Sounds right. Actually the required behavior is further detailed in RFC<br>
3265 paragraph 3.2.2:<br>
<br>
  If the NOTIFY request fails (as defined above) due to a timeout<br>
   condition, and the subscription was installed using a soft-state<br>
   mechanism (such as SUBSCRIBE), the notifier SHOULD remove the<br>
   subscription.<br>
...<br>
   If the NOTIFY request fails (as defined above) due to an error<br>
   response, and the subscription was installed using a soft-state<br>
   mechanism, the notifier MUST remove the corresponding subscription.<br>
...<br>
   If a NOTIFY request receives a 481 response, the notifier MUST remove<br>
   the corresponding subscription even if such subscription was<br>
   installed by non-SUBSCRIBE means (such as an administrative<br>
   interface).<br>
<a href="http://tools.ietf.org/html/rfc3265#page-14" target="_blank">http://tools.ietf.org/html/rfc3265#page-14</a><br>
<div class="HOEnZb"><div class="h5"><br>
On 01/24/2012 06:36 PM, Saúl Ibarra Corretgé wrote:<br>
&gt; Hi all,<br>
&gt;<br>
&gt; While running some tests I realized that if a NOTIFY receives a 408 nothing seems to happen and if another PUBLISH comes in OpenSIPS will try to send another NOTIFY.<br>
&gt;<br>
&gt; Since NOTIFY requests are sent within a dialog, according to RFC3261 (sec 12.2.1) if a response within a dialog is a 481 or a 408 it SHOULD be destroyed.<br>
&gt;<br>
&gt; My proposal is to modify the p_tm_callback in notify.c (presence module) so that it will also destroy the subscription if a 408 is returned.<br>
&gt;<br>
&gt; Doing this is specially insteresting if TCP is being used as a transport and the connection is half-closed: we don&#39;t want to keep a broken subscription around, that will make OpenSIPS attempt to make an outgoing TCP connection for every new NOTIFY, that will most likely fail.<br>


&gt;<br>
&gt; If no one is against it I&#39;d like to go ahead and make the change. Comments are welcome :-)<br>
&gt;<br>
&gt;<br>
&gt; Regards,<br>
&gt;<br>
&gt; --<br>
&gt; Saúl Ibarra Corretgé<br>
&gt; AG Projects<br>
<br>
_______________________________________________<br>
Devel mailing list<br>
<a href="mailto:Devel@lists.opensips.org">Devel@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/devel" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/devel</a><br>
</div></div></blockquote></div><br>