Dear experts,
Would appreciate if anyone can explain why in the given sample Lua script the 'Handle
Retransmission' block checks the return code of t_check_trans (if KSR.tm.t_check_trans
== 0 then), but in the Kamailio native config standard file if just calls the
t_check_trans() function without checking the return code. What is the intention here and
how does it work? Thank you in advance.
Handle retransmission script from native config file:
if (!is_method("ACK")) {
if(t_precheck_trans()) {
t_check_trans();
exit;
}
t_check_trans();
}
Handle retransmission from sample Lua script:
if not KSR.is_ACK() then
if KSR.tmx.t_precheck_trans() > 0 then
KSR.tm.t_check_trans();
return 1;
end
if KSR.tm.t_check_trans() == 0 then
return 1;
end
end