On 01/02/2014 01:39 AM, Kelvin Chua wrote:
those timers are for INVITES sent by kamailio right? starting from t_relay() of the INVITE what i am looking for is, when i receive an INVITE, i start counting.
TM's timers - and anything else TM does - are reliant on a transaction existing. A transaction is not created until t_relay() is called.
the reason behind is, with all the functions involving several sql_xquery() involved to find out where to send the t_relay(), there will be unforeseen delays which might cause a very high PDD for my callers, i don't want them to wait.
Even if you had such a timer fire, your database query would still block the SIP worker thread that's handling the request route.
If you have database calls that could get hung for several hundred milliseconds, or even worse, several seconds, the solution to this problem is to fix your architecture and your database calls. Bluntly speaking, you're doing it wrong. No database calls or other external calls upon which Kamailio relies for call processing should be taking long enough to execute that PDD concerns are warranted, or that you should need timers to deal with them.
-- Alex