There are several request methods in SIP and new methods are created
all the time (PRACK
, for example) by the IETF. IETF RFC 2543 (basic
SIP) defines:
INVITE
- Indicates that a user or service
is being invited to participate in a call session.
ACK
- (Acknowledge) Confirms that the
client has received a final response to an INVITE request.
BYE
- Terminates a call and can be sent
by either the caller or the callee.
CANCEL
- Cancels any pending searches
but does not terminate a call that has already been accepted.
OPTIONS
- Queries the capabilities of
servers.
REGISTER
- Registers the address listed
in the To header field with a SIP server. Gateways do not support the REGISTER
method.
In this tutorial, the SIP methods INVITE, ACK, CANCEL
,
and BYE
are used. In addition, the PRACK
method
will also be used. The PRACK
request plays the same role
as ACK
, but is for provisional responses. PRACK
is
a normal SIP message, however, like BYE
and has it's
own response unlike ACK
. For more information about the PRACK
method,
visit the relevant RFC
3262.
There are other standard request methods besides the ones mentioned above. These are not used in the tutorial described in this developer's guide, but are listed below (with links to individual descriptions) for your convenience.
REFER
- For more information about this
request method, see the RFC
3515 specification.
PUBLISH
- For more information about
this request method, see the RFC
3903 specification.
SUBSCRIBE
- For more information about
this request method, see the RFC
3265 specification.
NOTIFY
- For more information about
this request method, see the RFC
3515 specification.
MESSAGE
- For more information about
this request method, see the RFC
3428 specification.
It is also possible to send non-standard methods, but those are out of the scope of this developer's guide.
Response types are listed below, notice that they are similar to those of HTTP:
1xx: Provisional - request received, continuing to process the request
2xx: Success - the action was successfully received, understood, and accepted
3xx: Redirection -- further action needs to be taken in order to complete the request
4xx: Client Error -- the request contains bad syntax or cannot be fulfilled at this server
5xx: Server Error -- the server failed to fulfill an apparently valid request
6xx: Global Failure -- the request cannot be fulfilled at any server
In the part of this specification that describes the MIDlets, you will primarily encounter the 1xx and 2xx series of replies, most notably the 180 (Ringing) and 200 (Ok). The SIP responses are described in RFC 3261.
This flowchart demonstrates a standard type of SIP media session, where
the contact is made through proxy servers using the INVITE
SIP
method. The use of BYE terminates the contact.
This is another example, demonstrating the use of the SIP method CANCEL
,
which is used here to cancel a call after the Caller decides to wait for an
answer no longer.