K CANCEL CSeq: 1 CANCEL CSeq: 1 CANCEL 200 OK 200 OK CSeq: 1 INVITE CSeq: 1 CANCEL CSeq: 1 ACK CSeq: 2 BYE 200 OK CSeq: 2 BYE Figure 4.4 Race condition in call cancellation. SIP Request Messages to receive further final responses. No 487 response is sent in this scenario. The session is canceled by the UAC sending an ACK then a BYE in response to the 200 OK. Since it is a hop-by-hop request, a CANCEL may not contain a message body. An example CANCEL request contains: CANCEL sip:i.newton@cambridge.edu.gb SIP/2.0 Via: SIP/2.0/UDR 10. .downing.gb 5060 branch=z9hG4bK3134134 Max-Forwards: 70 To: Isaac Newton <sip:i.newton@cambridge.edu.gb From: Rene Descartes <sip:visitor@10.downing. gb> ; tag=034323 Call-ID: 42@10.downing.gb CSeq: 32156 CANCEL Content-Length: 0 The mandatory header fields in a CANCEL request are shown in Table 4.6. 4.1.6 OPTIONS The OPTIONS method is used to query a user agent or server about its capabili- ties and discover its current availability. The response to the request lists the capabilities of the user agent or server. A proxy never generates an OPTIONS request. A user agent or server responds to the request as it would to an INVITE (i.e., if it is not accepting calls, it would respond with a 4xx or 6xx response). A success class (2xx) response can contain Allow, Accept, Accept-Encoding, Accept-Language, and Supported headers indicating its capabilities. An OPTIONS request may not contain a message body. A proxy deter- mines if an OPTIONS request is for itself by examining the Request-URI. If the Request-URI contains the address of the proxy, the request is for the proxy. Otherwise, the OPTIONS is for another proxy or user agent and the request is forwarded. An example OPTIONS request and response contains: Table 4.6 Mandatory Headers in a CANCEL Request Call-ID Max-Forwards SIP: Understanding the Session Initiation Protocol OPTIONS sip:user@carrier.com SIP/2.0 Via: SIP/2.0/UDP cavendish.kings.cambridge.edu.uk ;branch=z9hG4bK1834 Max-Forwards:70 To: <sip:user@proxy.carrier.com> From: J.C. Ma