[sr-dev] git:master: modules:carrierroute Fix documentation when using cr_route/ t_relay in failure routes

Andrei Pelinescu-Onciul andrei at iptel.org
Fri Oct 1 13:09:52 CEST 2010


On Oct 01, 2010 at 11:49, Iñaki Baz Castillo <ibc at aliax.net> wrote:
> 2010/10/1 Andrei Pelinescu-Onciul <andrei at iptel.org>:
> > One more clarification:  the r-ruri change autodetection (3.1) works
> > in all routes, not only in failure routes.
> > E.g., if I have in the main route:
> >
> > t_relay();
> > setuser("foo1");
> > t_relay();
> > setuser("foo2);
> > t_relay();
> >
> > 3 branches will be created: 1 for the original uri, one for foo1@ and
> > the last one for foo2 at .
> 
> Then the meaning of append_branch is confusing, it seems that with
> this new changes it's not needed at all so, what about removing it?

You can still add a branch without changing the uri:
append_branch("sip:foo at bar").

You can use it to create a duplicate branch (though I admit I don't know
what would this be usefull for), e.g.:
setuser("foo");
append_branch(); # this does nothing
append_branch(); # this will add a duplicate branch (same uri)

A more valid use, is to add branches first, and calling t_relay() only
once at the end (classical parallel forking), e.g.:
append_branch();
setuser("foo1");
append_branch();
setuser("foo2");
append_branch();
t_relay();

is equivalent with the first example.

Andrei



More information about the sr-dev mailing list