Already tried that.<br><br>Documentation on t_relay from 1.5 says : <br><div style="margin-left: 40px;"><span class="emphasis"><em>0x02</em></span> - do not internally send a 
                                negative reply in case of forward failure (due internal error,
                                bad RURI, bad message, etc).  When a forward failure occurs, no
                                SIP request is relayed and therefore no negative reply or
                                timeout will show up on the failure_route (if one is set).
                                It applies only when the transaction is created.
                                By default one negative reply is sent.
                                Useful if you want to implement a serial forking in case of failure.
                                <br><br></div>The pbx use a dsl connection with a dynamic ip that is renewed during the night.<br>So if a register renew comes at the same time there is a ip update during the night, it will get an error 478 and will stop to register.<br>
<br>My setup is the following : <br><div style="margin-left: 40px;">t_on_reply(&quot;3&quot;);<br>t_on_failure(&quot;9&quot;);<br>if (!t_relay_to(&quot;0x02&quot;))<br>{<br>    xlog(&quot;L_INFO&quot;, &quot;REGISTER RELAY ERROR DROP req &gt; [$rm], from URI: [$fu], To URI: [$tu]&quot;);<br>
    drop();<br>}<br><br>onreply_route[3] {<br>    xlog(&quot;L_INFO&quot;, &quot;REPLY ROUTE rep &gt; [$rm], $rs $rr, from URI: [$fu], To URI: [$tu]&quot;);<br>}<br><br>failure_route[9]<br>{<br>    xlog(&quot;L_INFO&quot;, &quot;failure_route rep &gt; [$rm], $rs $rr, from URI: [$fu], To URI: [$tu]&quot;);<br>
    if (!t_check_status(&quot;401&quot;) &amp;&amp; !t_check_status(&quot;407&quot;))<br>    {<br></div><div style="margin-left: 80px;">xlog(&quot;L_INFO&quot;, &quot;REGISTER2 RESPONSE ERROR DROP rep &gt; [$rm], $rs $rr, from URI: [$fu], To URI: [$tu]&quot;);<br>
drop();<br></div><div style="margin-left: 40px;">    }<br>}<br><br></div>I did put a wrong domain to force network error and I get in the log with 3.1.  (It doesn&#39;t go to the onreply_route or failure_route functions as it was with 1.5).<br>
Kamailio is replying with a SIP/2.0 478 Unresolvable destination (478/TM).<br>I got the error from t_relay_to but the drop() didn&#39;t prevent the 478 to be sent.<br><br>Here is the log :<br>Jun 16 01:59:10 localhost /usr/sbin/kamailio[10304]: ERROR: &lt;core&gt; [resolve.c:1540]: ERROR: sip_hostport2su: could not resolve hostname: &quot;<a href="http://wrongdomain.com">wrongdomain.com</a>&quot; <br>
Jun 16 01:59:10 localhost /usr/sbin/kamailio[10304]: ERROR: tm [ut.h:318]: failed to resolve &quot;<a href="http://wrongdomain.com">wrongdomain.com</a>&quot; <br>Jun 16 01:59:10 localhost /usr/sbin/kamailio[10304]: ERROR: tm [t_fwd.c:1528]: ERROR: t_forward_nonack: failure to add branches <br>
Jun 16 01:59:10 localhost /usr/sbin/kamailio[10304]: INFO: &lt;script&gt;: REGISTER RELAY ERROR DROP req &gt; [REGISTER], from URI: [<a href="mailto:sip%3A771639197@wrongdomain.com">sip:771639197@wrongdomain.com</a>], To URI: [<a href="mailto:sip%3A771639197@wrongdomain.com">sip:771639197@wrongdomain.com</a>]<br>
Jun 16 01:59:36 localhost /usr/sbin/kamailio[10305]: ERROR: &lt;core&gt; [resolve.c:1540]: ERROR: sip_hostport2su: could not resolve hostname: &quot;<a href="http://wrongdomain.com">wrongdomain.com</a>&quot; <br>Jun 16 01:59:36 localhost /usr/sbin/kamailio[10305]: ERROR: tm [ut.h:318]: failed to resolve &quot;<a href="http://wrongdomain.com">wrongdomain.com</a>&quot; <br>
Jun 16 01:59:36 localhost /usr/sbin/kamailio[10305]: ERROR: tm [t_fwd.c:1528]: ERROR: t_forward_nonack: failure to add branches <br>Jun 16 01:59:36 localhost /usr/sbin/kamailio[10305]: ERROR: sl [sl_funcs.c:282]: ERROR: sl_reply_error used: Unresolvable destination (478/SL) <br>
<br>Regards,<br>hp<br><br><div class="gmail_quote">On Thu, Jun 16, 2011 at 1:52 AM, Alex Balashov <span dir="ltr">&lt;<a href="mailto:abalashov@evaristesys.com">abalashov@evaristesys.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
You can catch and drop replies in an an onreply_route or failure_route.<br>
<br>
if(t_check_status(&quot;478&quot;))<br>
   exit;<br>
<br>
--<br>
Alex Balashov - Principal<br>
Evariste Systems LLC<br>
260 Peachtree Street NW<br>
Suite 2200<br>
Atlanta, GA 30303<br>
Tel: +1-678-954-0670<br>
Fax: +1-404-961-1892<br>
Web: <a href="http://www.evaristesys.com/" target="_blank">http://www.evaristesys.com/</a><br>
<div><div></div><div class="h5"><br>
On Jun 15, 2011, at 7:48 PM, Herve Couplet &lt;<a href="mailto:hcouplet@gmail.com">hcouplet@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Hi,<br>
&gt;<br>
&gt; I had a setup with an old version where I used the function t_relay_to(&quot;0x02&quot;).<br>
&gt; Following the 3.1 documentation, flag :<br>
&gt;      0x02 - do not generate reply on internal error (NOTE: has no effect anymore)<br>
&gt;<br>
&gt; I used that function as a workaround with a pbx that stop to register when it receive an error response like<br>
&gt; 478 Unresolvable destination or 408 request timeout.<br>
&gt;<br>
&gt; I did upgrade to 3.1 to have dns srv caching.<br>
&gt;<br>
&gt; Do you know how this would be possible with kamailio 3.1.<br>
&gt;<br>
&gt; Thanks for your suggestions,<br>
&gt; hp<br>
</div></div>&gt; _______________________________________________<br>
&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
&gt; <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
&gt; <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div><br>