<div dir="ltr">Hi there,<div><br></div><div>I'm already using Kamailio as a simple proxy and it worked flawlessly.</div><div><br></div><div>This time, I need to have a new setup like this:</div><div><br></div><div>[UAC (sip phone)] <--- register & has to deal only with ----> | PUBLIC | [Kamailio + RtpEngine<font face="arial, sans-serif">] | PRIVATE | <----> [Asterisk]</font></div><div><font face="arial, sans-serif">Client = 37.100.100.100 (public)</font></div><div><font face="arial, sans-serif">Asterisk = 172.17.200.20 (private)</font></div><div><font face="arial, sans-serif">Kamailio/RtpEngine = 172.17.203.102 (private, advertising 3.99.99.99 public IP)</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Kamailio and RtpEngine will behave as a SBC/B2BUA, the client will deal only with kamailio using public access (internet), and asterisk will handle the calls but stays 100% private behind kamailio.</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Kamailio will handle registrations to reduce the load put on the asterisk boxes.</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">The setup is running on AWS, my Kamailio has 1 Private IP address tied to 1 Public IP address (an Elastic public IP) so, no multi-homing, one network interface.</font></div><div><font face="arial, sans-serif"><br></font></div><div>I made a "simple" work in progress configuration, the registration is working as a PoC, and my calls are *almost* working but with some nonsense.</div><div><br></div><div>My Main issue is that when my UAC (SIP phone) make a call, to let's say +1000, the call enters kamailio, then kamailio handle the invite, trigger rtpEngine, but the IP addresses in Record-Route and Via headers are wrong.</div><div><br></div><div>From Kamailio to UAC Sip Phone, it seems OK.</div><div>But from Kamailio to Asterisk, the record-route/via headers are set with Kamailio Public IP when it should be the Kamailio private IP.</div><div><br></div><div>So, when Asterisk sends a BYE, it tries to send it to the public IP of Kamailio, which is wrong.</div><div>There are probably other quirks in the configuration but this one, I can't figure out what's wrong.</div><div><br></div><div>I'm attaching a capture file, a log file and my configuration file (some informations are redacted).</div><div>I am missing something and sadly I can't figure out what, a little help would be appreciated :) </div><div><br></div><div>Regards</div><div><br></div></div>