<div dir="ltr">Hello,<div><br></div><div>We are using Kamailio 4.2 and RTPEngine 3.3  hosted on a VM behind NAT in Google Cloud Engine.</div><div><br></div><div>Asterisk 11 + Kamailio + RTPEngine are on the same machine and Kamailio is used as WebRTC Gateway.<br></div><div><br></div><div>INVITES, that are rewritten by Kamailio look like the following:</div><div><br></div><div><div>INVITE <a href="mailto:sip%3AeTden7KoNSdMVCUNYIwmz@wh2.24dial.com">sip:eTden7KoNSdMVCUNYIwmz@wh2.24dial.com</a> SIP/2.0</div><div>Record-Route: <sip:0.0.0.0:5064;lr=on;nat=yes></div><div>Via: SIP/2.0/UDP 0.0.0.0:5064;branch=z9hG4bK86f5.88fb7f8810c91758b5f3962420d3a4ef.0</div><div>Via: SIP/2.0/UDP 10.240.1.95:5060;received=127.0.0.1;branch=z9hG4bK05952ee6;rport=5060</div><div>Max-Forwards: 69</div><div>From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as7900b63f</div><div>To: <<a href="mailto:sip%3AeTden7KoNSdMVCUNYIwmz@wh2.24dial.com">sip:eTden7KoNSdMVCUNYIwmz@wh2.24dial.com</a>></div><div>Contact: <sip:anonymous@10.240.1.95:5060;alias=127.0.0.1~5060~1></div><div>Call-ID: <a href="http://0662d336694c60ed60ed5310571a1aee@10.240.1.95:5060">0662d336694c60ed60ed5310571a1aee@10.240.1.95:5060</a></div><div>CSeq: 102 INVITE</div><div>User-Agent: Asterisk PBX 11.13.1</div><div>Date: Mon, 03 Nov 2014 09:01:39 GMT</div><div>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE</div><div>Supported: replaces, timer</div><div>Content-Type: application/sdp</div><div>Content-Length: 676</div><div>P-hint: outbound</div></div><div><br></div><div><br></div><div>As you can see, Kamailio uses 0.0.0.0 for Record-Route as well as for VIA Header.</div><div>It uses the address configured in kamilio.cfg (listen=udp:<a href="http://0.0.0.0:5064">0.0.0.0:5064</a>)</div><div><br></div><div>I know, that we could use the advertise parameter to tell kamailio the external IP. The problem is, that IPs in GCE are dynamically assigned to the VMs. Thus static configuration of external IP is not sufficient for our setup.</div><div><br></div><div>Is there a way, to let Kamailio gather it's external IP dynamically. (E.g. using a STUN server or something like that?)</div><div><br></div><div>Another possibility would be to tell Kamailio it's external IP via a start parameter. Is that possible?</div><div><br></div><div>Any help would be grateful.</div><div><br></div><div>Kind regards,</div><div>Marko Seidenglanz</div></div>