<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"></div><div dir="ltr">Hi Matteo,</div><div dir="ltr"><br></div><div dir="ltr">I remember to had a similar setup and it wasn’t a problem for me.</div><div dir="ltr"><br></div><div dir="ltr">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:</div><div dir="ltr"><br></div><div dir="ltr"><p class="p1" style="margin: 0px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><span class="s1">/* ----- path params ------------------------------------------------------- */<span class="Apple-tab-span" style="white-space: pre;"> </span></span></p><p class="p1" style="margin: 0px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><span class="s1"><span class="Apple-tab-span" style="white-space: pre;"> </span>modparam("path", "use_received", 1)</span></p><p class="p1" style="margin: 0px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><span class="s1"><span class="Apple-tab-span" style="white-space: pre;"> </span>modparam("path", "enable_r2", 1)</span></p><p class="p1" style="margin: 0px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><span class="s1"><span class="Apple-tab-span" style="white-space: pre;"> </span>modparam("path", "received_format", 1)</span></p><p class="p1" style="margin: 0px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><span class="s1"><br></span></p><p class="p1" style="margin: 0px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><span class="s1">route [CALLER_NAT_DETECT] {<span class="Apple-tab-span" style="white-space: pre;"> </span></span></p><p class="p2" style="margin: 0px 0px 0px 36px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><span class="s1">force_rport();</span></p><p class="p2" style="margin: 0px 0px 0px 36px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><span class="s1">if (nat_uac_test("27")) {</span></p><p class="p3" style="margin: 0px 0px 0px 72px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><span class="s1">if (is_method("REGISTER")) {</span></p><p class="p4" style="margin: 0px 0px 0px 108px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><span class="s1">add_path_received();</span></p><p class="p3" style="margin: 0px 0px 0px 72px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><span class="s1">} else if (is_first_hop()) {</span></p><p class="p4" style="margin: 0px 0px 0px 108px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><span class="s1">set_contact_alias();</span></p><p class="p3" style="margin: 0px 0px 0px 72px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><span class="s1">}</span></p><p class="p5" style="margin: 0px 0px 0px 72px; font-stretch: normal; line-height: normal; min-height: 24.5px; -webkit-text-size-adjust: auto;"><span class="s1"></span><br></p><p class="p3" style="margin: 0px 0px 0px 72px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><span class="s1">setflag(FLT_NATS);</span></p><p class="p2" style="margin: 0px 0px 0px 36px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><span class="s1">} else if (is_method("REGISTER")) {</span></p><p class="p3" style="margin: 0px 0px 0px 72px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><span class="s1">add_path();</span></p><p class="p2" style="margin: 0px 0px 0px 36px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><span class="s1">}</span></p><p class="p1" style="margin: 0px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><span class="s1">}</span></p><p class="p1" style="margin: 0px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><span class="s1"></span></p><p class="p6" style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 24.5px; -webkit-text-size-adjust: auto;"><span class="s1"><span class="Apple-tab-span" style="white-space: pre;"> </span></span></p><p class="p6" style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 24.5px; -webkit-text-size-adjust: auto;">And on the registrar:</p><p class="p6" style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 24.5px; -webkit-text-size-adjust: auto;"><br></p><p class="p1" style="margin: 0px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><span class="s1">modparam("registrar", "path_mode", 1)<span class="Apple-tab-span" style="white-space: pre;"> </span></span></p><p class="p1" style="margin: 0px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><span class="s1"><span class="Apple-tab-span" style="white-space: pre;"> </span>modparam("registrar", "path_use_received", 1</span></p><p class="p1" style="margin: 0px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><span class="s1"><br></span></p><p class="p1" style="margin: 0px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;">It was from an old setups but maybe it does help.</p><p class="p1" style="margin: 0px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><br></p><p class="p1" style="margin: 0px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;">Greetings </p><p class="p1" style="margin: 0px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;">Rick </p><p class="p1" style="margin: 0px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><span class="s1"><br></span></p><p class="p1" style="margin: 0px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><span class="s1"><br></span></p><p class="p1" style="margin: 0px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><span class="s1"></span></p></div><div dir="ltr"><blockquote type="cite">On 17. Jul 2022, at 11:05, matteo brancaleoni <mbrancaleoni@gmail.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr">Hello,<div><br></div><div>I'm trying to setup the following scenario with sip ping:</div><div><br></div><div>UAC -> Kamailio Edge -> Kamailio Registrar</div><div><br></div><div>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.</div><div><br></div><div>Edge proxy inserts a Path header (and contact alias) which get correctly saved on registrar usrloc. Registration works as expected.</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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?</div><div><br></div><div>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?</div><div><br></div><div>Or using the keepalive module maybe, even if that means setting specific timers and manually do what the nathelper module already does?</div><div><br></div><div>Any hint?</div><div><br></div><div>Thanks,</div><div>Matteo</div></div>
<span>__________________________________________________________</span><br><span>Kamailio - Users Mailing List - Non Commercial Discussions</span><br><span> * sr-users@lists.kamailio.org</span><br><span>Important: keep the mailing list in the recipients, do not reply only to the sender!</span><br><span>Edit mailing list options or unsubscribe:</span><br><span> * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</span><br></div></blockquote></body></html>