What is SIP?

Session Initiation Protocol is an application layer protocol for establishing, modifying and terminating VoIP sessions over network. SIP message contains parameters about session description such that participants can negotiate parameters for communication. SIP is a reliable protocol and it can run over TCP or UDP. SIP uses SDP as data payload to exchange parameters between hosts. It is capable of locating users, which are identified by their IP addresses, as well as finding out if user is willing to participate.

What does SIP do?

SIP sets up session and exchange data related to terminal capabilities. It manages session by providing various facilities required to service session requests. These facilities are provided by methods in SIP headers. SIP can operate in peer to peer mode where SIP user agent establishes connection with another user agent over network. SIP can also operate in server and client mode. SIP servers can act in proxy mode or redirect mode. Proxy servers act as routing servers for SIP packets. Whereas, redirect servers have list of external URIs for redirecting SIP requests. As well as this, SIP can provide location services, these servers are known as SIP registrar.

The connection establishment in SIP takes place by sending “invite” message to a host with IP address and options. The host in return sends “acknowledgement” to allow communication. To terminate the connection “bye” message is used. To each of these message a corresponding function is associated, which is executed by the endpoint entity like a User Agent. These communications can be classified as “request” and “response” type which are very similar to HTTP. SIP Transactions maintain internal state and timers for delivery of message reliably.

Also, SIP is used in instant messenger as it has capability of sending “event” notifications. This capability is further assisted by capabilities to update current state and receive current state from another host.