Tuesday, October 5, 2010

SIP Messages

  1. request from a client and response from a server are SIP messages
  2. SIP requests are distinguished by having a request line which contains a method name, a Request URI and protocol version
    1. RFC 3261 defines six methods (SIP extensions contains others)
      1. REGISTER for registering contact information
      2. INVITE, ACK and CANCEL for setting up session
      3. BYE for terminating sessions
      4. OPTIONS for querying server capabilities
    2. Request URI is a SIP or SIPS URI, it indicates the user or service to which this request is being addressed, SIP elements may support other URI types like tel URI
    3. SIP version is "SIP/2.0" 

  3. SIP Responses have a status line as their start line, which consist of protocol version, numeric status code and its associated text

    1. Status code is a three digit integer result code, indicating the outcome of an attempt to understand and satisfy a request.
    2. the first digit of the status code defines the class of the response, there can be six values for the first digit, ie six response categories
      1. 1XX: Provisional , the request is received and is in process
      2. 2XX: Success , the request was successfully received, understood, and accepted
      3. 3XX: Redirection , the request needs to be redirected, one reason for that is, the recipient has changed its location
      4. 4XX: Client Error , bad syntax in the request, thus cant be fulfilled at this server
      5. 5XX: Server Error , server failed to fulfill the request (a valid one)
      6. 6XX: Global failure , the request cant be fulfilled at any server
    3. reason phrase is to give a short textual description of the status code, for the human user


No comments: