Sip Error Codes
Sip Error Codes
Sip Error Codes
Response
After receiving and interpreting a request message, the recipient
responds with a SIP response message. The response message format
is shown below:
5.1. Status-Line
SIP response codes are extensible. 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 response code, as indicated by the first
digit, and treat any unrecognized response as being equivalent to the
x00 response code of that class, with the exception that an
unrecognized response MUST NOT be cached. For example, if a client
receives an unrecognized response 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 400 (Bad Request) response 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.
rules in [H4.2] regarding ordering of header fields apply to SIP, with the
exception of Via fields, see below, whose order matters. Additionally,
header fields which are hop-by-hop MUST appear before any header
fields which are end-to-end. Proxies SHOULD NOT reorder header
fields. Proxies add Via header fields and MAY add other hop- by-hop
header fields. They can modify certain header fields, such as Max-
Forwards (Section 6.23) and "fix up" the Via header fields with
"received" parameters as described in Section 6.40.1. Proxies MUST
NOT alter any fields that are authenticated (see Section 13.2).
The header fields required, optional and not applicable for each
method are listed in Table 4 and Table 5. The table uses "o" to indicate
optional, "m" mandatory and "-" for not applicable. A "*" indicates that
the header fields are needed only if message body is not empty. See
sections 6.15, 6.16 and 8 for details.
The "where" column describes the request and response types with
which the header field can be used. "R" refers to header fields that can
be used in requests (that is, request and general header fields). "r"
designates a response or general-header field as applicable to all
responses, while a list of numeric values indicates the status codes
with which the header field can be used. "g" and "e" designate general
(Section 6.1) and entity header (Section 6.2) fields, respectively. If a
header field is marked "c", it is copied from the request to the
response.
The "enc." column describes whether this message header field MAY be
encrypted end-to-end. A "n" designates fields that MUST NOT be
encrypted, while "c" designates fields that SHOULD be encrypted if
encryption is used.
The "e-e" column has a value of "e" for end-to-end and a value of "h"
for hop-by-hop header fields.
Table 6 in Appendix A lists those header fields that different client and
server types MUST be able to parse.
The relative order of header fields with different field names is not
significant. Multiple header fields with the same field-name may be
present in a message if and only if the entire field-value for that header
field is defined as a comma-separated list (i.e., #(values)). It MUST be
possible to combine the multiple header fields into one "field-name:
field-value" pair, without changing the semantics of the message, by
appending each subsequent field-value to the first, each separated by
a comma. The order in which header fields with the same field-name
are received is therefore significant to the interpretation of the
combined field value, and thus a proxy MUST NOT change the order of
these field values when a message is forwarded.
Field names are not case-sensitive, although their values may be.
6.7. Accept
This request-header field is used only with the INVITE, OPTIONS and
REGISTER request methods to indicate what media types are
acceptable in the response.
Example:
6.8. Accept-Encoding
6.9. Accept-Language
Example:
6.10. Allow
The Allow entity-header field lists the set of methods supported by the
resource identified by the Request-URI. The purpose of this field is
strictly to inform the recipient of valid methods associated with the
resource. An Allow header field MUST be present in a 405 (Method Not
Allowed) response and SHOULD be present in an OPTIONS response.
6.11. Authorization
6.12. Call-ID
For an INVITE request, a callee user agent server SHOULD NOT alert
the user if the user has responded previously to the Call-ID in the
INVITE request. If the user is already a member of the conference and
the conference parameters contained in the session description have
not changed, a callee user agent server MAY silently accept the call,
regardless of the Call-ID. An invitation for an existing Call-ID or session
can change the parameters of the conference. A client application MAY
decide to simply indicate to the user that the conference parameters
have been changed and accept the invitation automatically or it MAY
require user confirmation.
Since the Call-ID is generated by and for SIP, there is no reason to deal
with the complexity of URL-encoding and case-ignoring string
comparison.
Call-ID: f81d4fae-7dec-11d0-a765-00a0c91e6bf6@foo.bar.com
or
i:f81d4fae-7dec-11d0-a765-00a0c91e6bf6@foo.bar.com
6.13. Contact
3xx and 485 responses: The Contact response-header field can be used
with a 3xx or 485 (Ambiguous) response codes to indicate one or
more alternate addresses to try. It can appear in responses to
BYE, INVITE and OPTIONS methods. The Contact header field
contains URIs giving the new locations or user names to try, or
may simply specify additional transport parameters. A 300
(Multiple Choices), 301 (Moved Permanently), 302 (Moved
Temporarily) or 485 (Ambiguous) response SHOULD contain a
Contact field containing URIs of new addresses to be tried. A
301 or 302 response may also give the same location and username
that was being tried but specify additional transport parameters
such as a different server or multicast address to try or a
change of SIP transport from UDP to TCP or vice versa. The
client copies the "user", "password", "host", "port" and "user-
param" elements of the Contact URI into the Request-URI of the
redirected request and directs the request to the address
specified by the "maddr" and "port" parameters, using the
transport protocol given in the "transport" parameter. If
"maddr" is a multicast address, the value of "ttl" is used as
the time-to-live value.
Note that the Contact header field MAY also refer to a different entity
than the one originally called. For example, a SIP call connected to
GSTN gateway may need to deliver a special information
announcement such as "The number you have dialed has been
changed."
A Contact response header field can contain any suitable URI indicating
where the called party can be reached, not limited to SIP URLs. For
example, it could contain URL's for phones, fax, or irc (if they were
defined) or a mailto: (RFC 2368prop, [28]) URL.
action: The "action" parameter is used only when registering with the
REGISTER request. It indicates whether the client wishes that
the server proxy or redirect future requests intended for the
client. If this parameter is not specified the action taken
depends on server configuration. In its response, the registrar
SHOULD indicate the mode used. This parameter is ignored for
other requests.
expires: The "expires" parameter indicates how long the URI is valid.
The parameter is either a number indicating seconds or a quoted
string containing a SIP-date. If this parameter is not provided,
the value of the Expires header field determines how long the
URI is valid. Implementations MAY treat values larger than
2**32-1 (4294967295 seconds or 136 years) as equivalent to
2**32-1.
Contact := ( "Contact" | "m" ) ":" ("*" | (1# (( name-addr | addr-spec
) [ *( ";" contact-params ) ] [ comment ] )))
name-addr := [ display-name ] "<" addr-spec ">"
addr-spec := SIP-URL | URI
display-name := *token | quoted-string
contact-params := "q" "=" qvalue | "action" "=" "proxy" | "redirect" |
"expires" "=" delta-seconds | " SIP-date " | extension-attribute
extension-attribute := extension-name [ "=" extension-value ]
only allows one address, unquoted. Since URIs can contain commas
and semicolons as reserved characters, they can be mistaken for
header or parameter delimiters, respectively. The current syntax
corresponds to that for the To and From header, which also allows the
use of display names.
Example:
6.14. Content-Encoding
An example is
Content-Length: 3495
Applications SHOULD use this field to indicate the size of the message-
body to be transferred, regardless of the media type of the entity. Any
Content-Length greater than or equal to zero is a valid value. If no
body is present in a message, then the Content-Length header field
MUST be set to zero. If a server receives a UDP request without
Content-Length, it MUST assume that the request encompasses the
remainder of the packet. If a server receives a UDP request with a
Content-Length, but the value is larger than the size of the body sent
in the request, the client SHOULD generate a 400 class response. If
there is additional data in the UDP packet after the last byte of the
body has been read, the server MUST treat the remaining data as a
separate message. This allows several messages to be placed in a
single UDP packet.
6.16. Content-Type
Content-Type: application/sdp
Content-Type: text/html; charset=ISO-8859-4
6.17. CSeq
Clients MUST add the CSeq (command sequence) general-header field
to every request. A CSeq header field in a request contains the request
method and a single decimal sequence number chosen by the
requesting client, unique within a single value of Call-ID. The sequence
number MUST be expressible as a 32-bit unsigned integer. The initial
value of the sequence number is arbitrary, but MUST be less than
2**31. Consecutive requests that differ in request method, headers or
body, but have the same Call-ID MUST contain strictly monotonically
increasing and contiguous sequence numbers; sequence numbers do
not wrap around. Retransmissions of the same request carry the same
sequence number, but an INVITE with a different message body or
different header fields (a "re-invitation") acquires a new, higher
sequence number. A server MUST echo the CSeq value from the
request in its response. If the Method value is missing in the received
CSeq header field, the server fills it in appropriately.
The ACK and CANCEL requests MUST contain the same CSeq value as
the INVITE request that it refers to, while a BYE request cancelling an
invitation MUST have a higher sequence number. A BYE request with a
CSeq that is not higher should cause a 400 response to be generated.
A user agent server MUST remember the highest sequence number for
any INVITE request with the same Call-ID value. The server MUST
respond to, and then discard, any INVITE request with a lower
sequence number.
All requests spawned in a parallel search have the same CSeq value as
the request triggering the parallel search.
Strictly speaking, CSeq header fields are needed for any SIP request
that can be cancelled by a BYE or CANCEL request or where a client
can issue several requests for the same Call-ID in close succession.
Without a sequence number, the response to an INVITE could be
mistaken for the response to the cancellation (BYE or CANCEL). Also, if
the network duplicates packets or if an ACK is delayed until the server
has sent an additional response, the client could interpret an old
response as the response to a re- invitation issued shortly thereafter.
Using CSeq also makes it easy for the server to distinguish different
versions of an invitation, without comparing the message body.
Example:
6.18. Date
SIP-date := rfc1123-date
The Date header field reflects the time when the request or response is
first sent. Thus, retransmissions have the same Date header field value
as the original.
The Date header field can be used by simple end systems without a
battery-backed clock to acquire a notion of current time.
6.19. Encryption
For any encrypted message, at least the message body and possibly
other message header fields are encrypted. An application receiving a
request or response containing an Encryption header field decrypts the
body and then concatenates the plaintext to the request line and
headers of the original message. Message headers in the decrypted
part completely replace those with the same field name in the
plaintext part. (Note: If only the body of the message is to be
encrypted, the body has to be prefixed with CRLF to allow proper
concatenation.) Note that the request method and Request-URI cannot
be encrypted.
hQEMAxkp5GPd+j5xAQf/ZDIfGD/PDOM1wayvwdQAKgGgjmZWe+MTy9NEX8O25Red
h0/pyrd/+DV5C2BYs7yzSOSXaj1C/tTK/4do6rtjhP8QA3vbDdVdaFciwEVAcuXs
ODxlNAVqyDi1RqFC28BJIvQ5KfEkPuACKTK7WlRSBc7vNPEA3nyqZGBTwhxRSbIR
RuFEsHSVojdCam4htcqxGnFwD9sksqs6LIyCFaiTAhWtwcCaN437G7mUYzy2KLcA
zPVGq1VQg83b99zPzIxRdlZ+K7+bAnu8Rtu+ohOCMLV3TPXbyp+err1YiThCZHIu
X9dOVj3CMjCP66RSHa/ea0wYTRRNYA/G+kdP8DSUcqYAAAE/hZPX6nFIqk7AVnf6
IpWHUPTelNUJpzUp5Ou+q/5P7ZAsn+cSAuF2YWtVjCf+SQmBR13p2EYYWHoxlA2/
GgKADYe4M3JSwOtqwU8zUJF3FIfk7vsxmSqtUQrRQaiIhqNyG7KxJt4YjWnEjF5E
WUIPhvyGFMJaeQXIyGRYZAYvKKklyAJcm29zLACxU5alX4M25lHQd9FR9Zmq6Jed
wbWvia6cAIfsvlZ9JGocmQYF7pcuz5pnczqP+/yvRqFJtDGD/v3s++G2R+ViVYJO
z/lxGUZaM4IWBCf+4DUjNanZM0oxAE28NjaIZ0rrldDQmO8V9FtPKdHxkqA5iJP+
6vGOFti1Ak4kmEz0vM/Nsv7kkubTFhRl05OiJIGr9S1UhenlZv9l6RuXsOY/EwH2
z8X9N4MhMyXEVuC9rt8/AUhmVQ==
=bOW+
6.20. Expires
The Expires entity-header field gives the date and time after which the
message content expires.
This header field is currently defined only for the REGISTER and INVITE
methods. For REGISTER, it is a request and response-header field. In a
REGISTER request, the client indicates how long it wishes the
registration to be valid. In the response, the server indicates the
earliest expiration time of all registrations. The server MAY choose a
shorter time interval than that requested by the client, but SHOULD
NOT choose a longer one.
6.21. From
Examples:
The "tag" MAY appear in the From field of a request. It MUST be present
when it is possible that two instances of a user sharing a SIP address
can make call invitations with the same Call-ID.
Call-ID, To and From are needed to identify a call leg. The distinction
between call and call leg matters in calls with multiple responses to a
forked request. The format is similar to the equivalent RFC 822std11(->
2822prop) [24] header, but with a URI instead of just an email address.
6.22. Hide
A client uses the Hide request header field to indicate that it wants the
path comprised of the Via header fields (Section 6.40) to be hidden
from subsequent proxies and user agents. It can take two forms: Hide:
route and Hide: hop. Hide header fields are typically added by the
client user agent, but MAY be added by any proxy along the path.
If a request contains the "Hide: route" header field, all following proxies
SHOULD hide their previous hop. If a request contains the "Hide: hop"
header field, only the next proxy SHOULD hide the previous hop and
then remove the Hide option unless it also wants to remain
anonymous.
A server hides the previous hop by encrypting the "host" and "port"
parts of the top-most Via header field with an algorithm of its choice.
Servers SHOULD add additional "salt" to the "host" and "port"
information prior to encryption to prevent malicious downstream
proxies from guessing earlier parts of the path based on seeing
identical encrypted Via headers. Hidden Via fields are marked with the
"hidden" Via option, as described in Section 6.40.
If hidden headers were not marked, a proxy would have to decrypt all
headers to detect loops, just in case one was encrypted, as the Hide:
Hop option may have been removed along the way.
A host MUST NOT add such a "Hide: hop" header field unless it can
guarantee it will only send a request for this destination to the same
next hop. The reason for this is that it is possible that the request will
loop back through this same hop from a downstream proxy. The loop
will be detected by the next hop if the choice of next hop is fixed, but
could loop an arbitrary number of times otherwise.
A client requesting "Hide: route" can only rely on keeping the request
path private if it sends the request to a trusted proxy. Hiding the route
of a SIP request is of limited value if the request results in data packets
being exchanged directly between the calling and called user agent.
6.23. Max-Forwards
Example:
Max-Forwards: 6
6.24. Organization
Examples:
These are the values of RFC 2076 [30], with the addition of
"emergency".
6.26. Proxy-Authenticate
The syntax for this header is defined in [H14.33]. See 14 for further
details on its usage.
6.27. Proxy-Authorization
6.28. Proxy-Require
See Section 6.30 for more details on the mechanics of this message
and a usage example.
6.29. Record-Route
The server copies the Record-Route header field unchanged into the
response. (Record-Route is only relevant for 2xx responses.)
The calling user agent client copies the Record-Route header into a
Route header field of subsequent requests within the same call leg,
reversing the order of requests, so that the first entry is closest to the
user agent client. If the response contained a Contact header field, the
calling user agent adds its content as the last Route header. Unless this
would cause a loop, any client MUST send any subsequent requests for
this call leg to the first Request-URI in the Route request header field
and remove that entry.
The calling user agent MUST NOT use the Record-Route header field in
requests that contain Route header fields.
Proxy servers SHOULD use the "maddr" URL parameter containing their
address to ensure that subsequent requests are guaranteed to reach
exactly the same server.
Example for a request that has traversed the hosts ieee.org and bell-
telephone.com , in that order:
Record-Route: <sip:a.g.bell@bell-telephone.com>,
<sip:a.bell@ieee.org>
6.30. Require
Example:
Proxy and redirect servers MUST ignore features that are not
understood. If a particular extension requires that intermediate devices
support it, the extension MUST be tagged in the Proxy-Require field as
well (see Section 6.28).
6.31. Response-Key
Require: org.ietf.sip.encrypt-response
header field in its request. If the server cannot encrypt for whatever
reason, it MUST follow normal Require header field procedures and
return a 420 (Bad Extension) response. If this Require header field is
not present, a server SHOULD still encrypt if it can.
6.32. Retry-After
In the third example, the callee is reachable for one hour starting at
21:00 GMT. In the last example, the delay is 2 minutes.
6.33. Route
6.34. Server
Example:
6.36. Timestamp
The timestamp general-header field describes when the client sent the
request to the server. The value of the timestamp is of significance
only to the client and it MAY use any timescale. The server MUST echo
the exact same value and MAY, if it has accurate information about
this, add a floating point number indicating the number of seconds that
have elapsed since it has received the request. The timestamp is used
by the client to compute the round-trip time to the server so that it can
adjust the timeout value for retransmissions.
Note that there MUST NOT be any LWS between a DIGIT and the
decimal point.
6.37. To
Call-ID, To and From are needed to identify a call leg. The distinction
between call and call leg matters in calls with multiple responses from
a forked request. The "tag" is added to the To header field in the
response to allow forking of future requests for the same call by
proxies, while addressing only one of the possibly several responding
user agent servers. It also allows several instances of the callee to
send requests that can be distinguished.
6.38. Unsupported
Syntax:
6.39. User-Agent
6.40. Via
The Via field indicates the path taken by the request so far. This
prevents request looping and ensures replies take the same path as
the requests, which assists in firewall traversal and other unusual
routing situations.
6.40.1. Requests
The client originating the request MUST insert into the request a Via
field containing its host name or network address and, if not the
default port number, the port number at which it wishes to receive
responses. (Note that this port number can differ from the UDP source
port number of the request.) A fully-qualified domain name is
RECOMMENDED. Each subsequent proxy server that sends the request
onwards MUST add its own additional Via field before any existing Via
fields. A proxy that receives a redirection (3xx) response and then
searches recursively, MUST use the same Via headers as on the
original proxied request.
A proxy SHOULD check the top-most Via header field to ensure that it
contains the sender's correct network address, as seen from that proxy.
If the sender's address is incorrect, the proxy MUST add an additional
"received" attribute, as described 6.40.2.
A host behind a network address translator (NAT) or firewall may not
be able to insert a network address into the Via header that can be
reached by the next hop beyond
the NAT. Use of the received attribute allows SIP requests to traverse
NAT's which only modify the source IP address. NAT's which modify port
numbers, called Network Address Port Translator's (NAPT) will not
properly pass SIP when transported on UDP, in which case an
application layer gateway is required. When run over TCP, SIP stands a
better chance of traversing NAT's, since its behavior is similar to HTTP
in this case (but of course on different ports).
Normally, every host that sends or forwards a SIP message adds a Via
field indicating the path traversed. However, it is possible that Network
Address Translators (NATs) changes the source address and port of the
request (e.g., from net-10 to a globally routable address), in which case
the Via header field cannot be relied on to route replies. To prevent
this, a proxy SHOULD check the top-most Via header field to ensure
that it contains the sender's correct network address, as seen from that
proxy. If the sender's address is incorrect, the proxy MUST add a
"received" parameter to the Via header field inserted by the previous
hop. Such a modified Via header field is known as a receiver-tagged Via
header field. An example is:
6.40.3. Responses
6.40.5. Syntax
The format for a Via header field is shown in Fig. 11. The defaults for
"protocol-name" and "transport" are "SIP" and "UDP", respectively. The
"maddr" parameter, designating the multicast address, and the "ttl"
parameter, designating the time-to-live (TTL) value, are included only if
the request was sent via multicast. The "received" parameter is added
only for receiver-added Via fields (Section 6.40.2). For reasons of
privacy, a client or proxy may wish to hide its Via information by
encrypting it (see Section 6.22). The "hidden" parameter is included if
this header field was hidden by the upstream proxy (see 6.22). Note
that privacy of the proxy relies on the cooperation of the next hop, as
the next-hop proxy will, by necessity, know the IP address and port
number of the source host.
6.41. Warning
Warnings 300 through 329 are reserved for indicating problems with
keywords in the session description, 330 through 339 are warnings
related to basic network services requested in the session description,
370 through 379 are warnings related to quantitative QoS parameters
requested in the session description, and 390 through 399 are
miscellaneous warnings that do not fall into one of the above
categories.
304 Media type not available: One or more media types contained in
the session description are not available.
330 Multicast not available: The site where the user is located does
not support multicast.
331 Unicast not available: The site where the user is located does
not support unicast communication (usually due to the presence
of a firewall).
Examples:
6.42. WWW-Authenticate
Related sites:
• TopXML - XML Tutorials, • Planet Source • XML/XSLT Forums -
MS.NET XML Tutorials Code - The Do you have a tough
• VisualBuilder.com - largest public XML or XSLT
Java, JSP, ASP, XML. source code Question? Ask it
scripting languages, ... database on the here.
Internet • ASPAlliance - The
• Web Design - #1 ASP.NET
• DevGuru - ADO, ASP,
WebMaster Community
CSS2, HTML, Javascript,
forums - web
JetSQL, VBScript, WML,
design, servers, • Scripts - Scripts
XML, ...
hosting, ...
• Your HTML
Source - HTML
Tutorials
Nursing Home answering pigeon Web Hosting -
Postcard Printing
Abuse service forge AccuWebHosting.Com
management office
Call Center water softener internet phone
training UK cubicles
International Prepaid
123 Fast Loans HDTV Plasma Mobile Phones
Adoption Phones
VoIP, Internet Ecco shoes
Direct TV Home Value Sacramento real estate
Telefonie Mephisto shoes
remote backup world of warcraft distributed io Lawyers Color Laser Printer
VoIP
martin guitars Hosted Exchange Incorporate Detektei
Internettelefonie