Monday

SIP Requests and Responses | SIP Architecture



Because SIP is a text-based protocol like HTTP, it is used to send information between clients and servers, and User Agent clients and User Agent servers, as a series of requests and responses. When requests are made, there are a number of possible signaling commands that might be used:
  • REGISTER Used when a user agent first goes online and registers their SIP address and IP address with a Registrar server.
  • INVITE Used to invite another User agent to communicate, and then establish a SIP session between them.
  • ACK Used to accept a session and confirm reliable message exchanges.
  • OPTIONS Used to obtain information on the capabilities of another user agent, so that a session can be established between them. When this information is provided a session isn’t automatically created as a result.
  • SUBSCRIBE Used to request updated presence information on another user agent’s status. This is used to acquire updated information on whether a User agent is online, busy, offline, and so on.
  • NOTIFY Used to send updated information on a User agent’s current status. This sends presence information on whether a User agent is online, busy, offline, and so on.
  • CANCEL Used to cancel a pending request without terminating the session.
  • BYE Used to terminate the session. Either the user agent who initiated the session, or the one being called can use the BYE command at any time to terminate the session.
When a request is made to a SIP server or another user agent, one of a number of possible responses may be sent back. These responses are grouped into six different categories, with a three-digit numerical response code that begins with a number relating to one of these categories. The various categories and their response code prefixes are as follows:
  • Informational (1xx) The request has been received and is being processed.
  • Success (2xx) The request was acknowledged and accepted.
  • Redirection (3xx) The request can’t be completed and additional steps are required (such as redirecting the user agent to another IP address).
  • Client error (4xx) The request contained errors, so the server can’t process the request
  • Server error (5xx) The request was received, but the server can’t process it. Errors of this type refer to the server itself, and they don’t indicate that another server won’t be able to process the request.
  • Global failure (6xx) The request was received and the server is unable to process it. Errors of this type refer to errors that would occur on any server, so the request wouldn’t be forwarded to another server for processing.
There are a wide variety of responses that apply to each of the categories. The different responses, their categories, and codes are shown in Table 1.
Table 1: Listing of Responses, Response Codes, and Their Meanings 
Response Code
Response Category
Response Description
100
Informational
Trying
180
Informational
Ringing
181
Informational
Call is being forwarded
182
Informational
Queued
200
Success
OK
300
Redirection
Multiple choices
301
Redirection
Moved permanently
302
Redirection
Moved temporarily
303
Redirection
See other
305
Redirection
Use proxy
380
Redirection
Alternative service
400
Client Error
Bad request
401
Client Error
Unauthorized
402
Client Error
Payment required
403
Client Error
Forbidden
404
Client Error
Not found
405
Client Error
Method not allowed
406
Client Error
Not acceptable
407
Client Error
Proxy authentication required
408
Client Error
Request timeout
409
Client Error
Conflict
410
Client Error
Gone
411
Client Error
Length required
413
Client Error
Request entity too large
414
Client Error
Request-URI too large
415
Client Error
Unsupported media type
420
Client Error
Bad extension
480
Client Error
Temporarily not available
481
Client Error
Call leg/transaction does not exist
482
Client Error
Loop detected
483
Client Error
Too many hops
484
Client Error
Address incomplete
485
Client Error
Ambiguous
486
Client Error
Busy here
500
Server Error
Internal server error
501
Server Error
Not implemented
502
Server Error
Bad gateway
503
Server Error
Service unavailable
504
Server Error
Gateway time-out
505
Server Error
SIP version not supported
600
Global Failures
Busy everywhere
603
Global Failures
Decline
604
Global Failures
Does not exist anywhere
606
Global Failures
Not acceptable
Related Posts with Thumbnails

Link Exchange