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

Isaac isaac at blackberrymessenger.mobi
Thu Oct 25 16:35:48 CEST 2018


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




More information about the sr-users mailing list