Already tried that. Documentation on t_relay from 1.5 says : *0x02* - 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.
The pbx use a dsl connection with a dynamic ip that is renewed during the night. 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. My setup is the following : t_on_reply("3"); t_on_failure("9"); if (!t_relay_to("0x02")) { xlog("L_INFO", "REGISTER RELAY ERROR DROP req > [$rm], from URI: [$fu], To URI: [$tu]"); drop(); } onreply_route[3] { xlog("L_INFO", "REPLY ROUTE rep > [$rm], $rs $rr, from URI: [$fu], To URI: [$tu]"); } failure_route[9] { xlog("L_INFO", "failure_route rep > [$rm], $rs $rr, from URI: [$fu], To URI: [$tu]"); if (!t_check_status("401") && !t_check_status("407")) { xlog("L_INFO", "REGISTER2 RESPONSE ERROR DROP rep > [$rm], $rs $rr, from URI: [$fu], To URI: [$tu]"); drop(); } } I did put a wrong domain to force network error and I get in the log with 3.1. (It doesn't go to the onreply_route or failure_route functions as it was with 1.5). Kamailio is replying with a SIP/2.0 478 Unresolvable destination (478/TM). I got the error from t_relay_to but the drop() didn't prevent the 478 to be sent. Here is the log : Jun 16 01:59:10 localhost /usr/sbin/kamailio[10304]: ERROR: <core> [resolve.c:1540]: ERROR: sip_hostport2su: could not resolve hostname: " wrongdomain.com" Jun 16 01:59:10 localhost /usr/sbin/kamailio[10304]: ERROR: tm [ut.h:318]: failed to resolve "wrongdomain.com" Jun 16 01:59:10 localhost /usr/sbin/kamailio[10304]: ERROR: tm [t_fwd.c:1528]: ERROR: t_forward_nonack: failure to add branches Jun 16 01:59:10 localhost /usr/sbin/kamailio[10304]: INFO: <script>: REGISTER RELAY ERROR DROP req > [REGISTER], from URI: [ sip:771639...@wrongdomain.com], To URI: [sip:771639...@wrongdomain.com] Jun 16 01:59:36 localhost /usr/sbin/kamailio[10305]: ERROR: <core> [resolve.c:1540]: ERROR: sip_hostport2su: could not resolve hostname: " wrongdomain.com" Jun 16 01:59:36 localhost /usr/sbin/kamailio[10305]: ERROR: tm [ut.h:318]: failed to resolve "wrongdomain.com" Jun 16 01:59:36 localhost /usr/sbin/kamailio[10305]: ERROR: tm [t_fwd.c:1528]: ERROR: t_forward_nonack: failure to add branches 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) Regards, hp On Thu, Jun 16, 2011 at 1:52 AM, Alex Balashov <abalas...@evaristesys.com>wrote: > You can catch and drop replies in an an onreply_route or failure_route. > > if(t_check_status("478")) > exit; > > -- > Alex Balashov - Principal > Evariste Systems LLC > 260 Peachtree Street NW > Suite 2200 > Atlanta, GA 30303 > Tel: +1-678-954-0670 > Fax: +1-404-961-1892 > Web: http://www.evaristesys.com/ > > On Jun 15, 2011, at 7:48 PM, Herve Couplet <hcoup...@gmail.com> wrote: > > > Hi, > > > > I had a setup with an old version where I used the function > t_relay_to("0x02"). > > Following the 3.1 documentation, flag : > > 0x02 - do not generate reply on internal error (NOTE: has no effect > anymore) > > > > I used that function as a workaround with a pbx that stop to register > when it receive an error response like > > 478 Unresolvable destination or 408 request timeout. > > > > I did upgrade to 3.1 to have dns srv caching. > > > > Do you know how this would be possible with kamailio 3.1. > > > > Thanks for your suggestions, > > hp > > _______________________________________________ > > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list > > sr-users@lists.sip-router.org > > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users > > _______________________________________________ > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list > sr-users@lists.sip-router.org > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users >
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users