be used to interconnect a SIP network to other networks, such as the PSTN, which use different protocols or technologies. SIP messages SIP is a text-based protocol with syntax similar to that of HTTP. There are two different types of SIP messages: requests and responses. The first line of a request has a method, defining the nature of the request, and a Request-URI, indicating where the request should be sent. The first line of a response has a response code. Requests Requests initiate a functionality of the protocol. They are sent by a user agent client to the server and are answered with one or more SIP responses, which return a result code of the transaction, and generally indicate the success, failure, or other state of the transaction. Responses Responses are sent by the user agent server indicating the result of a received request. Several classes of responses are recognized, determined by the numerical range of result codes: 1xx: Provisional responses to requests indicate the request was valid and is being processed. 2xx: Successful completion of the request. As a response to an INVITE, it indicates a call is established. The most common code is 200, which is an unqualified success report. 3xx: Call redirection is needed for completion of the request. The request must be completed with a new destination. 4xx: The request cannot be completed at the server for a variety of reasons, including bad request syntax (code 400). 5xx: The server failed to fulfill an apparently valid request, including server internal errors (code 500). 6xx: The request cannot be fulfilled at any server. It indicates a global failure, including call rejection by the destination. Transactions SIP defines a transaction mechanism to control the exchanges between participants and deliver messages reliably. A transaction is a state of a session, which is controlled by various timers. Client transactions send requests and server transactions respond to those requests with one or more responses. The responses may include provisional responses with a response code in the form 1xx, and one or multiple final responses (2xx – 6xx). Transactions are further categorized as either type invite or type non-invite. Invite transactions differ in that they can establish a long-running conversation, referred to as a dialog in SIP, and so include an acknowledgment (ACK) of any non-failing final response, e.g., 200 OK. Instant messaging and presence The Session Initiation Protocol for Instant Messaging