SIP Protocol Stack
SIP is structured as a layered protocol.
i) Lowest layer is syntax and encoding.
ii) Second layer is transport layer.
iii) Third layer is a transaction layer.
iv) Layer above transaction layer is transaction user.
- Responsible for encoding/decoding and syntactical parsing of the messages.
- Augmented Backus-Naur Form (ABNF)
- Performs actual transmission of requests and responses over network transports.
- Responsible for managing persistent connections for transport protocols like TCP, TLS & SCTP.
- Performs framing of message oriented transport like UDP.
- All SIP elements contain a transport layer.
- Handles application layer retransmissions, matching of responses to requests and application layer timeouts.
- Consists of client/server transaction.
- Each component is represented by a finite state machine that is constructed to process a particular request (Please refer RFC 3261 - Transactions for detailed description).
- Stateless proxies do not contain a transaction layer.
- Responsible for sending the request.
- Responsible for receiving responses from the transport layer and delivering them to the TU (Transaction User).
- Filtering out any response re-transmissions or disallowed responses (ex response to ACK).
- Responsible for sending the response.
- Responsible to receive requests from the transport layer and deliver them to the TU.
- Filters any request re-transmissions from the network.
- Accepts responses from TU and delivers them to the transport layer for transmission over network.
- To send a request, TU creates a client transaction instance and passes the request along with the destination IP address, port and transport to which to send the request.
- TU that creates a client transaction can also CANCEL it.
- Each of the SIP entities, except the stateless proxy is a Transaction User.
Basic SIP Call Flow <== ==> SIP Timers & State Machine