<div dir="ltr">Antonias, <div>yes you can.  You need to if then else the stuff.  if $si==1.2.34 then use nat </div><div>                                                                                                    else don't use nat.</div><div><br></div><div>Note, not only for opensips headers, but you will also need different flags for rtpengine. </div><div><br></div><div><br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">Op wo 2 apr 2025 om 11:35 schreef Antonios Psaras <<a href="mailto:apsaras@microbase.gr">apsaras@microbase.gr</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg9102177401441354556"><div lang="EN-US"><div class="m_9102177401441354556WordSection1"><p class="MsoNormal">Dear all.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I have the following setup.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">OpenSIPs Server has two interfaces (DMZ / LAN). DMZ is behind NAT. RTP Engines is also configured.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Everything was fine until an end point with in DMZ asked for SIP Trunking. The issue here is that if DMZ Client tries to connect to OpenSIPs DMZ interface, OpenSIPs will reply with NAT IP on SIP body as well as NAT IP on SDP.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">My thought is to create an other socket on DMZ interface with a different port without NAT configuration and ask the DMZ Client to connect on that interface. That will required extra configuration per peer as I will need to specify the preferred communication socket ie on load balancing configuration. Moreover I should configure a new RTPEngine Service without NAT configuration and route those calls to that one. <u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Most probably the above scenario will work but I am looking for any alternatives to minimize configuration and complexity. <u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Is there any way to control the usage of NAT IP on OpenSIPs script. Ie if source IP is with in DMZ do not send NAT IP in SIP Headers.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Regards<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p></div></div>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</div></blockquote></div>