2.0/TCP dist.probablilty.org 5060 ;branch=z9hG4bK4526245;received=24.32.1 To: P. L. Chebychev ksip:chebychev@academy.ru>;tag=mc3bg5q77wms From: M. Poisson <sip:s.possion@dist.probability.org>;tag=14083 Call-ID: lk34452k592520 CSeq: 2321 MESSAGE Content-Length: 0 Other presence packages define other sets of information that can be requested by watchers from presence servers. 2.5 Message Transport As discussed in Chapter 1, SIP is a layer four, or application layer, protocol in the Internet Multimedia Protocol stack shown in Figure 1.1. RFC 3261 defines the use of TCP, UDP, or TLS transport. An extension document describes how SCTP can be used. How a SIP message is transported using these four protocols will be described in the following sections. The compression of SIP for transport over low bandwidth connections, such as wireless, is discussed in Chapter 9. 2.5.1 UDP Transport When using UDP, each SIP request or response message is carried in a single UDP datagram or packet. For a particularly large message body, there is a com- pact form of SIP that saves space in representing some header fields with a single Introduction to SIP character. This is discussed in Chapter 6. Figure 2.5 shows a SIP BYE request exchange during an established SIP session using UDP. The source port is chosen from a pool of available port numbers (above 49172), or sometimes the default SIP port of 5060 is used. The lack of hand- shaking or acknowledgment in UDP transport means that a datagram could be lost and a SIP message along with it. The checksum, however, enables UDP to discard errored datagrams, allowing SIP to assume that a received message is complete and error-free. The reliability mechanisms built into SIP to handle message retransmissions are described in Section 3.5. The reply is also sent to port 5060, or the port number listed in the top Via header field. UDP provides the simplest transport for user agents and servers and allows them to operate without transport layer state. However, UDP offers no conges- tion control. A s