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
Daniel
On Sep 18, 2009 at 18:48, Daniel-Constantin Mierla miconda@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?
For example, in failure route "all" would match even if all the replies were local, except the current one which happens to be winning? (e.g. 1 branch, a local 180 followed by a relayed 500 should result in t_local_replied("all") being true or false?).
What should "last" do? It applies only to the winning branch and not to all of them? It means the current winning reply, or the last reply received previously on the winning branch?
I'm also not sure what is "last" supposed to do in a branch route.
I have the code for _all almost done (copy & paste from t_any_replied() slightly modified), all that's missing is the exact behaviour in the above cases.
Andrei
On Sep 18, 2009 at 22:37, Andrei Pelinescu-Onciul andrei@iptel.org wrote:
On Sep 18, 2009 at 18:48, Daniel-Constantin Mierla miconda@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