Hello,
On 17.12.18 11:38, Dmitry Sytchev wrote: > Hi all! > I have a question that arises in mailing list sometimes, but it is > still not clear for me how to work with this. > > We have AWS instance with standard Amazon bi-nat, so basically > communication with external hosts works with > listen udp:ip:port advertise ip:port > > But in case when we need to send external call to internal network by > internal ip addresses, we want to have internal host in record-route. > As far as I understand, basic recommendation is to use separate port > or internal address and select it with appropriate function. > > Maybe it is more theoretical question, but can we do something to > generate correct record-routes and VIA for calls coming from external > network to make their softswitches happy, and still maintain internal > address in messages going to internal hosts, using single host and > port on Kamailio behind nat? you can do also without setting advertise address for a listen socket. Just listen on local IP and then you have to use set_advertise_address(...) to set the IP in Via and record_route_preset(...) to set the Record-Route header. Only that the config becomes a bit more complex, you have to add IF conditions when to add private or public IP addresses there. Cheers, Daniel -- Daniel-Constantin Mierla -- www.asipto.com www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com Kamailio Advanced Training -- www.asipto.com _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users