Hi guys,

I'm using Kamailio 5.3.1 in the AWS cloud. For this purpose I'm setting up a 'nat_public_ipaddr' in the 'advertise' feature:


listen=tls:<%= @ipaddr %>:5061 advertise <%= node['hpbx']['nat_public_ipaddr'%>:5061
listen=tcp:<%= @ipaddr %>:5060 advertise <%= node['hpbx']['nat_public_ipaddr'%>:5060
listen=udp:<%= @ipaddr %>:5060 advertise <%= node['hpbx']['nat_public_ipaddr'%>:5060



When I need relaying an incoming message to one of our internal services (for example B2BUA, VMAIL etc) I'm setting up an internal address '@ipaddr'  in the Via header instead of 'nat_public_ipaddr' :


set_advertised_address("<%= @ipaddr %>");
set_advertised_port(5060);



All works fine, but Kamailio adds a 'Record-Route' header containing  'nat_public_ipaddr' automatically into such messages. How can I remove this header or insert my internal address instead before relaying the message? Is it possible?

Thanks,
Andrey