The previous post was –
Components of a SIP
Entities interacting in SIP scenario are called User Agents (UA).
Each entity has specific functions and participates in SIP communication as a client (initiates requests), as a server (responds to requests), or as both. One “physical device” can have the functionality of more than one logical SIP entity. For example, a network server working as a Proxy server can also function as a Registrar at the same time.
User Agents may operate in two fashions –
- User Agent Client (UAC) : It generates requests and send those requests to servers.
- User Agent Server (UAS) : It gets requests, processes those requests and generate responses.
Note: A single UA may function as both.
It may be a softphone application running on your PC or a messaging device in your IP phone. It generates a request when you try to call another person over the network and sends the request to a server (generally a proxy server).
Servers are in general part of the network. They possess a predefined set of rules to handle the requests sent by clients.
Servers can be of several types –
Proxy Server: When a request is generated, the exact address of the recipient is not known in advance. So the client sends the request to a proxy server. The server on behalf of the client (as if giving a proxy for it) forwards the request to another proxy server or the recipient itself.
Redirect Server: Redirects the request back to the client indicating that the client needs to try a different route to get to the recipient. It generally happens when a recipient has moved from its original position either temporarily or permanently. Unlike Proxy servers the redirect server does not forward requests to other servers.
Registrar Server: Users have to register their locations to a Registrar server. Users from time to time refresh their locations by registering (sending a special type of message) to a Register server.
Location Server: The addresses registered to a Registrar are stored in a Location Server.
Message Types and Commands of a SIP
There are two types of SIP messages:
Requests—sent from the client to the server.
Responses—sent from the server to the client.
|INVITE||Invites a user to call|
|ACK||Confirms a final response to a INVITE|
|BYE||Terminates a Call|
|CANCEL||Cancel searching and ringing|
|OPTION||Queries the capabilities of Sever/Other side|
|REGISTER||Register the Location Service|
|INFO||Send the mid-session info that will not modify the Session state|
Response Commands: Response Message contains numeric response codes. There are 2 types of Response Commands and 6 classes –
2 Types :-
Provisional (1xx class)—provisional responses are used by the server to indicate progress, but they do not terminate SIP transactions.
Final (2xx, 3xx, 4xx, 5xx, 6xx classes)—final responses terminate SIP transactions.
1xx : Provisional,Searcing,Quering,Ringing.
2xx : Success.
3xx : Redirection,Forwarding
4xx : Request Failure(client mistakes).
5xx : Server failure.
6xx : Global failure(busy,refusal,not available anywhere).
Other posts related to SIP –