[SR-Users] What is the lifecycle of Branch Flag (setbflag)

Daniel-Constantin Mierla miconda at gmail.com
Mon Nov 30 10:15:22 CET 2020


Hello,

the branch flags are kept in memory only during the transaction
lifetime, all branches being destroyed along with the transaction. If
you set it in the request_route, then the branch flags are for the first
branch. Then you can set/test them also in branch_route blocks, then
working with the current branch flags.

What is particular to branch flags is that if you set some during the
processing of REGISTER requests, they are stored in location record for
corresponding contact address and restored later when one does
lookup(location). So they can be persistent over the time, associated
with a contact address.

If you need flags persistent per call lifetime, then you have to use
dialog module, which manages its own flags.

Cheers,
Daniel

On 29.11.20 20:18, me.projects at yahoo.com wrote:
> Thanks a lot for all this :)
>
> On Sunday, November 29, 2020, 11:43:29 PM GMT+5, Alex Balashov
> <abalashov at evaristesys.com> wrote:
>
>
> The flags only apply to branches created by Kamailio, not incoming
> branches.
>
> Relaying anything creates a new branch; changing the RURI does not
> affect that.
>
> On 11/29/20 1:40 PM, me.projects at yahoo.com
> <mailto:me.projects at yahoo.com> wrote:
> > Hi Alex, Thanks for the reply. I think branch is identified by RURI...
> > if we change the RURI and relay it to other hop then would it be new
> > Branch ? If we set BFlag in Request Route would it be available this
> > changed RURI for this transaction ?
> >
> > On Sunday, November 29, 2020, 11:21:48 PM GMT+5, Alex Balashov
> > <abalashov at evaristesys.com <mailto:abalashov at evaristesys.com>> wrote:
> >
> >
> > It will be available within a particular branch, which is a subset of a
> > single transaction.
> >
> > On 11/29/20 1:20 PM, me.projects at yahoo.com
> <mailto:me.projects at yahoo.com>
> > <mailto:me.projects at yahoo.com <mailto:me.projects at yahoo.com>> wrote:
> >  > Hi,
> >  >
> >  > What is the lifecycle of Branch Flag? If its set in Request Route
> will
> >  > it be available till end of Dialog or It will be available during
> >  > Transaction only ?
> >  >
> >  > Thanks
> >
> >  >
> >  > _______________________________________________
> >  > Kamailio (SER) - Users Mailing List
> >  > sr-users at lists.kamailio.org <mailto:sr-users at lists.kamailio.org>
> <mailto:sr-users at lists.kamailio.org <mailto:sr-users at lists.kamailio.org>>
> >  > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >
> > <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>>
> >  >
> >
> > --
> > Alex Balashov | Principal | Evariste Systems LLC
> >
> > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> > Web: http://www.evaristesys.com/, <http://www.evaristesys.com/,
> ><http://www.evaristesys.com/, <http://www.evaristesys.com/, >
> >  >http://www.csrpswitch.com/ <http://www.csrpswitch.com/
> ><http://www.csrpswitch.com/ <http://www.csrpswitch.com/>>
> >
> > _______________________________________________
> > Kamailio (SER) - Users Mailing List
> > sr-users at lists.kamailio.org <mailto:sr-users at lists.kamailio.org>
> <mailto:sr-users at lists.kamailio.org <mailto:sr-users at lists.kamailio.org>>
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >
> > <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>>
>
> >
> >
> > _______________________________________________
> > Kamailio (SER) - Users Mailing List
> > sr-users at lists.kamailio.org <mailto:sr-users at lists.kamailio.org>
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>
> >
>
> -- 
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, <http://www.evaristesys.com/,
> >http://www.csrpswitch.com/ <http://www.csrpswitch.com/>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org <mailto:sr-users at lists.kamailio.org>
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Funding: https://www.paypal.me/dcmierla

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20201130/c45979a9/attachment.htm>


More information about the sr-users mailing list