Home arrow SIP arrow Canceling a Request in SIP

Language Translator

Hacking Zone

Hacking Tools
Attacking

Configure Windows

Windows Configuration

Mix Tutorials

Asterisk
Website Building

Novels

Mix Novels

Human Personality

Body Language
Canceling a Request in SIP Print E-mail
Article Index
Canceling a Request in SIP
Page 2

Canceling a Request in SIP

 

             

The previous section has discussed general UA behavior for generating
requests and processing responses for requests of all methods. In
this section, we discuss a general purpose method, called CANCEL.

The CANCEL request, as the name implies, is used to cancel a previous
request sent by a client. Specifically, it asks the UAS to cease
processing the request and to generate an error response to that
request. CANCEL has no effect on a request to which a UAS has
already given a final response. Because of this, it is most useful
to CANCEL requests to which it can take a server long time to
respond. For this reason, CANCEL is best for INVITE requests, which
can take a long time to generate a response. In that usage, a UAS
that receives a CANCEL request for an INVITE, but has not yet sent a
final response, would "stop ringing", and then respond to the INVITE
with a specific error response (a 487).

 

CANCEL requests can be constructed and sent by both proxies and user
agent clients. Section 15 discusses under what conditions a UAC
would CANCEL an INVITE request, and Section 16.10 discusses proxy
usage of CANCEL.

A stateful proxy responds to a CANCEL, rather than simply forwarding
a response it would receive from a downstream element. For that
reason, CANCEL is referred to as a "hop-by-hop" request, since it is
responded to at each stateful proxy hop.

9.1 Client Behavior


A CANCEL request SHOULD NOT be sent to cancel a request other than
INVITE.

Since requests other than INVITE are responded to immediately,
sending a CANCEL for a non-INVITE request would always create a
race condition.

The following procedures are used to construct a CANCEL request. The
Request-URI, Call-ID, To, the numeric part of CSeq, and From header
fields in the CANCEL request MUST be identical to those in the
request being cancelled, including tags. A CANCEL constructed by a
client MUST have only a single Via header field value matching the
top Via value in the request being cancelled. Using the same values
for these header fields allows the CANCEL to be matched with the
request it cancels (Section 9.2 indicates how such matching occurs).
However, the method part of the CSeq header field MUST have a value
of CANCEL. This allows it to be identified and processed as a
transaction in its own right (See Section 17).

If the request being cancelled contains a Route header field, the
CANCEL request MUST include that Route header field's values.

This is needed so that stateless proxies are able to route CANCEL
requests properly.

The CANCEL request MUST NOT contain any Require or Proxy-Require
header fields.

Once the CANCEL is constructed, the client SHOULD check whether it
has received any response (provisional or final) for the request
being cancelled (herein referred to as the "original request").

If no provisional response has been received, the CANCEL request MUST
NOT be sent; rather, the client MUST wait for the arrival of a
provisional response before sending the request. If the original
request has generated a final response, the CANCEL SHOULD NOT be
sent, as it is an effective no-op, since CANCEL has no effect on
requests that have already generated a final response. When the
client decides to send the CANCEL, it creates a client transaction
for the CANCEL and passes it the CANCEL request along with the
destination address, port, and transport. The destination address,
port, and transport for the CANCEL MUST be identical to those used to
send the original request.

If it was allowed to send the CANCEL before receiving a response
for the previous request, the server could receive the CANCEL
before the original request.

Note that both the transaction corresponding to the original request
and the CANCEL transaction will complete independently. However, a
UAC canceling a request cannot rely on receiving a 487 (Request
Terminated) response for the original request, as an RFC 2543-
compliant UAS will not generate such a response. If there is no
final response for the original request in 64*T1 seconds (T1 is
defined in Section 17.1.1.1), the client SHOULD then consider the
original transaction cancelled and SHOULD destroy the client
transaction handling the original request.


 
< Prev   Next >
Your Ad Here

RSS socialnet

Add to MyYahoo!
Subscribe in NewsGator Online
Add to Newsburst
Add to Google
Add to My AOL
Add to Pluck
Subscribe in FeedLounge
Add to Windows Live
Add to NetVibes
Subscribe in Rojo
Subscribe in Bloglines
Add to MyMSN
Add to Plusmo for your cellphone
Add to PageFlakes
Add to Technorati
Add to BlinkBits