[SR-Users] Why set this flag on registration?

Alex Balashov abalashov at evaristesys.com
Thu Oct 25 17:04:19 CEST 2018


Hi Isaac,

Not all flags are explicitly used elsewhere in the logic of a config;
some are used to convey information to modules. 

In this case:

   modparam("nathelper", "sipping_bflag", FLB_NATSIPPING)

   https://kamailio.org/docs/modules/5.1.x/modules/nathelper.html#nathelper.p.sipping_bflag

In other words, if this branch flag is set, this Contact will be marked
by the nathelper module for periodic pinging via OPTIONS or INFO[1]. The
purpose of this periodic server-side pinging is to keep NAT pinholes
alive.

-- Alex

[1] https://kamailio.org/docs/modules/5.1.x/modules/nathelper.html#nathelper.p.sipping_method

On Thu, Oct 25, 2018 at 07:35:48AM -0700, Isaac wrote:

> Hello,
> 
> In the example for a dual-stack IPv6/IPv4 Kamailio setup here: https://kb.asipto.com/kamailio:kamailio-mixed-ipv4-ipv6 the "FLB_IPV6" flag is being sent on IPv6 registrations. Why set this flag on IPv6 registrations? If I understand correctly, registration requests never make it beyond !save("location so it's not like the flag can be used further in the dial-plan.
> 
> The code in question:
> 
> route[REGISTRAR] {
> 	if (is_method("REGISTER"))
> 	{
> 		if(isflagset(FLT_NATS))
> 		{
> 			setbflag(FLB_NATB);
> 			# uncomment next line to do SIP NAT pinging
> 			## setbflag(FLB_NATSIPPING);
> 		}
> 		if(af==INET6)
> 			setbflag(FLB_IPV6);
> 		if (!save("location"))
> 			sl_reply_error();
> 		exit;
> 	}
> }
> 
> 
> Any help is appreciated.
> 
> Thanks
> 
> 
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> 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.csrpswitch.com/



More information about the sr-users mailing list