Saturday, August 2, 2008

6. The Session Initiation Protocol(SIP)

Introduction to SIP

SIP is an application layer signalling protocol used to establish, maintained and terminate multimedia session. It can also perform both unicast and multicast session and sipport user mobility. It can also handles signals and identifies user location , call setup , termination and busy signal.

Since 2007, SIP has become the defacto signalling standard for VoIP and multimedia communication. It has been said that SIP has been benefited by being an IETF standard, The IETF being quicker to adapt to industry forces than the ITU. SIP is supported by both standard committees, as in H.323.

SIP is a text based protocol that is part of an overall IETF multimedia architecture. The IETF also include Resource Reservation Protocol, Real-time Transport Protocol , RTSP and SAP, SPP. it in-coperate in conjunction with other signalling Protocol such as H.323.

SIP Messages

There are two kinds of SIP messages : request from client and responses returned from servers.
Every messages contain a header that describe the details of the link. It is also able to send message syntax and header fields identical to Hypertext Transfer Protocol(HTTP). Besides that, SIP messages can sent either over UDP or TCP with multiple messages carried in a single TCP connection or UDP datagram.

What are the Message header in SIP?

There are four groups of message header which are described below:
  • General headers- Apply to request and responses
  • Entity headers - Define information about the content in the body and the length
  • Request headers - Enable user to include additional request information.
  • Response headers - Enable server to include additional responses information.
What are the Message request in SIP?

There are 6 kind of message request. Theses are referred to as methods, enable user agents and network servers to locate, invite and handle calls.The six SIP message request are describe below:

1. Invite
This is used to indicate that user or service is invited to join in a session. It include session description, for two-way call, the calling party indicates the media type.The user can recognize the capabilities of the other end and open a conversation session with a limited number of messages and round trips.

2. ACK
It is a correspond to an Invite request. It also represent the final confirmation from the end system and conclude the traction initiated by the invite command. If the calling party includes a session description in the ACK request, no additional parameters are used in the session. If it is absent, the session parameters in Invite request are used as the default.

3.Options
Used to enable user to query and collect user agents and network server capabilities. However this is not used to establish session.

4.Bye
Used by calling and called parties to release a call. Before ending the call, the user agent sens this request to server to indicate that the desired to end this session.

5.Cancel
Enables user agent and server to cancel any progress request. It does not affect complete request in which the final response were already received.

6.Register
This is used by the client to register location information with SIP servers.

SIP Signalling Model

The following show the signalling model between 2 user:


The following diagram can be sumarized above:

  • Firstly, the caller send a signal to establish using the INVITE message to the PBX of the callee.
  • The invite message contain information such as from, to via and call-id,in addition to routing information.
  • Next the proxy server will communicate with the server at the callee side.
  • Once the callee received the message, it will then send a TRYING message to the caller from the proxy server, indicate the signal is being routed.It is also used to keep track of the call process.
  • At the same time , a ringing signal is send form the callee to caller.
  • When the callee accept the call, an OK signal is send to the caller to indicate that the called party has accept the call.
  • The last signal is anknowledge by an ACK messge without any response.
  • After that, both user can communicate directly through the media session.
  • When the callee want to end the call, it will send a BYE message to terminate the session.
  • After that, the caller will send a OK message and the call is terminate.
Components In SIP

The components in SIP are:
1. User Agent
2.Back-to-Back User Agent
3.Proxy server
4.Redirect Server
5.Registrar server

1. User Agent
They are endpoint devices that initiate and terminate the session through a series of request/response quries. It can be an IP Phone and each devices can dind each other without the need of other entities.

2.Back-to-Back User Agent
It is an application that acts an intermediary between two endpoint. It also maintained the state of the call and responsible for call termination. It may function as a gateway representing as an endpoint on the IP side to an endpoint on the PSTN.

3.Proxy server
Translate request by passing hem to other SIP server by rewrite the message before passing it on if required. It can perform address translation within the domain by resolving the e-mail URL or telephone to IP address and use the DNS to find the SIP server outside the domain

It helps in call setup and termination, leaving call connect to the endpoints themselves.

4.Redirect Server
Maps a request from client to the URL of the party being called and send it back to the caller.
It does not pass request to other server.

5. Registrar Server
Register users into a databases as they come online. Information indicating the user identity and the devices on which they choose to be researched is stored by IP address, phone number or URL. Enable user to update their location.

Both Registrar and Redirect server are often resides on a SIP Proxy server.