JSIP API v1.2
November 2006

javax.sip.message
Interface Response

All Superinterfaces:
java.lang.Cloneable, Message, java.io.Serializable

public interface Response
extends Message

A Response message is sent by a recipient of Request once it has received and interpreted the Request. Responses are contain a Status-Code and a Reason-Phrase, as well as Headers and a possible message body.

The Status-Code is a 3-digit integer result code that indicates the outcome of the attempt to understand and satisfy the Request. The Reason-Phrase is intended to give a short textual description of the Status-Code. The Status-Code is intended for use by automata, whereas the Reason-Phrase is intended for the human user. The client is not required to examine or display the Reason-Phrase.

RFC3261 defines status codes in the following classes:

SIP status codes are extensible. The response codes are consistent with, and extend, HTTP/1.1 response codes. Not all HTTP/1.1 response codes are appropriate, and only those that are appropriate are given here. Other HTTP/1.1 response codes SHOULD NOT be used. Also, SIP defines a new class, 6xx.

SIP applications are not required to understand the meaning of all registered response codes, though such understanding is obviously desirable. However, applications must understand the class of any status code, as indicated by the first digit and outlined above. Applications treat any unrecognized status code as being equivalent to the x00 status code of that class, with the exception that an unrecognized status code must not be cached. For example, if a client receives an unrecognized status code of 431, it can safely assume that there was something wrong with its request and treat the Response as if it had received a BAD_REQUEST(400) status code. In such cases, user agents should present to the user the message body returned with the Response, since that message body is likely to include human-readable information which will explain the unusual status.

This specification supports the response codes defined in RFC3261 and also the response code extensions for the event notification framework and PUBLISH, documented in RFC3265 and RFC3909, these are highlighted in italic. Class status codes (x00, i.e. 100) are are highlighted in bold.

Class Code
PROVISIONAL (1xx)
  • TRYING - 100
  • RINGING - 180
  • CALL_IS_BEING_FORWARDED - 181
  • QUEUED - 182
  • SESSION_PROGRESS - 183
  • SUCCESS (2xx)
  • OK - 200
  • ACCEPTED - 202 (Extension RFC3265)
  • REDIRECTION (3xx)
  • MULTIPLE_CHOICES - 300
  • MOVED_PERMANENTLY - 301
  • MOVED_TEMPORARILY - 302
  • USE_PROXY - 305
  • ALTERNATIVE_SERVICE - 380
  • CLIENT_ERROR (4xx)
  • BAD_REQUEST - 400
  • UNAUTHORIZED - 401
  • PAYMENT_REQUIRED - 402
  • FORBIDDEN - 403
  • NOT_FOUND - 404
  • METHOD_NOT_ALLOWED - 405
  • NOT_ACCEPTABLE - 406
  • PROXY_AUTHENTICATION_REQUIRED - 407
  • REQUEST_TIMEOUT - 408
  • GONE - 410
  • CONDITIONAL_REQUEST_FAILED - 412 (Extension RFC3909)
  • REQUEST_ENTITY_TOO_LARGE - 413
  • REQUEST_URI_TOO_LONG - 414
  • UNSUPPORTED_MEDIA_TYPE - 415
  • UNSUPPORTED_URI_SCHEME - 416
  • BAD_EXTENSION - 420
  • EXTENSION_REQUIRED - 421
  • INTERVAL_TOO_BRIEF - 423
  • TEMPORARILY_UNAVAILABLE - 480
  • CALL_OR_TRANSACTION_DOES_NOT_EXIST - 481
  • LOOP_DETECTED - 482
  • TOO_MANY_HOPS - 483
  • ADDRESS_INCOMPLETE - 484
  • AMBIGUOUS - 485
  • BUSY_HERE - 486
  • REQUEST_TERMINATED - 487
  • NOT_ACCEPTABLE_HERE - 488
  • BAD EVENT - 489 (Extension RFC3265)
  • REQUEST_PENDING - 491
  • UNDECIPHERABLE - 493
  • SERVER_ERROR (5xx)
  • SERVER_INTERNAL_ERROR - 500
  • NOT_IMPLEMENTED - 501
  • BAD_GATEWAY - 502
  • SERVICE_UNAVAILABLE - 503
  • SERVER_TIMEOUT - 504
  • VERSION_NOT_SUPPORTED - 505
  • MESSAGE_TOO_LARGE - 513
  • GLOBAL_ERROR (6xx)
  • BUSY_EVERYWHERE - 600
  • DECLINE - 603
  • DOES_NOT_EXIST_ANYWHERE - 604
  • SESSION_NOT_ACCEPTABLE - 606
  • Author:
    BEA Systems, NIST

    Field Summary
    static int ACCEPTED
              The Acceptable extension response code signifies that the request has been accepted for processing, but the processing has not been completed.
    static int ADDRESS_INCOMPLETE
              The server received a request with a Request-URI that was incomplete.
    static int ALTERNATIVE_SERVICE
              The call was not successful, but alternative services are possible.
    static int AMBIGUOUS
              The Request-URI was ambiguous.
    static int BAD_EVENT
              The Bad Event extension response code is used to indicate that the server did not understand the event package specified in a "Event" header field.
    static int BAD_EXTENSION
              The server did not understand the protocol extension specified in a Proxy-Require or Require header field.
    static int BAD_GATEWAY
              The server, while acting as a gateway or proxy, received an invalid response from the downstream server it accessed in attempting to fulfill the request.
    static int BAD_REQUEST
              The request could not be understood due to malformed syntax.
    static int BUSY_EVERYWHERE
              The callee's end system was contacted successfully but the callee is busy and does not wish to take the call at this time.
    static int BUSY_HERE
              The callee's end system was contacted successfully, but the callee is currently not willing or able to take additional calls at this end system.
    static int CALL_IS_BEING_FORWARDED
              A server MAY use this status code to indicate that the call is being forwarded to a different set of destinations.
    static int CALL_OR_TRANSACTION_DOES_NOT_EXIST
              This status indicates that the UAS received a request that does not match any existing dialog or transaction.
    static int CONDITIONAL_REQUEST_FAILED
              The server is refusing to service the PUBLISH request because the entity-tag in the SIP-If-Match header does not match with existing event state.
    static int DECLINE
              The callee's machine was successfully contacted but the user explicitly does not wish to or cannot participate.
    static int DOES_NOT_EXIST_ANYWHERE
              The server has authoritative information that the user indicated in the Request-URI does not exist anywhere.
    static int EXTENSION_REQUIRED
              The UAS needs a particular extension to process the request, but this extension is not listed in a Supported header field in the request.
    static int FORBIDDEN
              The server understood the request, but is refusing to fulfill it.
    static int GONE
              The requested resource is no longer available at the server and no forwarding address is known.
    static int INTERVAL_TOO_BRIEF
              The server is rejecting the request because the expiration time of the resource refreshed by the request is too short.
    static int LOOP_DETECTED
              The server has detected a loop.
    static int MESSAGE_TOO_LARGE
              The server was unable to process the request since the message length exceeded its capabilities.
    static int METHOD_NOT_ALLOWED
              The method specified in the Request-Line is understood, but not allowed for the address identified by the Request-URI.
    static int MOVED_PERMANENTLY
              The user can no longer be found at the address in the Request-URI, and the requesting client SHOULD retry at the new address given by the Contact header field.
    static int MOVED_TEMPORARILY
              The requesting client SHOULD retry the request at the new address(es) given by the Contact header field.
    static int MULTIPLE_CHOICES
              The address in the request resolved to several choices, each with its own specific location, and the user (or UA) can select a preferred communication end point and redirect its request to that location.
    static int NOT_ACCEPTABLE
              The resource identified by the request is only capable of generating response entities that have content characteristics not acceptable according to the Accept header field sent in the request.
    static int NOT_ACCEPTABLE_HERE
              The response has the same meaning as 606 (Not Acceptable), but only applies to the specific resource addressed by the Request-URI and the request may succeed elsewhere.
    static int NOT_FOUND
              The server has definitive information that the user does not exist at the domain specified in the Request-URI.
    static int NOT_IMPLEMENTED
              The server does not support the functionality required to fulfill the request.
    static int OK
              The request has succeeded.
    static int PAYMENT_REQUIRED
              Reserved for future use.
    static int PROXY_AUTHENTICATION_REQUIRED
              This code is similar to 401 (Unauthorized), but indicates that the client MUST first authenticate itself with the proxy.
    static int QUEUED
              The called party is temporarily unavailable, but the server has decided to queue the call rather than reject it.
    static int REQUEST_ENTITY_TOO_LARGE
              The server is refusing to process a request because the request entity-body is larger than the server is willing or able to process.
    static int REQUEST_PENDING
              The request was received by a UAS that had a pending request within the same dialog.
    static int REQUEST_TERMINATED
              The request was terminated by a BYE or CANCEL request.
    static int REQUEST_TIMEOUT
              The server could not produce a response within a suitable amount of time, for example, if it could not determine the location of the user in time.
    static int REQUEST_URI_TOO_LONG
              The server is refusing to service the request because the Request-URI is longer than the server is willing to interpret.
    static int RINGING
              The User Agent receiving the INVITE is trying to alert the user.
    static int SERVER_INTERNAL_ERROR
              The server encountered an unexpected condition that prevented it from fulfilling the request.
    static int SERVER_TIMEOUT
              The server did not receive a timely response from an external server it accessed in attempting to process the request. 408 (Request Timeout) should be used instead if there was no response within the period specified in the Expires header field from the upstream server.
    static int SERVICE_UNAVAILABLE
              The server is temporarily unable to process the request due to a temporary overloading or maintenance of the server.
    static int SESSION_NOT_ACCEPTABLE
              The user's agent was contacted successfully but some aspects of the session description such as the requested media, bandwidth, or addressing style were not acceptable.
    static int SESSION_PROGRESS
              The 183 (Session Progress) response is used to convey information about the progress of the call that is not otherwise classified.
    static int TEMPORARILY_UNAVAILABLE
              The callee's end system was contacted successfully but the callee is currently unavailable (for example, is not logged in, logged in but in a state that precludes communication with the callee, or has activated the "do not disturb" feature).
    static int TOO_MANY_HOPS
              The server received a request that contains a Max-Forwards header field with the value zero.
    static int TRYING
              This response indicates that the request has been received by the next-hop server and that some unspecified action is being taken on behalf of this call (for example, a database is being consulted).
    static int UNAUTHORIZED
              The request requires user authentication.
    static int UNDECIPHERABLE
              The request was received by a UAS that contained an encrypted MIME body for which the recipient does not possess or will not provide an appropriate decryption key.
    static int UNSUPPORTED_MEDIA_TYPE
              The server is refusing to service the request because the message body of the request is in a format not supported by the server for the requested method.
    static int UNSUPPORTED_URI_SCHEME
              The server cannot process the request because the scheme of the URI in the Request-URI is unknown to the server.
    static int USE_PROXY
              The requested resource MUST be accessed through the proxy given by the Contact field.
    static int VERSION_NOT_SUPPORTED
              The server does not support, or refuses to support, the SIP protocol version that was used in the request.
     
    Method Summary
     java.lang.String getReasonPhrase()
              Gets the reason phrase of this Response message.
     int getStatusCode()
              Gets the integer value of the status code of Response, which identifies the outcome of the request to which this response is related.
     void setReasonPhrase(java.lang.String reasonPhrase)
              Sets reason phrase of Response.
     void setStatusCode(int statusCode)
              Sets the status-code of Response.
     
    Methods inherited from interface javax.sip.message.Message
    addFirst, addHeader, addLast, clone, equals, getContent, getContentDisposition, getContentEncoding, getContentLanguage, getContentLength, getExpires, getHeader, getHeaderNames, getHeaders, getRawContent, getSIPVersion, getUnrecognizedHeaders, hashCode, removeContent, removeFirst, removeHeader, removeLast, setContent, setContentDisposition, setContentEncoding, setContentLanguage, setContentLength, setExpires, setHeader, setSIPVersion, toString
     

    Field Detail

    TRYING

    static final int TRYING
    This response indicates that the request has been received by the next-hop server and that some unspecified action is being taken on behalf of this call (for example, a database is being consulted). This response, like all other provisional responses, stops retransmissions of an INVITE by a UAC. The 100 (Trying) response is different from other provisional responses, in that it is never forwarded upstream by a stateful proxy.

    See Also:
    Constant Field Values

    RINGING

    static final int RINGING
    The User Agent receiving the INVITE is trying to alert the user. This response MAY be used to initiate local ringback.

    See Also:
    Constant Field Values

    CALL_IS_BEING_FORWARDED

    static final int CALL_IS_BEING_FORWARDED
    A server MAY use this status code to indicate that the call is being forwarded to a different set of destinations.

    See Also:
    Constant Field Values

    QUEUED

    static final int QUEUED
    The called party is temporarily unavailable, but the server has decided to queue the call rather than reject it. When the callee becomes available, it will return the appropriate final status response. The reason phrase MAY give further details about the status of the call, for example, "5 calls queued; expected waiting time is 15 minutes". The server MAY issue several 182 (Queued) responses to update the caller about the status of the queued call.

    See Also:
    Constant Field Values

    SESSION_PROGRESS

    static final int SESSION_PROGRESS
    The 183 (Session Progress) response is used to convey information about the progress of the call that is not otherwise classified. The Reason-Phrase, header fields, or message body MAY be used to convey more details about the call progress.

    See Also:
    Constant Field Values

    OK

    static final int OK
    The request has succeeded. The information returned with the response depends on the method used in the request.

    See Also:
    Constant Field Values

    ACCEPTED

    static final int ACCEPTED
    The Acceptable extension response code signifies that the request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place. There is no facility for re-sending a status code from an asynchronous operation such as this. The 202 response is intentionally non-committal. Its purpose is to allow a server to accept a request for some other process (perhaps a batch-oriented process that is only run once per day) without requiring that the user agent's connection to the server persist until the process is completed. The entity returned with this response SHOULD include an indication of the request's current status and either a pointer to a status monitor or some estimate of when the user can expect the request to be fulfilled. This response code is specific to the event notification framework.

    See Also:
    Constant Field Values

    MULTIPLE_CHOICES

    static final int MULTIPLE_CHOICES
    The address in the request resolved to several choices, each with its own specific location, and the user (or UA) can select a preferred communication end point and redirect its request to that location.

    The response MAY include a message body containing a list of resource characteristics and location(s) from which the user or UA can choose the one most appropriate, if allowed by the Accept request header field. However, no MIME types have been defined for this message body.

    The choices SHOULD also be listed as Contact fields. Unlike HTTP, the SIP response MAY contain several Contact fields or a list of addresses in a Contact field. User Agents MAY use the Contact header field value for automatic redirection or MAY ask the user to confirm a choice. However, this specification does not define any standard for such automatic selection.

    This status response is appropriate if the callee can be reached at several different locations and the server cannot or prefers not to proxy the request.

    See Also:
    Constant Field Values

    MOVED_PERMANENTLY

    static final int MOVED_PERMANENTLY
    The user can no longer be found at the address in the Request-URI, and the requesting client SHOULD retry at the new address given by the Contact header field. The requestor SHOULD update any local directories, address books, and user location caches with this new value and redirect future requests to the address(es) listed.

    See Also:
    Constant Field Values

    MOVED_TEMPORARILY

    static final int MOVED_TEMPORARILY
    The requesting client SHOULD retry the request at the new address(es) given by the Contact header field. The Request-URI of the new request uses the value of the Contact header field in the response.

    The duration of the validity of the Contact URI can be indicated through an Expires header field or an expires parameter in the Contact header field. Both proxies and User Agents MAY cache this URI for the duration of the expiration time. If there is no explicit expiration time, the address is only valid once for recursing, and MUST NOT be cached for future transactions.

    If the URI cached from the Contact header field fails, the Request-URI from the redirected request MAY be tried again a single time. The temporary URI may have become out-of-date sooner than the expiration time, and a new temporary URI may be available.

    See Also:
    Constant Field Values

    USE_PROXY

    static final int USE_PROXY
    The requested resource MUST be accessed through the proxy given by the Contact field. The Contact field gives the URI of the proxy. The recipient is expected to repeat this single request via the proxy. 305 (Use Proxy) responses MUST only be generated by UASs.

    See Also:
    Constant Field Values

    ALTERNATIVE_SERVICE

    static final int ALTERNATIVE_SERVICE
    The call was not successful, but alternative services are possible. The alternative services are described in the message body of the response. Formats for such bodies are not defined here, and may be the subject of future standardization.

    See Also:
    Constant Field Values

    BAD_REQUEST

    static final int BAD_REQUEST
    The request could not be understood due to malformed syntax. The Reason-Phrase SHOULD identify the syntax problem in more detail, for example, "Missing Call-ID header field".

    See Also:
    Constant Field Values

    UNAUTHORIZED

    static final int UNAUTHORIZED
    The request requires user authentication. This response is issued by UASs and registrars, while 407 (Proxy Authentication Required) is used by proxy servers.

    See Also:
    Constant Field Values

    PAYMENT_REQUIRED

    static final int PAYMENT_REQUIRED
    Reserved for future use.

    See Also:
    Constant Field Values

    FORBIDDEN

    static final int FORBIDDEN
    The server understood the request, but is refusing to fulfill it. Authorization will not help, and the request SHOULD NOT be repeated.

    See Also:
    Constant Field Values

    NOT_FOUND

    static final int NOT_FOUND
    The server has definitive information that the user does not exist at the domain specified in the Request-URI. This status is also returned if the domain in the Request-URI does not match any of the domains handled by the recipient of the request.

    See Also:
    Constant Field Values

    METHOD_NOT_ALLOWED

    static final int METHOD_NOT_ALLOWED
    The method specified in the Request-Line is understood, but not allowed for the address identified by the Request-URI. The response MUST include an Allow header field containing a list of valid methods for the indicated address

    See Also:
    Constant Field Values

    NOT_ACCEPTABLE

    static final int NOT_ACCEPTABLE
    The resource identified by the request is only capable of generating response entities that have content characteristics not acceptable according to the Accept header field sent in the request.

    See Also:
    Constant Field Values

    PROXY_AUTHENTICATION_REQUIRED

    static final int PROXY_AUTHENTICATION_REQUIRED
    This code is similar to 401 (Unauthorized), but indicates that the client MUST first authenticate itself with the proxy. This status code can be used for applications where access to the communication channel (for example, a telephony gateway) rather than the callee requires authentication.

    See Also:
    Constant Field Values

    REQUEST_TIMEOUT

    static final int REQUEST_TIMEOUT
    The server could not produce a response within a suitable amount of time, for example, if it could not determine the location of the user in time. The client MAY repeat the request without modifications at any later time.

    See Also:
    Constant Field Values

    GONE

    static final int GONE
    The requested resource is no longer available at the server and no forwarding address is known. This condition is expected to be considered permanent. If the server does not know, or has no facility to determine, whether or not the condition is permanent, the status code 404 (Not Found) SHOULD be used instead.

    See Also:
    Constant Field Values

    CONDITIONAL_REQUEST_FAILED

    static final int CONDITIONAL_REQUEST_FAILED
    The server is refusing to service the PUBLISH request because the entity-tag in the SIP-If-Match header does not match with existing event state.

    Since:
    v1.2
    See Also:
    Constant Field Values

    REQUEST_ENTITY_TOO_LARGE

    static final int REQUEST_ENTITY_TOO_LARGE
    The server is refusing to process a request because the request entity-body is larger than the server is willing or able to process. The server MAY close the connection to prevent the client from continuing the request. If the condition is temporary, the server SHOULD include a Retry-After header field to indicate that it is temporary and after what time the client MAY try again.

    See Also:
    Constant Field Values

    REQUEST_URI_TOO_LONG

    static final int REQUEST_URI_TOO_LONG
    The server is refusing to service the request because the Request-URI is longer than the server is willing to interpret.

    See Also:
    Constant Field Values

    UNSUPPORTED_MEDIA_TYPE

    static final int UNSUPPORTED_MEDIA_TYPE
    The server is refusing to service the request because the message body of the request is in a format not supported by the server for the requested method. The server MUST return a list of acceptable formats using the Accept, Accept-Encoding, or Accept-Language header field, depending on the specific problem with the content.

    See Also:
    Constant Field Values

    UNSUPPORTED_URI_SCHEME

    static final int UNSUPPORTED_URI_SCHEME
    The server cannot process the request because the scheme of the URI in the Request-URI is unknown to the server.

    See Also:
    Constant Field Values

    BAD_EXTENSION

    static final int BAD_EXTENSION
    The server did not understand the protocol extension specified in a Proxy-Require or Require header field. The server MUST include a list of the unsupported extensions in an Unsupported header field in the response.

    See Also:
    Constant Field Values

    EXTENSION_REQUIRED

    static final int EXTENSION_REQUIRED
    The UAS needs a particular extension to process the request, but this extension is not listed in a Supported header field in the request. Responses with this status code MUST contain a Require header field listing the required extensions.

    A UAS SHOULD NOT use this response unless it truly cannot provide any useful service to the client. Instead, if a desirable extension is not listed in the Supported header field, servers SHOULD process the request using baseline SIP capabilities and any extensions supported by the client.

    See Also:
    Constant Field Values

    INTERVAL_TOO_BRIEF

    static final int INTERVAL_TOO_BRIEF
    The server is rejecting the request because the expiration time of the resource refreshed by the request is too short. This response can be used by a registrar to reject a registration whose Contact header field expiration time was too small.

    See Also:
    Constant Field Values

    TEMPORARILY_UNAVAILABLE

    static final int TEMPORARILY_UNAVAILABLE
    The callee's end system was contacted successfully but the callee is currently unavailable (for example, is not logged in, logged in but in a state that precludes communication with the callee, or has activated the "do not disturb" feature). The response MAY indicate a better time to call in the Retry-After header field. The user could also be available elsewhere (unbeknownst to this server). The reason phrase SHOULD indicate a more precise cause as to why the callee is unavailable. This value SHOULD be settable by the UA. Status 486 (Busy Here) MAY be used to more precisely indicate a particular reason for the call failure.

    This status is also returned by a redirect or proxy server that recognizes the user identified by the Request-URI, but does not currently have a valid forwarding location for that user.

    See Also:
    Constant Field Values

    CALL_OR_TRANSACTION_DOES_NOT_EXIST

    static final int CALL_OR_TRANSACTION_DOES_NOT_EXIST
    This status indicates that the UAS received a request that does not match any existing dialog or transaction.

    See Also:
    Constant Field Values

    LOOP_DETECTED

    static final int LOOP_DETECTED
    The server has detected a loop.

    See Also:
    Constant Field Values

    TOO_MANY_HOPS

    static final int TOO_MANY_HOPS
    The server received a request that contains a Max-Forwards header field with the value zero.

    See Also:
    Constant Field Values

    ADDRESS_INCOMPLETE

    static final int ADDRESS_INCOMPLETE
    The server received a request with a Request-URI that was incomplete. Additional information SHOULD be provided in the reason phrase. This status code allows overlapped dialing. With overlapped dialing, the client does not know the length of the dialing string. It sends strings of increasing lengths, prompting the user for more input, until it no longer receives a 484 (Address Incomplete) status response.

    See Also:
    Constant Field Values

    AMBIGUOUS

    static final int AMBIGUOUS
    The Request-URI was ambiguous. The response MAY contain a listing of possible unambiguous addresses in Contact header fields. Revealing alternatives can infringe on privacy of the user or the organization. It MUST be possible to configure a server to respond with status 404 (Not Found) or to suppress the listing of possible choices for ambiguous Request-URIs. Some email and voice mail systems provide this functionality. A status code separate from 3xx is used since the semantics are different: for 300, it is assumed that the same person or service will be reached by the choices provided. While an automated choice or sequential search makes sense for a 3xx response, user intervention is required for a 485 (Ambiguous) response.

    See Also:
    Constant Field Values

    BUSY_HERE

    static final int BUSY_HERE
    The callee's end system was contacted successfully, but the callee is currently not willing or able to take additional calls at this end system. The response MAY indicate a better time to call in the Retry-After header field. The user could also be available elsewhere, such as through a voice mail service. Status 600 (Busy Everywhere) SHOULD be used if the client knows that no other end system will be able to accept this call.

    See Also:
    Constant Field Values

    REQUEST_TERMINATED

    static final int REQUEST_TERMINATED
    The request was terminated by a BYE or CANCEL request. This response is never returned for a CANCEL request itself.

    See Also:
    Constant Field Values

    NOT_ACCEPTABLE_HERE

    static final int NOT_ACCEPTABLE_HERE
    The response has the same meaning as 606 (Not Acceptable), but only applies to the specific resource addressed by the Request-URI and the request may succeed elsewhere. A message body containing a description of media capabilities MAY be present in the response, which is formatted according to the Accept header field in the INVITE (or application/sdp if not present), the same as a message body in a 200 (OK) response to an OPTIONS request.

    See Also:
    Constant Field Values

    BAD_EVENT

    static final int BAD_EVENT
    The Bad Event extension response code is used to indicate that the server did not understand the event package specified in a "Event" header field. This response code is specific to the event notification framework.

    See Also:
    Constant Field Values

    REQUEST_PENDING

    static final int REQUEST_PENDING
    The request was received by a UAS that had a pending request within the same dialog.

    See Also:
    Constant Field Values

    UNDECIPHERABLE

    static final int UNDECIPHERABLE
    The request was received by a UAS that contained an encrypted MIME body for which the recipient does not possess or will not provide an appropriate decryption key. This response MAY have a single body containing an appropriate public key that should be used to encrypt MIME bodies sent to this UA.

    See Also:
    Constant Field Values

    SERVER_INTERNAL_ERROR

    static final int SERVER_INTERNAL_ERROR
    The server encountered an unexpected condition that prevented it from fulfilling the request. The client MAY display the specific error condition and MAY retry the request after several seconds. If the condition is temporary, the server MAY indicate when the client may retry the request using the Retry-After header field.

    See Also:
    Constant Field Values

    NOT_IMPLEMENTED

    static final int NOT_IMPLEMENTED
    The server does not support the functionality required to fulfill the request. This is the appropriate response when a UAS does not recognize the request method and is not capable of supporting it for any user. Proxies forward all requests regardless of method. Note that a 405 (Method Not Allowed) is sent when the server recognizes the request method, but that method is not allowed or supported.

    See Also:
    Constant Field Values

    BAD_GATEWAY

    static final int BAD_GATEWAY
    The server, while acting as a gateway or proxy, received an invalid response from the downstream server it accessed in attempting to fulfill the request.

    See Also:
    Constant Field Values

    SERVICE_UNAVAILABLE

    static final int SERVICE_UNAVAILABLE
    The server is temporarily unable to process the request due to a temporary overloading or maintenance of the server. The server MAY indicate when the client should retry the request in a Retry-After header field. If no Retry-After is given, the client MUST act as if it had received a 500 (Server Internal Error) response.

    A client (proxy or UAC) receiving a 503 (Service Unavailable) SHOULD attempt to forward the request to an alternate server. It SHOULD NOT forward any other requests to that server for the duration specified in the Retry-After header field, if present.

    Servers MAY refuse the connection or drop the request instead of responding with 503 (Service Unavailable).

    See Also:
    Constant Field Values

    SERVER_TIMEOUT

    static final int SERVER_TIMEOUT
    The server did not receive a timely response from an external server it accessed in attempting to process the request. 408 (Request Timeout) should be used instead if there was no response within the period specified in the Expires header field from the upstream server.

    See Also:
    Constant Field Values

    VERSION_NOT_SUPPORTED

    static final int VERSION_NOT_SUPPORTED
    The server does not support, or refuses to support, the SIP protocol version that was used in the request. The server is indicating that it is unable or unwilling to complete the request using the same major version as the client, other than with this error message.

    See Also:
    Constant Field Values

    MESSAGE_TOO_LARGE

    static final int MESSAGE_TOO_LARGE
    The server was unable to process the request since the message length exceeded its capabilities.

    See Also:
    Constant Field Values

    BUSY_EVERYWHERE

    static final int BUSY_EVERYWHERE
    The callee's end system was contacted successfully but the callee is busy and does not wish to take the call at this time. The response MAY indicate a better time to call in the Retry-After header field. If the callee does not wish to reveal the reason for declining the call, the callee uses status code 603 (Decline) instead. This status response is returned only if the client knows that no other end point (such as a voice mail system) will answer the request. Otherwise, 486 (Busy Here) should be returned.

    See Also:
    Constant Field Values

    DECLINE

    static final int DECLINE
    The callee's machine was successfully contacted but the user explicitly does not wish to or cannot participate. The response MAY indicate a better time to call in the Retry-After header field. This status response is returned only if the client knows that no other end point will answer the request.

    See Also:
    Constant Field Values

    DOES_NOT_EXIST_ANYWHERE

    static final int DOES_NOT_EXIST_ANYWHERE
    The server has authoritative information that the user indicated in the Request-URI does not exist anywhere.

    See Also:
    Constant Field Values

    SESSION_NOT_ACCEPTABLE

    static final int SESSION_NOT_ACCEPTABLE
    The user's agent was contacted successfully but some aspects of the session description such as the requested media, bandwidth, or addressing style were not acceptable. A 606 (Not Acceptable) response means that the user wishes to communicate, but cannot adequately support the session described. The 606 (Not Acceptable) response MAY contain a list of reasons in a Warning header field describing why the session described cannot be supported.

    A message body containing a description of media capabilities MAY be present in the response, which is formatted according to the Accept header field in the INVITE (or application/sdp if not present), the same as a message body in a 200 (OK) response to an OPTIONS request.

    It is hoped that negotiation will not frequently be needed, and when a new user is being invited to join an already existing conference, negotiation may not be possible. It is up to the invitation initiator to decide whether or not to act on a 606 (Not Acceptable) response.

    This status response is returned only if the client knows that no other end point will answer the request. This specification renames this status code from NOT_ACCEPTABLE as in RFC3261 to SESSION_NOT_ACCEPTABLE due to it conflict with 406 (Not Acceptable) defined in this interface.

    See Also:
    Constant Field Values
    Method Detail

    setStatusCode

    void setStatusCode(int statusCode)
                       throws java.text.ParseException
    Sets the status-code of Response. The status-code is a 3-digit integer result code that indicates the outcome of an attempt to understand and satisfy a request. The Status-Code is intended for use by automata.

    Parameters:
    statusCode - the new integer value of the status code.
    Throws:
    java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the statusCode value.

    getStatusCode

    int getStatusCode()
    Gets the integer value of the status code of Response, which identifies the outcome of the request to which this response is related.

    Returns:
    the integer status-code of this Response message.

    setReasonPhrase

    void setReasonPhrase(java.lang.String reasonPhrase)
                         throws java.text.ParseException
    Sets reason phrase of Response. The reason-phrase is intended to give a short textual description of the status-code. The reason-phrase is intended for the human user. A client is not required to examine or display the reason-phrase. While RFC3261 suggests specific wording for the reason phrase, implementations MAY choose other text.

    Parameters:
    reasonPhrase - the new string value of the reason phrase.
    Throws:
    java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the reasonPhrase value.

    getReasonPhrase

    java.lang.String getReasonPhrase()
    Gets the reason phrase of this Response message.

    Returns:
    the string value of the reason phrase of this Response message.

    JSIP API v1.2
    November 2006

    If you have any comments, please mail them to JAIN-SIP-INTEREST@java.sun.com after subscribing at http://archives.java.sun.com
    Copyright - 2006 BEA Systems and Sun Microsystems