On 19 Oct 2017, at 20:22, Daniel-Constantin Mierla <miconda@gmail.com> wrote:
On 19.10.17 17:41, Alex Balashov wrote:On Thu, Oct 19, 2017 at 11:06:21AM +0300, Volkan Oransoy wrote:Just to highlight, the other section in the docs is also relevant,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?Because t_check_trans() has certain behaviours simply in virtue of being
# handle retransmissions
if (!is_method("ACK")) {
if(t_precheck_trans()) {
t_check_trans();
exit;
}
t_check_trans();
}
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"
respectively stopping the config execution if it was a retransmission
after sending back the last response.
Cheers,
Daniel
--
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - www.asipto.com
Kamailio World Conference - www.kamailioworld.com
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users