On Thu, Oct 19, 2017 at 11:06:21AM +0300, Volkan Oransoy wrote:
I wonder purpose of this block in default script. What
I didn’t understand is the purpose of "t_check_trans()”. Accoording to documentation,
this method returns a boolean. So why do we use it even we don’t check output?
# handle retransmissions
if (!is_method("ACK")) {
if(t_precheck_trans()) {
t_check_trans();
exit;
}
t_check_trans();
}
Because t_check_trans() has certain behaviours simply in virtue of being
called:
https://kamailio.org/docs/modules/5.0.x/modules/tm.html#tm.f.t_check_trans
For example:
"For ACKs to negative replies or for ACKs to local transactions it will
terminate the script if the ACK belongs to a transaction"
-- Alex
--
Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web:
http://www.evaristesys.com/,
http://www.csrpswitch.com/