[sr-dev] More about locally generated 408
Andrei Pelinescu-Onciul
andrei at iptel.org
Wed Apr 14 07:58:25 CEST 2010
On Apr 13, 2010 at 10:11, I??aki Baz Castillo <ibc at aliax.net> wrote:
> 2010/4/13 Daniel-Constantin Mierla <miconda at gmail.com>:
> > in 3.0 there are some extra functions that may help figuring out the type of
> > timeout - t_branch_timeout() and t_branch_replied():
> > http://kamailio.org/docs/modules/stable/modules/tm.html#t_branch_timeout
>
> It could be valid, yes:
>
> failure_route[0]{
> if (t_branch_timeout()){
> if (t_branch_replied())
> log("timeout after receiving a reply (no answer?)\n");
> else
> log("timeout, remote side seems to be down\n");
> # ...
> }
> }
>
>
> However I wonder if the description of the funcion is correct:
>
> ------------------
> 1.5.21. t_branch_replied()
>
> Returns true if the failure route is executed for a branch that did
> receive at least one reply in the past (the "current" reply is not
> taken into account). It can be used only from the failure_route.
> -------------------
>
> What does is mean "Returns true if the failure route is executed for a
> branch that ..."?
> Perhaps it means "Returns true if the failure route is executed for a
> winning branch that ..."?
Yes: returns true if the winning branch received at least one reply in
the past (winning branch == branch for each the failure route is
executed).
Andrei
P.S.: you might also want to check: t_any_replied(), t_any_timeout() and
t_grep_status() (other related new functions from a k < 3.0 point of view).
More information about the sr-dev
mailing list