<div dir="ltr">I&#39;ve come across difficulties with TCP and NAT. Some NAT implementations do not allow new connections from the PBX to the phone through the NAT and there&#39;s no requirement to reuse and existing, long-lived TCP connection. Some notifications and invites can get blocked unnecessarily. </div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On 8 May 2013 19:13, Spencer Thomason <span dir="ltr">&lt;<a href="mailto:spencer@5ninesolutions.com" target="_blank">spencer@5ninesolutions.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="auto"><div>Understood.  My plan is to use UDP for all &quot;trunking&quot; type endpoints at TCP for desk phones as they will likely receive more NOTIFYs and in most cases being behind NAT where the longer connection timeout comes in handy.  I also found a good paper on the subject:</div>
<div><a href="http://www.cs.columbia.edu/~kumiko/publish/IPTComm08_paper.pdf" target="_blank">http://www.cs.columbia.edu/~kumiko/publish/IPTComm08_paper.pdf</a></div><div><br></div><div>In regard to connection timeout how does Freeswitch handle this?  I noticed the new Sofia parameters and I was curious if the connection lifetime was configurable as well.</div>
<div><br></div><div>BR,</div><div>Spencer</div><div><div class="h5"><div><br>On May 8, 2013, at 10:20 AM, &quot;Jeff Leung&quot; &lt;<a href="mailto:jleung@v10networks.ca" target="_blank">jleung@v10networks.ca</a>&gt; wrote:<br>
<br></div><blockquote type="cite"><div><blockquote type="cite"><span>Hi Jeff,</span><br></blockquote><blockquote type="cite"><span>Thanks for the insight.  Forgive my ignorance but if I have two Identical</span><br></blockquote>
<blockquote type="cite"><span>Freeswitch servers with SRV records and endpoints that properly support</span><br></blockquote><blockquote type="cite"><span>SRVs, why do I loose the ability to failover if one host is not reachable?</span><br>
</blockquote><span></span><br><span>TCP is a stateful protocol. On the other hand UDP isn&#39;t, it&#39;s stateless.</span><br><span>It&#39;s just easier to failover with UDP than with TCP if you understand the</span><br>
<span>difference between the two protocols. I&#39;m not saying that it&#39;s not possible</span><br><span>to do so with TCP, but with the way how SIP works, you&#39;d want to use UDP if</span><br><span>you want failover capabilities without the headache.</span><br>
<span></span><br><blockquote type="cite"><span>Also as many of these end points are Polycoms behind NAT, I can&#39;t see any</span><br></blockquote><blockquote type="cite"><span>reason I&#39;d still need NDLB-force-rport on the profile?</span><br>
</blockquote><blockquote type="cite"><span></span><br></blockquote><span></span><br><span>Unfortunately, I don&#39;t work with Polycom phones. Brian West over here can</span><br><span>comment on that issue.</span><br><span></span><br>
<blockquote type="cite"><span>Since these are application servers, handling conferences, presence, etc.,</span><br></blockquote><span>I&#39;d</span><br><blockquote type="cite"><span>imagine I would hit other bottlenecks before I hit the TCP connection</span><br>
</blockquote><span>limit.</span><br><span></span><br><span>Yes that&#39;s true, but if you had a FreeSWITCH box that purely handled SIP</span><br><span>messages and no media, you&#39;d probably hit that TCP Open connection limit.</span><br>
<span></span><br><blockquote type="cite"><span>On May 8, 2013, at 9:51 AM, &quot;Jeff Leung&quot; &lt;<a href="mailto:jleung@v10networks.ca" target="_blank">jleung@v10networks.ca</a>&gt; wrote:</span><br></blockquote><blockquote type="cite">
<span></span><br></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite">
<blockquote type="cite"><blockquote type="cite"><span>-----Original Message-----</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>From: <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a></span><br>
</blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>[mailto:<a href="mailto:freeswitch-" target="_blank">freeswitch-</a> <a href="mailto:users-bounces@lists.freeswitch.org" target="_blank">users-bounces@lists.freeswitch.org</a>] On Behalf Of</span><br>
</blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>Vik Killa</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
<blockquote type="cite"><span>Sent: Wednesday, May 8, 2013 9:18 AM</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>To: FreeSWITCH Users Help</span><br>
</blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>Subject: Re: [Freeswitch-users] TCP vs UDP SIP</span><br></blockquote></blockquote></blockquote><blockquote type="cite">
<blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>That I would agree with, but the thing is you lose the capability of</span><br></blockquote></blockquote>
<blockquote type="cite"><blockquote type="cite"><span>failover in the unlikely event that a node in a FreeSWITCH cluster fail.</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br>
</blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>In my opinion, TCP seems better than UDP as you know all the SIP</span><br></blockquote></blockquote></blockquote><blockquote type="cite">
<blockquote type="cite"><blockquote type="cite"><span>packets are making to their destination.</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span></span><br>
</blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>On Wed, May 8, 2013 at 11:37 AM, Jeff Leung &lt;<a href="mailto:jleung@v10networks.ca" target="_blank">jleung@v10networks.ca</a>&gt;</span><br>
</blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>wrote:</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
<blockquote type="cite"><span></span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote></blockquote><blockquote type="cite">
<blockquote type="cite"><blockquote type="cite"><span>   On a Linux system there is a limit of how many open TCP</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">
<span>connections you have.</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>If I can remember correctly, I think Darren from 2600hz did discuss</span><br>
</blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>about the limit of open TCP connections you can have on a Linux</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
<span>system. Correct me if I&#39;m wrong on this, but that seems to be the</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>case. And I have seen instances of that happening on a misconfigured</span><br>
</blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>Squid Proxy</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite">
<blockquote type="cite"><blockquote type="cite"><span>I never heard this before...where and how it this limit defined?</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">
<span></span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
<blockquote type="cite"><span>   Unless you have a crazy amount of endpoints you have to serve, TCP</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">
<span>probably isn&#39;t really worth it in my opinion.</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
<span>Assuming it&#39;s one Open TCP connection per endpoint,  you&#39;d probably</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>need more endpoints than the maximum amount of open TCP connections</span><br>
</blockquote></blockquote><blockquote type="cite"><span>to</span><br></blockquote><blockquote type="cite"><blockquote type="cite"><span>hit that problem</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
<span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>How many endpoints?</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
<blockquote type="cite"><span></span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote></blockquote><blockquote type="cite">
<blockquote type="cite"><blockquote type="cite"><span>   Also did I also mention that TCP connections don&#39;t really fix NAT</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
<blockquote type="cite"><span>issues?</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
<span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote>
<blockquote type="cite"><span>__________________________________________________________</span><br></blockquote><blockquote type="cite"><span>____________</span><br></blockquote><blockquote type="cite"><blockquote type="cite">
<span>___ Professional FreeSWITCH Consulting Services:</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span><a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a></span><br>
</blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span><a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a></span><br></blockquote></blockquote><blockquote type="cite">
<blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>FreeSWITCH-powered IP PBX: The CudaTel Communication Server</span><br></blockquote></blockquote><blockquote type="cite">
<blockquote type="cite"><span><a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote>
<blockquote type="cite"><blockquote type="cite"><span>Official FreeSWITCH Sites</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></span><br>
</blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span><a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a></span><br></blockquote></blockquote><blockquote type="cite">
<blockquote type="cite"><span><a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote>
<blockquote type="cite"><blockquote type="cite"><span>FreeSWITCH-users mailing list</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a></span><br>
</blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></span><br>
</blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>UNSUBSCRIBE:http://<a href="http://lists.freeswitch.org/mailman/options/freeswitch-use" target="_blank">lists.freeswitch.org/mailman/options/freeswitch-use</a></span><br>
</blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>rs</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></span><br>
</blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>__________________________________________________________</span><br>
</blockquote><blockquote type="cite"><span>_______________</span><br></blockquote><blockquote type="cite"><span>Professional FreeSWITCH Consulting Services:</span><br></blockquote><blockquote type="cite"><span><a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a></span><br>
</blockquote><blockquote type="cite"><span><a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite">
<span>FreeSWITCH-powered IP PBX: The CudaTel Communication Server</span><br></blockquote><blockquote type="cite"><span><a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a></span><br></blockquote><blockquote type="cite">
<span></span><br></blockquote><blockquote type="cite"><span>Official FreeSWITCH Sites</span><br></blockquote><blockquote type="cite"><span><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></span><br>
</blockquote><blockquote type="cite"><span><a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a></span><br></blockquote><blockquote type="cite"><span><a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a></span><br>
</blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>FreeSWITCH-users mailing list</span><br></blockquote><blockquote type="cite"><span><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a></span><br>
</blockquote><blockquote type="cite"><span><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></span><br></blockquote><blockquote type="cite">
<span>UNSUBSCRIBE:http://<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">lists.freeswitch.org/mailman/options/freeswitch-users</a></span><br></blockquote><blockquote type="cite"><span><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></span><br>
</blockquote><span></span><br><span></span><br><span>_________________________________________________________________________</span><br><span>Professional FreeSWITCH Consulting Services:</span><br><span><a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a></span><br>
<span><a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a></span><br><span></span><br><span>FreeSWITCH-powered IP PBX: The CudaTel Communication Server</span><br><span><a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a></span><br>
<span></span><br><span>Official FreeSWITCH Sites</span><br><span><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></span><br><span><a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a></span><br>
<span><a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a></span><br><span></span><br><span>FreeSWITCH-users mailing list</span><br><span><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a></span><br>
<span><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></span><br><span>UNSUBSCRIBE:http://<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">lists.freeswitch.org/mailman/options/freeswitch-users</a></span><br>
<span><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></span><br><span></span><br></div></blockquote></div></div></div><br>_________________________________________________________________________<br>

Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><b>Andrew Cassidy BSc (Hons) MBCS SSCA</b><div>Managing Director<div><div><img src="http://c1170247.r47.cf3.rackcdn.com/emailsig.png"><br></div><div><br><div>
<b style="color:rgb(51,135,171);text-decoration:none;font-family:sans-serif"><a href="mailto:info@cassidywebservices.co.uk" style="color:rgb(51,135,171);text-decoration:none;font-family:sans-serif" target="_blank">T</a> </b>03300 100 960 
<b style="color:rgb(51,135,171);text-decoration:none;font-family:sans-serif"><a href="mailto:info@cassidywebservices.co.uk" style="color:rgb(51,135,171);text-decoration:none;font-family:sans-serif" target="_blank">F</a> </b>03300 100 961</div>
<div><b style="text-decoration:none;font-family:sans-serif"><a href="mailto:info@cassidywebservices.co.uk" style="color:rgb(51,135,171);text-decoration:none;font-family:sans-serif" target="_blank">E</a> </b><a href="mailto:andrew@cassidywebservices.co.uk" target="_blank">andrew@cassidywebservices.co.uk</a></div>
<div><b style="text-decoration:none;font-family:sans-serif"><a href="mailto:info@cassidywebservices.co.uk" style="color:rgb(51,135,171);text-decoration:none;font-family:sans-serif" target="_blank">W</a> </b><a href="http://www.cassidywebservices.co.uk" target="_blank">www.cassidywebservices.co.uk</a></div>
</div></div></div>
</div>