Hello,

t_precheck_trans() is returning true if a SIP worker process has received the SIP request and it is handling it at that moment. However, in case of a retransmission, that can be at the moment when the transaction was already created for the previous same requests (e.g., via t_newtran() or the execution is in a branch_route block). The specs require that a stateful proxy re-sends the last response in case of a re-transmission. t_check_trans() is used for that purpose, to see if the transaction was already created and to what specs require.

If still not clear, I will try to add more details.

Cheers,
Daniel


On 04.08.17 21:45, Joe Baran wrote:
Probably an elementary question, but we're relatively new at digging into the details.  We are trying to understand the following block of config code and have a question or two.  Our assumption is the t_precheck_trans() function tells us whether another packet has arrived already as a retransmission.  However, we're not clear on what the t_check_trans() is doing assuming the condition is true.  Any direction on this?

Thanks.

route[CHECK_RETRANS]
{
  # handle retransmissions
    if(t_precheck_trans()) {
        t_check_trans();
        exit;
    }
}


Joe Baran


_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - www.kamailioworld.com