[OpenSIPS-Users] What is the role of t_check_trans at line 253 of opensips.cfg in SVN trunk

Stanisław Pitucha viraptor at gmail.com
Thu Jul 16 22:28:10 CEST 2009


2009/7/16 Alex Balashov <abalashov at evaristesys.com>:
> 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 ;)



More information about the Users mailing list