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

Bogdan-Andrei Iancu bogdan at voice-system.ro
Fri Jul 17 13:27:53 CEST 2009


Hi Stan,

That is exactly the point....creating a transaction as soon as possible, 
helps you in identifying retransmissions as soon as possible and to 
avoid useless computation (so, reducing the load on your server).

With the current implementation, the penalty is (as per warning I put in 
the TM docs) that creating the transaction before your processing, the 
transaction will not contain the changes from the processing (changes on 
the message, flags, etc).... But this is something on my TODO list to fix.

Regards,
Bogdan

Stanisław Pitucha wrote:
> 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 ;)
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>   




More information about the Users mailing list