[SIPForum-discussion] confussion about use of tcp/udp

Dan York dyork at voxeo.com
Mon Jun 9 13:09:14 UTC 2008


I'll confirm Neill's view here.  In typical implementation, a User  
Agent will initiate a SIP connection to other SIP endpoint using  
either TCP or UDP... whichever the sending UA chooses - and whichever  
the receiving endpoint can support.

You certainly *can* restrict your UA to only using SIP over TCP - as  
long as all other endpoints with which you want to connect support SIP  
over TCP.   My experience is that most of the IP-PBXs out there do  
support SIP over either TCP or UDP.  However a lot of the SIP Service  
Providers (a.k.a. SIP trunk providers a.k.a. VoIP Service Providers)  
seem to currently only be supporting SIP over UDP. If you use the  
Asterisk open source IP-PBX, last I knew it also only supported SIP  
over UDP.

So it all depends upon what endpoints you are going to communicate  
with.  If they all support SIP over TCP, you can modify your client  
(assuming you can) to only do SIP over UDP.

As far as media, every SIP implementation I am aware of uses either  
RTP or Secure RTP (SRTP) over *UDP*.  As far as I can recall, I've not  
heard of anyone even considering running media over TCP.  All I can  
remember seeing is UDP.

Regards,
Dan

On Jun 9, 2008, at 3:14 AM, Neill Wilkinsonj wrote:

> RTP (voice) is always carried over UDP. There is one notable  
> exception and I believe Skype can sometimes use TCP to carry voice.  
> TCP generally has some undesirable properties (Head-of-Line blocking  
> and long timers related to connection state), which make it  
> unsuitable for carry realtime traffic such as voice.
>
> SIP signalling can travel over UDP or TCP, generally the UA(C) will  
> choose one or the other at the start of the interaction and the  
> UA(S) will respond using the same for the complete dialogue. That is  
> my observation in Practice.
>
> Someone else on the list more conversant with RFC which to confirm  
> or clarify?
>
>  Neill....;o)
> From: discussion-bounces at sipforum.org [mailto:discussion-bounces at sipforum.org 
> ] On Behalf Of khalikh uddin
> Sent: 09 June 2008 07:18
> To: discussion at sipforum.com
> Cc: kranti kumar
> Subject: [SIPForum-discussion] confussion about use of tcp/udp
>
> hai all
> can anybody tell me
>  *when a sip enabled end device opens a TCP connection and when it  
> uses UDP to send *REQ/RESPONSES to proxy or other UA.
> *can it use both in a  aparticular diloge i.e to send INVITE use TCP  
> and to send ACK use
>   UDP.
> *Can we force it to use TCP/UDP.
> *For media transmission SIP uses only tcp.Is this true.
>
>
>
> _______________________________________________
> This is the SIP Forum discussion mailing list
> TO UNSUBSCRIBE, or edit your delivery options, please visit http://sipforum.org/mailman/listinfo/discussion
> Post to the list at discussion at sipforum.org

-- 
Dan York, CISSP, Director of Emerging Communication Technology
Office of the CTO    Voxeo Corporation     dyork at voxeo.com
Phone: +1-407-455-5859  Skype: danyork  http://www.voxeo.com
Blogs: http://blogs.voxeo.com  http://www.disruptivetelephony.com

Build voice applications based on open standards.
Find out how at http://www.voxeo.com/free





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sipforum.org/pipermail/discussion/attachments/20080609/ba40dceb/attachment-0002.html>


More information about the discussion mailing list