It seems I was digging the wrong page. Documentation is pretty clear. Thank you guys.
/Volkan
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:
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"
Just to highlight, the other section in the docs is also relevant, 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 http://www.twitter.com/miconda -- www.linkedin.com/in/miconda http://www.linkedin.com/in/miconda Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - www.asipto.com http://www.asipto.com/ Kamailio World Conference - www.kamailioworld.com http://www.kamailioworld.com/
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org mailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users