Using latest master commit. Running on AWS EC2 with elastic IP.
If using advertised_address="ELASTICIP" the VIA headers etc get changed correctly but the record route header does not, it still uses the internal IP of the host.
If I add: listen=udp:0.0.0.0:5060 advertise ELASTICIP:5060
The RR advertises the correct IP.
According to the documentation here: https://www.kamailio.org/wiki/cookbooks/5.0.x/core#advertised_address
It should be enough with the advertised_address parameter. Hence, seems to be a problem with the advertised_address parameter.