Adding that record route function can be used in branch_route only as well, not required to have one call in request_route.
The suggested idea below, with advertise would be the one I would recommend as well. Cheers, Daniel On 16.06.22 17:33, Sergiu Pojoga wrote: > 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. > > Prerequisites: > > * mhomed=1 > * modparam("rr", "enable_double_rr", 1) > * listen=YOUR_PUB_IP advertise "your_private_fqdn" > * listen=YOUR_PRIV_IP advertise "your_priv_fqdn" > * 10.22.0.0/24 <http://10.22.0.0/24> is the private net > > Script: > > request_route { > record_route(); > seturi("sip:a...@google.com <mailto:sip%...@google.com>"); > append_branch("sip:b@10.22.0.1 <mailto:sip%3Ab@10.22.0.1>", "1.0"); > t_relay(); > } > > Give it a try. > > On Thu, Jun 16, 2022 at 10:36 AM Sergiu Pojoga <pojo...@gmail.com> wrote: > > Have you tried just *record_route()* with /enable_double_rr/ > option enabled? All things considered, RR should take care of it > all by itself, per branch. > > A script snippet could help. > > On Thu, Jun 16, 2022 at 10:05 AM Patrick Karton > <patrickar...@hotmail.com> wrote: > > It only work for request route. > > Le 16 juin 2022 14:19, Ilie Soltanici <iliusha...@gmail.com> a > écrit : > > Hello, > > Thank you, added it now - still the same, unfortunately. > > Regards, > > On Thu, 16 Jun 2022 at 13:29, Sergiu Pojoga > <pojo...@gmail.com> wrote: > > Have you tried calling *t_save_lumps()* before > relaying, even before RR? > > On Thu, Jun 16, 2022 at 7:59 AM Ilie Soltanici > <iliusha...@gmail.com> wrote: > > Hello, > > Is there any way to advertise a different IP > Address in the Record-Route header individually > per branch? > > 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. > > What would be another way to accomplish this? > __________________________________________________________ > Kamailio - Users Mailing List - Non Commercial > Discussions > * sr-users@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 > > __________________________________________________________ > Kamailio - Users Mailing List - Non Commercial Discussions > * sr-users@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 > > > __________________________________________________________ > Kamailio - Users Mailing List - Non Commercial Discussions > * sr-users@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 > > > __________________________________________________________ > Kamailio - Users Mailing List - Non Commercial Discussions > * sr-users@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 -- Daniel-Constantin Mierla -- www.asipto.com www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - Online: June 20-23, 2022 * https://www.asipto.com/sw/kamailio-advanced-training-online/
__________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions * sr-users@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