[SR-Users] Nathelper sip ping and Path support ?

Rick Barenthin dunst0 at gmail.com
Sun Jul 17 13:54:43 CEST 2022


Hi Matteo,

I remember to had a similar setup and it wasn’t a problem for me.

I did have this the configuration running with an older version of Kamailio 5.2 or so but I did configure the following for the path module on the edge proxy:

/* ----- path params ------------------------------------------------------- */	
	modparam("path", "use_received", 1)
	modparam("path", "enable_r2", 1)
	modparam("path", "received_format", 1)

route [CALLER_NAT_DETECT] {	
force_rport();
if (nat_uac_test("27")) {
if (is_method("REGISTER")) {
add_path_received();
} else if (is_first_hop()) {
set_contact_alias();
}

setflag(FLT_NATS);
} else if (is_method("REGISTER")) {
add_path();
}
}
	
And on the registrar:

modparam("registrar", "path_mode", 1)	
	modparam("registrar", "path_use_received", 1

It was from an old setups but maybe it does help.

Greetings 
Rick 


> On 17. Jul 2022, at 11:05, matteo brancaleoni <mbrancaleoni at gmail.com> wrote:
> 
> 
> Hello,
> 
> I'm trying to setup the following scenario with sip ping:
> 
> UAC -> Kamailio Edge -> Kamailio Registrar
> 
> Edge proxy is a multihomed proxy with public/private ips and the registrar is a kamailio on a private network. The edge acts as a nat proxy and loadbalancer.
> 
> Edge proxy inserts a Path header (and contact alias) which get correctly saved on registrar usrloc. Registration works as expected.
> 
> Now, since I need to keep nat open towards the uacs and expire them when they're not reachable anymore, I'm trying to send sip pings from the registrar via the edge proxy. I'm using nathelper sipping in the registrar.
> 
> What I see is that the registrar sends out a sip options putting in the Route header the Path as expected, but the sip packet gets sent directly to the UAC contact and not via the edge, as the Route header specifies.
> 
> After looking into the nathelper code, it seems that the sip packet is sent via udp directly without any specific routing. So the question: it should work what I'm trying to achieve? Maybe not?
> 
> Probably I can work around it setting the ;received in the contact on registrar (it will set to the edge proxy) and since the contact is aliased on the edge when the edge receives an option from the registrar it can process the alias and send it to the correct endpoint, but seems a workaround?
> 
> Or using the keepalive module maybe, even if that means setting specific timers and manually do what the nathelper module already does?
> 
> Any hint?
> 
> Thanks,
> Matteo
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions
>  * sr-users at lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the sender!
> Edit mailing list options or unsubscribe:
>  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220717/63e8f978/attachment.htm>


More information about the sr-users mailing list