a three-way handshake between the end points as shown in Figure 1.2. Once the connection is established, the messages are sent in the stream. The Content-Length header field is critical when TCP is used to transport SIP, since it is used to find the end of one message and the start of the next. When TCP or another stream-based transport is used, Content- Length is a required header field in all requests and responses. To send the 302 Moved Temporarily response, the server typi- cally opens a new TCP connection in the reverse direction, using 5060 (or the port listed in the top Via header field) as the destination port. The acknowledgment ACK is sent in the TCP stream used for the INVITE. Because this concludes the SIP session, the connection is then closed. If a TCP connec- tion closes during a dialog, a new one can be opened to send a request within the dialog, such as a BYE request to terminate the media session. As previously mentioned, TCP provides reliable transport and also conges- tion control. It can also transport SIP messages of arbitrary size. The disadvan- tages of TCP include the setup delay in establishing the connection and the need for servers to maintain this connection state at the transport layer. 2.5.3 TLS Transport New to RFC 3261 is support of TLS version 1.0 [8] in the SIP specification. SIP can use TLS over TCP as for encrypted transport with the additional capabilities 2. There is work underway to enable TCP connection reuse [7]. This would allow responses to be sent over the same connection as the request, and also allow multiple transactions and dia- logs to share a TCP connection, for example, between two proxy servers. Introduction to SIP 100.101.102.103 200.201.202.203 Open TCP Connection Source IP: 100.101.102.103 Source port: 41270 Destination IP: 200.201.202.203 Destination port: 5060 INVITE sent in TCP stream 302 Moved sent in TCP stream sent in TCP stream Close TCP Connection Figure 2.6 Transmission of SIP messages using TCP. of authentication. In Section 4.2.1 the secure SIP UR