<div dir="ltr">Greeting list, <div><br></div><div>I have opensips behind the nat and using mid_registrar module with below configuration. </div><div><br></div><div><div>listen=udp:<a href="http://10.111.222.4:5060">10.111.222.4:5060</a> as <a href="http://25.96.10.146:5060">25.96.10.146:5060</a><br></div><div><br></div><div>loadmodule "mid_registrar.so"</div><div>modparam("mid_registrar", "mode", 0)</div><div>modparam("mid_registrar", "default_expires", 120)</div><div>modparam("mid_registrar", "max_expires", 120)</div><div>modparam("mid_registrar", "outgoing_expires", 7200)</div><div>modparam("mid_registrar", "received_avp", "$avp(received)")</div></div><div><br></div><div>And my Registration block. </div><div><br></div><div><div>      if (is_method("REGISTER")) {</div><div><br></div><div>                $du = "sip:<a href="http://41.76.34.144:5060">41.76.34.144:5060</a>";</div><div><span style="white-space:pre">                                </span>mid_registrar_save("location");</div><div>                switch ($retcode) {</div><div>                case 1:</div><div>                        route(RELAY);</div><div>                        break;</div><div>                default:</div><div>                        xlog("L_INFO", "Failed");</div><div>                }</div><div>                exit;</div><div>        }</div></div><div><br></div><div>But I see Register leaving the server like below. </div><div><br></div><div><div>2018/07/06 18:11:59.343873 <a href="http://10.111.222.4:5060">10.111.222.4:5060</a> -> <a href="http://41.76.34.144:5060">41.76.34.144:5060</a></div><div>REGISTER sip:<a href="http://captiveplanning.3cx.us:5060">captiveplanning.3cx.us:5060</a> SIP/2.0</div><div>Via: SIP/2.0/UDP 23.96.10.146:5060;branch=z9hG4bK7466.7191fac5.0</div><div>Via: SIP/2.0/UDP 10.0.0.125;rport=23144;received=x`;branch=z9hG4bKa981b751692BBD0A</div><div>From: "Debra Gaglioti" <<a href="mailto:sip%3A4245@captiveplanning.3cx.us">sip:4245@captiveplanning.3cx.us</a>>;tag=952308D0-E63A880D</div><div>To: <<a href="mailto:sip%3A4245@captiveplanning.3cx.us">sip:4245@captiveplanning.3cx.us</a>></div><div>CSeq: 333 REGISTER</div><div>Call-ID: da22e9a02781dcf350e2b1a5a313e358</div><div><b>Contact: <sip:4245@10.111.222.4:5060;ctid=1716504776725769150>;expires=120</b></div><div>User-Agent: PolycomVVX-VVX_301-UA/5.6.0.17325</div><div>Accept-Language: en-us,en;q=0.9</div><div>Proxy-Authorization: Digest username="devcmys", realm="3CXPhoneSystem", nonce="414d535c115041d173:6dd675ef072ae25029323dd3d0e0bb11", uri="sip:<a href="http://captiveplanning.3cx.us:5060">captiveplanning.3cx.us:5060</a>", response="56c88b4</div><div>99d9e7da6dca69cfebdb23e", algorithm=MD5</div><div>Max-Forwards: 69</div><div>Expires: 120</div><div>Content-Length: 0</div></div><div><br></div><div>You can see contact header contains the IP of opensips listening interface not the public ip as advertised. </div><div><br></div><div>Am i missing something or it is intended behavior?</div><div><br></div><div>Any suggestion is much appreciated. </div><div><br></div><div>Thanks </div><div><br></div><div><br></div></div>