<div dir="ltr">Hi guys,<div><br></div><div>I ran into the following problem recently:</div><div><br></div><div>Using a softphone from a computer behind a NAT I register it with FreeSWITCH.</div><div style>It registers with a certain port in the Contact header. FreeSWITCH stores this port in the user's registration info and uses it from then on to send messages to the phone.</div>
<div style><br></div><div style>However, for some reason FreeSWITCH initially sends back an "Unauthorized" response. After that some phones seem to send REGISTER again but with a<b> different port</b>.</div><div style>
This only happen if the phone is behind a NAT. If FreeSWITCH is on the same network as the phone, the phone keeps the same port.</div><div style><br></div><div style>FreeSWITCH ignores that and keeps trying to contact the phone on the old port and of course fails.</div>
<div style><br></div><div style>Only some phones seem to change their port after registration. They include 3CXPhone, X-Lite.</div><div style>Phones that don't do this are MicroSIP and Mizu.</div><div style><br></div>
<div style>I have a wireshark capture file of the session from the softphone machine if anyone would like, I'll be happy to email it or publish it.</div><div style><br></div><div style>So, I have three questions:</div>
<div style>1. Why does FreeSWITCH initially send "Unauthorized" reply?</div><div style>2. Does anyone know why some phones change their port during registration from behind a NAT? </div><div style>3. Should I file a Jira ticket to have FreeSWITCH change UA's registered contact info when the UA sends a message with a different Contact header?</div>
<div><br></div><div><br clear="all"><div><div dir="ltr">Thank you<div><i><font color="#0000ff">Oleg</font></i></div></div></div>
</div></div>