[SR-Users] bflag under failure_route (kamailio 1.5)

Iñaki Baz Castillo ibc at aliax.net
Mon Oct 25 22:30:52 CEST 2010


2010/10/25 Daniel-Constantin Mierla <miconda at gmail.com>:
>> PS: Perhaps would it make sense a constrain so setbflag(),
>> isbflagset() and resetbflag() cannot be used in route and
>> failure_route anymore?
>
> they are necessary in route to mark natted register

Right, but IMHO it would make more sense it to be a flag and not a
bflag (as the registrar server is processing the incoming transaction
rather than generating an outgoing transaction). This is, the
registrar set a flag(NATTED) before "save(location)". When retrieving
the registrations for this AoR this flag would become a bflag.
Of course this changes the current behaviour, but IMHO makes more sense.


> as well as checking the branch flag when you don't run branch_route.

If there are two registrations for an AoR, one of them behind NAT and
the other one with public IP, checking "isbflagset(NATTED)" in route
would retrieve 1 or 0 randomly (depending on the first branch found in
the location table). This is not consistent.


> In failure route you should get the branch flags from selected failed branch.

But is this useful? imagine lookup("location") retrieves two
registrations (one of them behind NAT) and Kamailio receives 486 for
both branches. Which is the winning branch? AFAIK it's random so, what
is the purpose of checing bflags in failure_route?


Cheers.



-- 
Iñaki Baz Castillo
<ibc at aliax.net>



More information about the sr-users mailing list