xwell <sip:james.maxwell@kings.cambridge.edu.uk> ;tag=34 Call-ID: 9352812@cavendish.kings.cambridge.edu.uk CSeq: 1 OPTIONS Content-Length: 0 SIP/2.0 200 OK Via: SIP/2.0/UDP cavendish.kings.cambridge.edu.uk;tag=512A6 branch=z9hG4bK0834 ;received=192.0.0.2 To: ksip:user@proxy.carrier.com>;tag=432 From: J.C. Maxwell jip:james.maxwell@kings.cambridge.edu.uk ;tag=34 Call-ID: 19352812@cavendish.kings.cambridge.edu.uk CSeq: 1 OPTIONS Allow: INVITE, OPTIONS, ACK, BYE, CANCEL, REFER Accept-Language: en, de, fr Content-Length: Content-Type: application/sdp The mandatory headers in an OPTIONS request is the same as Table 4.3. 4.1.7 REFER The REFER method [2] is used by a user agent to request another user agent to access a URI or URL resource. The resource is identified by a URI or URL in the required Refer-To - header field (see Section 6.2.16). Note that the URI or URL can be any type of URI: sip, sips, http, pres and SO forth. When the URI is a sip or sips URI, the REFER is probably being used to implement a call transfer service. REFER can also used to implement peer-to- peer call control. A REFER request can be sent either inside or outside an existing dialog. A typical call flow is shown in Figure 4.5. In this example, a UAC sends a REFER to a UAS. The UAS, after performing whatever authentication and authoriza- tion, decides to accept the REFER and responds with a 202 Accepted response. Note that this response is sent immediately without waiting for the triggered request to complete. This is important because REFER uses the non-INVITE method state machine, which requires an immediate final response, unlike an INVITE which may take several seconds (or even minutes) to complete. Since the Refer-To URI in this example is a sip URI, the UAC sends an INVITE setting the Request-URI to the Refer-To URI. This SIP Request Messages Turing Rejewski Scherbius-Ritter REFER 202 Accepted INVITE NOTIFY 180 Ringing 200 OK 200 OK NOTIFY 200 OK Figure 4.5 REFER example call flow. INVITE is successful since it receives a 200 OK response