[sr-dev] tm issues with TCP forwarding failures

Klaus Darilion klaus.mailinglists at pernau.at
Thu Jan 21 17:37:03 CET 2010


Hi!

The sr/ser/kamailio smaple configs contain:

         if (!t_relay()) {
                 sl_reply_error();
         }

I wonder if this is still the case. I did some TCP tests and when the 
TCP forwarding fails (e.g. RST received or set_forward_no_connect() 
activated), then tm module itself replies stateful with 477 and then 
returning to script with FALSE. Thus, sl_reply_error will send 500 
response stateless too.

IMO if tm module already sent a final response, it should exit without 
entering script again.

Even better would be to reply only if there is no failure route sent.

Further, if TCP forwarding fails due to set_forward_no_connect() it logs:

    ERROR: tm [../../forward.h:169]: msg_send: ERROR: tcp_send failed
    ERROR: tm [t_fwd.c:1235]: ERROR: t_send_branch: sending request on
    branch 0 failed

IMO it would be good to log this only with L_INFO, as it is not an 
error, but intended behavior.


Thanks
Klaus



More information about the sr-dev mailing list