[asterisk-bugs] [Asterisk 0004903]: [patch] SIP over TCP project
noreply at bugs.digium.com
noreply at bugs.digium.com
Sat Nov 3 09:33:15 CDT 2007
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=4903
======================================================================
Reported By: hjlee
Assigned To: russell
======================================================================
Project: Asterisk
Issue ID: 4903
Category: Channels/chan_sip
Reproducibility: N/A
Severity: feature
Priority: normal
Status: assigned
Asterisk Version: SVN
SVN Branch (only for SVN checkouts, not tarball releases): trunk
SVN Revision (number only!): 46875
Disclaimer on File?: Yes
Request Review:
======================================================================
Date Submitted: 08-05-2005 00:41 CDT
Last Modified: 11-03-2007 09:33 CDT
======================================================================
Summary: [patch] SIP over TCP project
Description:
I added TCP support to asterisk SIP channel. I put all my changes under
#ifdef SIP_TCP_SUPPORT and left the original code. So if you search
SIP_TCP_SUPPORT, you can find my changes very easily.
My changes
-Added TCP listening socket, siptcpsock.
-Added securechannel, sockfd, transport field to struct sip_pvt.
-Added transport, tcpsockfd field to struct sip_peer.
-Added TCP read in sipsock_read().
-Added siptcp_accept() to accept an incoming TCP connection request.
-Added transport, q parameter processing in Contact header parsing.
-Changed the hard-coded "UDP" in Via header to copy sip_pvt.transport.
-Added tcp_conenct() to make a TCP connection for outgoing message.
-Added TCP transmit in __sip_xmit().
-Saved TCP connecton socket to sip_peer.tcpsockfd, copied it to
sip_pvt.sockfd when OPTIONS or INVITE is sent to the peer that is using
TCP.
I tested it mainly xlite(UDP only free version) and Jain-SIP communicator.
call signal is working well. One problem I am having is Jain-SIP
communicator doesn't receive any audio, I don't know why. If any one has
xlite-pro(TCP supported commercial version) or TCP supported SIP clients, I
am looking forward to hear the test result.
Welcome any comment.
Thanks
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
related to 0004904 [patch] SIP over TCP project
related to 0010354 Add Basic Support For RFC 4662 (Subscri...
======================================================================
----------------------------------------------------------------------
rjain - 11-03-07 09:33
----------------------------------------------------------------------
I haven't studied this patch in great detail. However, one thing about
supporting SIP-over-TCP is that it is much more than delineating SIP
messages in a TCP byte stream. There are quite a few issues that one needs
to grapple with.
A some of use wrote an internet-draft in the IETF to provide guidelines to
implementers who wish to develop SIP over connection-oriented transport
protocols such as TCP and SCTP:
http://www.croczilla.com/zap/rfcs/draft-gurbani-sipping-connection-guidelines-01.txt
In general, SIP-over-TCP implementations face some major issues:
1. NAT Traversal: The problem of SIP NAT traversal is much worst w/ TCP
than UDP. Basically, you'll have to always initiate the TCP connection from
the client sitting behind the NAT and keep it always open else the NAT will
block the call from * to user/peer. The I-D below discusses this topic in
plenty detail:
http://www.ietf.org/internet-drafts/draft-ietf-sip-outbound-10.txt
1. The need for persistent-connections becomes really important when you
run SIP/TLS/TCP. The issue is latency introduced in TLS connection
establishments which will add to post-dial latency. So, this becomes a
pretty critical requirement for SIP trunking scenarios. The I-D below
discusses this topic (it proposes using LRU for managing TCP sockets and
also offers a nice optimization that allows you to use one TCP socket for
transactions in opposite directions):
http://www.ietf.org/internet-drafts/draft-ietf-sip-connect-reuse-08.txt
If someone has given any thought to these issues with respect to
SIP-over-TCP support in Asterisk then please share your insight.
Issue History
Date Modified Username Field Change
======================================================================
11-03-07 09:33 rjain Note Added: 0073049
======================================================================
More information about the asterisk-bugs
mailing list