<div dir="ltr">Hello,<div><br></div><div>This has nothing to do with opensips. This is your router that is picking a random port when it does NAT.</div><div><br></div><div>How you can fix it: it all depends on what kind of router you have. Some allow static NAT binding. The cheap routers don&#39;t have that flexibility.</div>
<div><br></div><div>Some routers, if you do a port forwarding from your public IP:port to opensips, they use that binding for outgoing NAT as well - just another thing to try.</div><div><br></div><div>It also depends on how many devices you have on your LAN side of the router and if any other device is using that port.</div>
<div><br></div><div>Also, sometimes when you reboot the router, it gives you the same port as opensips and will keep it as long as it&#39;s up.</div><div><br></div><div>So, just do some research on your router.</div><div>
<br></div><div>Regards,</div><div>Ali Pey</div><div><br></div><div><br><div class="gmail_extra"><div class="gmail_quote">On Thu, Nov 7, 2013 at 2:48 PM, Max E. Reyes Vera J. <span dir="ltr">&lt;<a href="mailto:navaismo@gmail.com" target="_blank">navaismo@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I was testing the uac_registrant module to register opensips with my sip provider, but I have one issue, when the opensips is registered it use a random port, so when I go to my account details(on the sip provider web page) I can see the status as Registered with my Public_IP:RandomPort, i.e: 189.256.36.12:10623. I tried to use the forced_socket field but with no luck, every time it register with random port.</div>

<div><br></div><div>My opensips is behind NAT</div><div><br></div><div>opensips------&gt;router----------&gt;sip provider.</div><div><br></div><div>Is there a way to force the port on registration just like asterisk does with the 5060 port?</div>

<div><div><br></div><div>Thanks &amp; best regards.</div><div><br></div><div>PD: How can I reply future answers. I mean, I just click on the owner&#39;s thread email and that open my mail client with the RE:subject, but when I check the list my response appear like a new thread. :( </div>
<span class="HOEnZb"><font color="#888888">
<div><br></div>-- <br><div>Saludos Cordiales</div><div><br><b><font color="#ff6600">dCAA</font></b>. Max E. Reyes Vera Juárez<br>Desarrollo y Soporte Asterisk  / Hardware</div><div><a href="mailto:navaismo@gmail.com" target="_blank">navaismo@gmail.com</a><br>

<a href="mailto:mreyesvera@digital-merge.com" target="_blank">mreyesvera@digital-merge.com</a><br><a href="tel:%28%2B52%29%2055%204170-3703%20xt%205000" value="+525541703703" target="_blank">(+52) 55 4170-3703 xt 5000</a><br>
<a href="http://www.Digital-Merge.com" target="_blank">www.Digital-Merge.com</a></div>
</font></span></div></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div><img class="cm-tracker" src="https://contactmonkey.com/api/v1/tracker?cm_session=058bb282-b3ca-403c-8793-750a96591a56&amp;cm_type=open&amp;cm_user_email=alipey@gmail.com"></div></div>