SIP Error Codes

## Introduction

This article displays SIP error codes and a definition of such codes

## Categories of SIP messages

* 1xx is ‘Informational’
* 2xx is ‘Success’
* 3xx is a ‘Redirection’
* 4xx is a ‘Client Error’
* 5xx is a ‘Server Error’
* 6xx is a ‘Global Failure’

## 1xx—Provisional Responses

As mentioned earlier, a 1xx SIP response code can be sent at anytime while a connection is being established. Some of the regularly received codes are

## 2xx—Successful Responses

The 2xx response codes are used to indicate that a SIP request has been successfully processed. You’ll typically see the following versions:

## 3xx—Redirection Responses

3xx responses give information about the user's new location, or about alternative services that might be able to satisfy the call.

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. UAs 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.
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 UAs 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.
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.

## 4xx—Client Failure Responses

4xx responses are definite failure responses from a particular server. The client SHOULD NOT retry the same request without modification (for example, adding appropriate authorization). However, the same request to a different server might be successful.

## 5xx—Server Failure Responses

5xx responses relate to server error issues and are mostly generated by the likes of proxy servers, location servers, and redirect servers. You’ll be familiar with some of these: - 500 Server Internal Error - 501 Not Implemented - 502 Bad Gateway - 503 Service Unavailable - 504 Server Time-Out

## 6xx—Global Failure Responses

Finally, the 6xx response codes relate to Global Error issues. They include: - 600 Busy Everywhere - 603 Decline - 604 Does Not Exist Anywhere - 606 Not Acceptable

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.
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.
This status response is returned only if the client knows that no other endpoint will answer the request.