<div dir="ltr"><div dir="ltr">I just did this quick POC test which worked as expected, it added a single RR with public advertised and double RR with both public and private advertise for the branch that routes to a private interface.<div><br></div><div>Prerequisites:</div><div><ul><li>mhomed=1</li><li>modparam("rr", "enable_double_rr", 1)<br></li><li>listen=YOUR_PUB_IP advertise "your_private_fqdn"</li><li>listen=YOUR_PRIV_IP advertise "your_priv_fqdn"</li><li><a href="http://10.22.0.0/24">10.22.0.0/24</a> is the private net<br></li></ul><div></div></div><div>Script:</div><div><br></div><div>request_route {<br>   record_route();<br>   seturi("<a href="mailto:sip%3Aa@google.com">sip:a@google.com</a>");<br>   append_branch("<a href="mailto:sip%3Ab@10.22.0.1">sip:b@10.22.0.1</a>", "1.0");<br>   t_relay();<br>}<br></div><div><br></div><div>Give it a try.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 16, 2022 at 10:36 AM Sergiu Pojoga <<a href="mailto:pojogas@gmail.com">pojogas@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">Have you tried just <b>record_route()</b> with <i>enable_double_rr</i> option enabled? All things considered, RR should take care of it all by itself, per branch.<br><div><br></div><div>A script snippet could help.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 16, 2022 at 10:05 AM Patrick Karton <<a href="mailto:patrickarton@hotmail.com" target="_blank">patrickarton@hotmail.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">It only work for request route.</div><div class="gmail_extra"><br><div class="gmail_quote">Le 16 juin 2022 14:19, Ilie Soltanici <<a href="mailto:iliusha.md@gmail.com" target="_blank">iliusha.md@gmail.com</a>> a écrit :<br type="attribution"><blockquote 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>Thank you, added it now - still the same, unfortunately.</div><div><br></div><div>Regards,</div></div><br><div><div dir="ltr">On Thu, 16 Jun 2022 at 13:29, Sergiu Pojoga <<a href="mailto:pojogas@gmail.com" target="_blank">pojogas@gmail.com</a>> wrote:<br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Have you tried calling <b>t_save_lumps()</b> before relaying, even before RR?</div><br><div><div dir="ltr">On Thu, Jun 16, 2022 at 7:59 AM Ilie Soltanici <<a href="mailto:iliusha.md@gmail.com" target="_blank">iliusha.md@gmail.com</a>> wrote:<br></div><blockquote 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>Is there any way to advertise a different IP Address in the Record-Route header individually per branch?</div><div><br></div><div>I have a setup here - where Kamailio is listening on 2 different interfaces: Local IP and External IP. At the moment if the packet is coming through the internal interface - I'm checking where is it going to and based on that I'm setting the Record-Route header accordingly - and everything works well, except when I have multiple branches: one going through the internal interface and another one through the external one, so in this case, I have to add a different record-route header per branch, by doing this in the branch_route - it's not working and getting the error: w_record_route_advertised_address(): Double attempt to record-route.</div><div><br></div><div>What would be another way to accomplish this?</div></div>
__________________________________________________________<br>
Kamailio - Users Mailing List - Non Commercial Discussions<br>
  * <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
Important: keep the mailing list in the recipients, do not reply only to the sender!<br>
Edit mailing list options or unsubscribe:<br>
  * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>
__________________________________________________________<br>
Kamailio - Users Mailing List - Non Commercial Discussions<br>
  * <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
Important: keep the mailing list in the recipients, do not reply only to the sender!<br>
Edit mailing list options or unsubscribe:<br>
  * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>
</blockquote></div><br></div>__________________________________________________________<br>
Kamailio - Users Mailing List - Non Commercial Discussions<br>
  * <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
Important: keep the mailing list in the recipients, do not reply only to the sender!<br>
Edit mailing list options or unsubscribe:<br>
  * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>
</blockquote></div></div>