<div dir="ltr">hi Benjamín,<br><br>>Can the registrars behind the proxy listen only to the internal network address or do they need a public IP as well?<br>  yes - at the edge proxy you need to listen on a separate interface and use force_send_socket() when shifting interfaces from public/private or from private/public (my prefered method). Another options is to use `mhomed=1` and let kamailio automatically "shift interfaces", I have found this is more overhead for kamailio and manually using force_send_socket() scales better.<br><br>>If the registrars are in an internal network along with the edge proxy, shouldn't the proxy add the internal address as the Path instead of the public?  <br>  yes but you might need to enable the received param for this to work too.<br>  I actually found using contact_alias'ing works really well for this setup. Some Kamailio users may not agree with me on using `contact_alias` since `path` is specifically designed for this use-case.<br><br>>I am seeing that despite the header Path being added, the registrar is trying to relay the INVITE messages to the UAC and not to the proxy, I am using several parameters of the registrar module in the registrar servers such as: use_path(1), path_mode(0), path_use_received(1), path_chek_local(1). <br>  you may need to use `add_path_received()`<br>  also `contact_alias` might work (i like this method but others may not agree with me)<br><br>>Do I have to still tweak the request manually (that is messing with $du/$ru) in order for the packet to go back to the proxy?<br>  No, given you are setting up path correctly on edge & registrar, you should not need to modify pseudovars.<br><br>Feel free to email me directly if you need assistance on this, I've set it up many times and in many different environments.<br>Hope this helps.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 11, 2020 at 11:59 AM Benjamín Visón <<a href="mailto:bvisonl@gmail.com">bvisonl@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Thank you Emmanuel,<div><br></div><div>I am testing out your suggestion but I am encountering an issue and I would like a little guidance if possible. I've setup an edge proxy doing just a load balance with the dispatcher module. Behind that proxy there is another kamailio which  is acting as a registrar. I've confirmed that the proxy is adding the path header. </div><div><br></div><div>I have a couple of questions:</div><div><br></div><div>- Can the registrars behind the proxy listen only to the internal network address or do they need a public IP as well?</div><div>- If the registrars are in an internal network along with the edge proxy, shouldn't the proxy add the internal address as the Path instead of the public?  <br></div><div>- I am seeing that despite the header Path being added, the registrar is trying to relay the INVITE messages to the UAC and not to the proxy, I am using several parameters of the registrar module in the registrar servers such as: use_path(1), path_mode(0), path_use_received(1), path_chek_local(1). </div><div>- Do I have to still tweak the request manually (that is messing with $du/$ru) in order for the packet to go back to the proxy?</div><div></div><div><br></div><div><br></div><div>I know these are a lot of questions but if you could maybe guide me to some samples, related issues or documentation I would appreciate it, I am sure that others that encounter these issues might benefit as well.</div><div><br clear="all"><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Saludos,</div><div dir="ltr"><br><table width="100%" border="0" cellpadding="0" cellspacing="10" style="border-spacing:10px;background-color:transparent"><tbody><tr><td align="left" valign="top" width="10" style="padding:0px"><p style="margin:0px 0px 10px;font-family:Helvetica,Arial,sans-serif;font-size:14px;line-height:16px"></p><p style="margin:0px 0px 10px;font-family:Helvetica,Arial,sans-serif;font-size:14px;line-height:16px"><a href="https://www.facebook.com/bvisonl" style="color:rgb(36,169,57);text-decoration:none;display:inline;background-color:transparent" target="_blank"><img width="24" height="24" src="https://s3.amazonaws.com/htmlsig-assets/polygon/facebook.png" alt="Facebook" style="border: none; vertical-align: middle; display: inline;"></a><a href="https://twitter.com/benjaminvison" style="color:rgb(36,169,57);text-decoration:none;display:inline;background-color:transparent" target="_blank"><img width="24" height="24" src="https://s3.amazonaws.com/htmlsig-assets/polygon/twitter.png" alt="Twitter" style="border: none; vertical-align: middle; display: inline;"></a><a href="https://instagram.com/bvisonl/" style="color:rgb(36,169,57);text-decoration:none;display:inline;background-color:transparent" target="_blank"><img width="24" height="24" src="https://s3.amazonaws.com/htmlsig-assets/polygon/instagram.png" alt="Instagram" style="border: none; vertical-align: middle; display: inline;"></a></p></td><td style="padding:0px;width:6px"></td><td align="left" valign="top" style="padding:0px"><p style="margin:0px 0px 10px;font-size:14px;font-family:Helvetica,Arial,sans-serif;line-height:16px;color:rgb(33,33,33)"><span style="font-weight:bold;display:inline">Benjamín Visón</span> <span style="display:inline">/</span> <span style="display:inline">IT Engineer / Software Developer</span><span style="display:inline"><br></span><a href="mailto:bvisonl@gmail.com" style="color:rgb(36,169,57);text-decoration:none;display:inline;background-color:transparent" target="_blank">bvisonl@gmail.com</a><span style="display:inline"> / (</span><span style="display:inline">829)-664-5163</span></p><div><span style="display:inline"><br></span></div></td></tr></tbody></table></div></div></div></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 10, 2020 at 9:38 PM E. Schmidbauer <<a href="mailto:eschmidbauer@gmail.com" target="_blank">eschmidbauer@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">If you want redundant registrars, you should add an edge proxy (or two if you want redundant edge proxies) and use the path header. This way the user location record includes a "path" back through the proxy which the UAC connected to. </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 10, 2020, 7:29 PM Benjamín Visón <<a href="mailto:bvisonl@gmail.com" target="_blank">bvisonl@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello David,<div><br></div><div>I am able to get the INVITE go from one kamailio to the other just fine and the call actually connects, the problem arises when, for example, a 200 OK (SDP) message is delivered back to the caller, this SDP doesn't have the necessary information for the ACK to route itself back to the caller. Therefore I am having to keep track of each to/from tag (in an htable) and know on which kamailio those to/from tags are being handled so that I can intercept messages and then re-route them since simply calling t_relay would not work. </div><div><br></div><div>This is getting very messy and there are a lot of cases in which the scenario is not working as desired (for example, a BYE message is behaving very in a very strange manner if the caller is the one that hangs up the call).<br></div><div><br></div><div>If you could get me those PPT I would really appreciate it! I am not a SIP guru but I can defend myself. I just can't seem to understand properly how to route these replies/requests.</div><div><br></div><div>If needed, tomorrow I will try to capture a few scenarios with sngrep so that I can share them, I have multiple scenarios with multiple problems but I will try to pick the one that's working the best.</div><div><br></div><div><br clear="all"><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Saludos,</div><div dir="ltr"><br><table width="100%" border="0" cellpadding="0" cellspacing="10" style="border-spacing:10px;background-color:transparent"><tbody><tr><td align="left" valign="top" width="10" style="padding:0px"><p style="margin:0px 0px 10px;font-family:Helvetica,Arial,sans-serif;font-size:14px;line-height:16px"></p><p style="margin:0px 0px 10px;font-family:Helvetica,Arial,sans-serif;font-size:14px;line-height:16px"><a href="https://www.facebook.com/bvisonl" style="color:rgb(36,169,57);text-decoration:none;display:inline;background-color:transparent" rel="noreferrer" target="_blank"><img width="24" height="24" src="https://s3.amazonaws.com/htmlsig-assets/polygon/facebook.png" alt="Facebook" style="border: none; vertical-align: middle; display: inline;"></a><a href="https://twitter.com/benjaminvison" style="color:rgb(36,169,57);text-decoration:none;display:inline;background-color:transparent" rel="noreferrer" target="_blank"><img width="24" height="24" src="https://s3.amazonaws.com/htmlsig-assets/polygon/twitter.png" alt="Twitter" style="border: none; vertical-align: middle; display: inline;"></a><a href="https://instagram.com/bvisonl/" style="color:rgb(36,169,57);text-decoration:none;display:inline;background-color:transparent" rel="noreferrer" target="_blank"><img width="24" height="24" src="https://s3.amazonaws.com/htmlsig-assets/polygon/instagram.png" alt="Instagram" style="border: none; vertical-align: middle; display: inline;"></a></p></td><td style="padding:0px;width:6px"></td><td align="left" valign="top" style="padding:0px"><p style="margin:0px 0px 10px;font-size:14px;font-family:Helvetica,Arial,sans-serif;line-height:16px;color:rgb(33,33,33)"><span style="font-weight:bold;display:inline">Benjamín Visón</span> <span style="display:inline">/</span> <span style="display:inline">IT Engineer / Software Developer</span><span style="display:inline"><br></span><a href="mailto:bvisonl@gmail.com" style="color:rgb(36,169,57);text-decoration:none;display:inline;background-color:transparent" rel="noreferrer" target="_blank">bvisonl@gmail.com</a><span style="display:inline"> / (</span><span style="display:inline">829)-664-5163</span></p><div><span style="display:inline"><br></span></div></td></tr></tbody></table></div></div></div></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 10, 2020 at 2:42 PM David Villasmil <<a href="mailto:david.villasmil.work@gmail.com" rel="noreferrer" target="_blank">david.villasmil.work@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>What happens when you send the INVITE from Kamailio1 to Kamailio2? that should work properly. It is a simple call scenario, unless you have some other requirement?</div><div>There's even some PPTs showing how that works (which i can't find right now)</div><div><br clear="all"><div><div dir="ltr"><div dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" rel="noreferrer" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 10, 2020 at 5:57 PM Benjamín Visón <<a href="mailto:bvisonl@gmail.com" rel="noreferrer" target="_blank">bvisonl@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I am setting up a redundant active/active environment and I am in need of having 2 kamailios operate as full proxies (meaning both of them will accept registrations).</div><div><br></div><div>I am using DMQ in order to keep htables synched as well as dialogs. </div><div><br></div><div>For locations, I have a PostgreSQL database with the registrations.</div><div><br></div><div>My problem is that since both kamailios are accepting registrations the UACs are only able to receive packets from the UAS on which they are registered. Therefore when let's say UAC-1 registers to Kamailio A and it tries to call UAC-2 which is registered on Kamailio B nothing happens because UAC-2 receives the INVITE from Kamailio A and just ignores them.<br></div><div><br></div><div>I've spent almost a month trying to play with inter-kamailio communication (that is, detecting these types of scenarios and sending the INVITE to Kamailio B and have Kamailio B send the INVITE to UAC-2) but there are a LOT of things that are not working properly let alone having to keep track of all the dialog information and to/from tags and doing proper route of all ACK/BYE/CANCEL, etc.</div><div><br></div><div>My question is, is there a way to achieve this scenario where multiple kamailios can coexist with all responsibilities? </div><div><br></div><div><br></div><div>Things I've tried:<br><ul><li>Keep track of to/from tag in an htable and forward requests based on who sent the request</li><li>Use append_branches to handle multiple AOR (with the possibility of 1 user having multiple registrations in different kamailios)</li><li>Manually tweaking $ru/$du based on what type of request is and who is it destined to.</li></ul><div><br></div></div><div>Any orientation will be appreciated as this is a crucial piece of the project I'm working on.</div><br clear="all"><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Saludos,</div><div dir="ltr"><br><table width="100%" border="0" cellpadding="0" cellspacing="10" style="border-spacing:10px;background-color:transparent"><tbody><tr><td align="left" valign="top" width="10" style="padding:0px"><p style="margin:0px 0px 10px;font-family:Helvetica,Arial,sans-serif;font-size:14px;line-height:16px"></p><p style="margin:0px 0px 10px;font-family:Helvetica,Arial,sans-serif;font-size:14px;line-height:16px"><a href="https://www.facebook.com/bvisonl" style="color:rgb(36,169,57);text-decoration:none;display:inline;background-color:transparent" rel="noreferrer" target="_blank"><img width="24" height="24" src="https://s3.amazonaws.com/htmlsig-assets/polygon/facebook.png" alt="Facebook" style="border: none; vertical-align: middle; display: inline;"></a><a href="https://twitter.com/benjaminvison" style="color:rgb(36,169,57);text-decoration:none;display:inline;background-color:transparent" rel="noreferrer" target="_blank"><img width="24" height="24" src="https://s3.amazonaws.com/htmlsig-assets/polygon/twitter.png" alt="Twitter" style="border: none; vertical-align: middle; display: inline;"></a><a href="https://instagram.com/bvisonl/" style="color:rgb(36,169,57);text-decoration:none;display:inline;background-color:transparent" rel="noreferrer" target="_blank"><img width="24" height="24" src="https://s3.amazonaws.com/htmlsig-assets/polygon/instagram.png" alt="Instagram" style="border: none; vertical-align: middle; display: inline;"></a></p></td><td style="padding:0px;width:6px"></td><td align="left" valign="top" style="padding:0px"><p style="margin:0px 0px 10px;font-size:14px;font-family:Helvetica,Arial,sans-serif;line-height:16px;color:rgb(33,33,33)"><span style="font-weight:bold;display:inline">Benjamín Visón</span> <span style="display:inline">/</span> <span style="display:inline">IT Engineer / Software Developer</span><span style="display:inline"><br></span><a href="mailto:bvisonl@gmail.com" style="color:rgb(36,169,57);text-decoration:none;display:inline;background-color:transparent" rel="noreferrer" target="_blank">bvisonl@gmail.com</a><span style="display:inline"> / (</span><span style="display:inline">829)-664-5163</span></p><div><span style="display:inline"><br></span></div></td></tr></tbody></table></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
Kamailio (SER) - Development Mailing List<br>
<a href="mailto:sr-dev@lists.kamailio.org" rel="noreferrer" target="_blank">sr-dev@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
</blockquote></div>
_______________________________________________<br>
Kamailio (SER) - Development Mailing List<br>
<a href="mailto:sr-dev@lists.kamailio.org" rel="noreferrer" target="_blank">sr-dev@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
</blockquote></div>
_______________________________________________<br>
Kamailio (SER) - Development Mailing List<br>
<a href="mailto:sr-dev@lists.kamailio.org" rel="noreferrer" target="_blank">sr-dev@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
</blockquote></div>
_______________________________________________<br>
Kamailio (SER) - Development Mailing List<br>
<a href="mailto:sr-dev@lists.kamailio.org" target="_blank">sr-dev@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
</blockquote></div>
_______________________________________________<br>
Kamailio (SER) - Development Mailing List<br>
<a href="mailto:sr-dev@lists.kamailio.org" target="_blank">sr-dev@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
</blockquote></div>