SIP Response Codes
Why Does SIP Use SIP Response Codes?
Session initiation protocol, or SIP, has the important job of controlling communication sessions between two phone users. This job is based around request and response coding transactions, somewhat similar to hypertext transfer protocol (HTTP). While SIP response coding is an extension of HTTP, not all HTTP codes work for the SIP response coding protocol.
What is SIP Response Coding Used For?
Transactions between two end users are made up of SIP request codes and SIP response codes. Any SIP user agent generates these codes. Now, there are two different kinds of user agents:
- Clients (UACs): Initiate requests
- Servers (UASs): Responds to requests
One user agent may also act as both a client and a server for different transactions. This being the case, a user agent will be a UAC when making a call and a UAS when receiving a call.
Three-Digit SIP Response Codes
SIP response codes are three digit codes. There are many three-digit SIP response codes, all represent different statuses of a request. The first number of the code, one through six, represents what kind of a request it is, whether provisional, success, redirection, client error, server error or global failure. Here is a more visual example of these SIP response codes:
SIP Response Code Examples
1XX Provisional SIP Response Codes
- 180 – Ringing: Destination user agent received invite and is alerting user of call
- 181 – Call forwarded
2XX Successful SIP Response Codes
- 200 – OK: Request was successful
- 202 – Accepted: Request was accepted to be processed but not completed
3XX Redirection SIP Response Codes
- 300 – Multiple choices: There are several options for incoming caller
- 380 – Alternative services: Call failed but alternative locations are directed
4XX Client Failure SIP Response Codes
- 400 – Bad request: The request was not understood
- 403 – Forbidden: Server understood request but refuses to complete
5XX Server Failure SIP Response Codes
- 500 – Server internal error: Server could not fulfill request because of an unexpected condition
- 501 – Not implemented: Server doesn’t have the ability to fulfill a request
6XX Global Failure SIP Response Codes
- 600 – Busy everywhere: All destinations are busy
- 604 – Does not exist anywhere: Server has authoritative information that requested server does not exist