- request from a client and response from a server are SIP messages
- SIP requests are distinguished by having a request line which contains a method name, a Request URI and protocol version
- RFC 3261 defines six methods (SIP extensions contains others)
- REGISTER for registering contact information
- INVITE, ACK and CANCEL for setting up session
- BYE for terminating sessions
- OPTIONS for querying server capabilities
- 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
- SIP version is "SIP/2.0"
- RFC 3261 defines six methods (SIP extensions contains others)
- SIP Responses have a status line as their start line, which consist of protocol version, numeric status code and its associated text
- Status code is a three digit integer result code, indicating the outcome of an attempt to understand and satisfy a request.
- 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
- 1XX: Provisional , the request is received and is in process
- 2XX: Success , the request was successfully received, understood, and accepted
- 3XX: Redirection , the request needs to be redirected, one reason for that is, the recipient has changed its location
- 4XX: Client Error , bad syntax in the request, thus cant be fulfilled at this server
- 5XX: Server Error , server failed to fulfill the request (a valid one)
- 6XX: Global failure , the request cant be fulfilled at any server
- reason phrase is to give a short textual description of the status code, for the human user
Tuesday, October 5, 2010
SIP Messages
Structure of SIP Protocol Stack
- fairly independent processing stages
- element "containing" a layer means elements compliance with the rules defined by that layer
- lowest layer is "syntax and encoding" layer
- encoding is specified using BCNF (Backus-Naur form grammar)
- encoding is specified using BCNF (Backus-Naur form grammar)
- second layer is "transport layer"
- defines how a client sends requests and receives responses
- defines how a server receives requests and sends responses
- all SIP elements contain a transport layer
- third layer is "transaction layer"
- transaction is a
- request send by client transaction (using transport layer) to a server transaction
- along with all the responses to that request send by the server transaction back to the client
- handles application layer retransmissions
- matching of responses to request
- handles application layer timeouts
- statefull proxies, and User Agents have a transaction layer
- stateless proxies don't have a transaction layer
- Transaction layer has two components, which are represented by a finite state machine constructed to process a particular requests
- Client Component (client transaction)
- Server Component (server transaction)
- Client Component (client transaction)
- transaction is a
- the fourth layer is "transaction user"
- each of the SIP entities except a stateless proxy is a transaction user
- when a TU wishes to send a request it creates a client transaction instance and passes it the request, along with destination IP address, port, and transport to which to send the request
- a TU that creates a client transaction can also cancel it, using a CANCEL request, which constitute its own transaction, but references the transaction to be canceled
- on canceling the server stops further processing, revert to the state that existed before the transaction was initiated, and generate a specific error response to that transaction
- when a TU wishes to send a request it creates a client transaction instance and passes it the request, along with destination IP address, port, and transport to which to send the request
- each of the SIP entities except a stateless proxy is a transaction user
- the SIP elements, UA clients and servers, stateless and stateful proxies, and registrar, contains a core that distinguish them from each other. Cores except for the state less proxies are TU.
Subscribe to:
Posts (Atom)