<div dir="ltr">Hello,<div>Indeed, by using advertised and enable_double_rr enabled record route header is added properly on all branches.</div><div><br></div><div>Thank You @Sergiu for your message and your time.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 17 Jun 2022 at 12:04, Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@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>
<p>Adding that record route function can be used in branch_route
only as well, not required to have one call in request_route.</p>
<p>The suggested idea below, with advertise would be the one I would
recommend as well.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div>On 16.06.22 17:33, Sergiu Pojoga wrote:<br>
</div>
<blockquote type="cite">
<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" target="_blank">10.22.0.0/24</a>
is the private net<br>
</li>
</ul>
</div>
<div>Script:</div>
<div><br>
</div>
<div>request_route {<br>
record_route();<br>
seturi("<a href="mailto:sip%3Aa@google.com" target="_blank">sip:a@google.com</a>");<br>
append_branch("<a href="mailto:sip%3Ab@10.22.0.1" target="_blank">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" target="_blank">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>
<br>
<fieldset></fieldset>
<pre>__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
* <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
* <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>
</pre>
</blockquote>
<pre cols="72">--
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online: June 20-23, 2022
* <a href="https://www.asipto.com/sw/kamailio-advanced-training-online/" target="_blank">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
</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>