tions Systems, Reading, MA: Addison-Wesley, 2000, Chapter 8. [17] Crocker, D., "Standard for the Format of ARPA Internet Text Messages," RFC 822, 1982. Introduction to SIP Often the best way to learn a protocol is to look at examples of its use. While the terminology, structures, and format of a new protocol can be confusing at first read, an example message flow can give a quick grasp of some of the key con- cepts of a protocol. The example message exchanges in this chapter will intro- duce SIP as defined by RFC 3261 [1]. The first example shows the basic message exchange between two SIP devices to establish and tear down a session. The second example shows the mes- sage exchange when a SIP proxy server is used. The third example shows SIP registration. The fourth example shows a SIP presence and instant message example. The chapter concludes with a discussion of SIP message transmission using UDP, TCP, TLS, and SCTP. The examples will be introduced using call flow diagrams between a called and calling party, along with the details of each message. Each arrow in the fig- ures represents a SIP message, with the arrowhead indicating the direction of transmission. The thick lines in the figures indicate the media stream. In these examples, the media will be assumed to be RTP [2] packets containing audio, but it could be another protocol. Details of RTP are covered in Section 7.2. 2.1 A Simple Session Establishment Example Figure 2.1 shows the SIP message exchange between two SIP-enabled devices. The two devices could be SIP phones, hand-helds, palmtops, or cell phones. It is assumed that both devices are connected to an IP network such as the Internet and know each other's IP address. SIP: Understanding the Session Initiation Protocol Tesla Marconi INVITE 180 Ringing 200 OK Media session 200 OK Figure 2.1 A simple SIP session establishment example. The calling party, Tesla, begins the message exchange by sending a SIP INVITE message to the called party, Marconi. The INVITE contains the details of the type of sessio