2009/7/16 Alex Balashov <[email protected]>: > What is the benefit of creating a new transaction on top of the retrans > checks? Why would I not just want to wait until I call t_relay(), which > will also create a transaction if it does not already exist. Why it would > be beneficial to have it exist beforehand?It seems that retransmission > detection works the same way regardless.
It does work the same way... well - almost ;) The trick is that (if I understand it correctly) if you have a long decision logic, you see that retransmissions are really retransmissions. Let's say your processing of invite is: 1. mysql lookup of aliases 2. some rewriting in opensips script 3. mysql lookup of locations 4. t_relay() If your queries take a long time, then it's possible that a retransmission hits opensips before you reach point 4 for the first packet. If you change your processing to do a t_newtran() before point 1, then the retransmission will be caught properly and you won't have to do the extra work (queries). It might be useful, if your routing is not deterministic (for example if you choose a gateway at random). You prevent 2 packets from being routed differently if the processing takes a long time. Please correct me if I said something completely wrong ;) _______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
