[sr-dev] any way to detect local replies in failure route

Andrei Pelinescu-Onciul andrei at iptel.org
Tue Sep 22 18:22:57 CEST 2009


On Sep 18, 2009 at 22:37, Andrei Pelinescu-Onciul <andrei at iptel.org> wrote:
> On Sep 18, 2009 at 18:48, Daniel-Constantin Mierla <miconda at gmail.com> wrote:
> > While testing the kamailio 3.0 I couldn't find a way to detect in 
> > failure route if replies were locally generated, such it could be 
> > achieved in 1.5 with:
> > http://kamailio.org/docs/modules/1.5.x/tm.html#id2531261
> 
> No, there isn't.
> 
> What does "all" and "last" exactly mean?

After looking at the k code, at least for the failure route:
t_local_replied("all") is equivalent with 
  (t_branch_timeout() && ! t_any_replied())
   /* failure route entered due to timeout and all previous replies were
    * local => all local */

For all the other routes, t_local_replied("all") is equivalent with
!t_any_replied().

t_local_replied("last") is equivalent with !t_branch_replied() in
failure route (but note that in this case it checks the last reply
received on the winning branch and not the current one).

For the other routes there is no t_local_replied("last") equivalent
(t_branch_replied() is allowed only in the failure route).

Andrei



More information about the sr-dev mailing list