2010/4/14 Daniel-Constantin Mierla miconda@gmail.com:
but if it is a 408 received, without any prior 1xx, t_branch_replied() will be false, right?
As far as I understand the doc it should be 'true'. This is, if I'm right t_branch_replied() is true if the winning branch has received *any* response (provisional or final).
Also, if I'm right, t_branch_timeout() returns true just in case fr_timer or fr_inv_timer (after receiving provisional responses) expires. Using both functions there is a definitive way to check if the winning branch is a local 408 due to fr_timer (exactly what I wanted to achieve).
Maybe a new function t_is_local_reply() would be good to return true if it is a local generated (faked) reply or false for received reply.
As it was in kamailio < 3.0 :)
However, in which cases (apart from the local timeout) is it useful to determine if a response is locally generated? I just can imagine it for downstream TCP errors.
Regards.