Sunday, August 22, 2010

SIP FAQ

1) What are the basic SIP methods?

Answer:- There are six methods

REGISTER,INVITE,OPTIONS,CANCEL,ACK,BYE.

2)What are the basic headers of Methods?

Answer: The basic headers are
To, FROM,VIA, MAX-FORWARD,CALL-ID,CSeq( these are mandatory headers)

3) Is it necessary that the value of TO and FROM header of REGISTER request is same?

Answer: Generally it is same but it can be different if the rquest is third party registration.

4)What are the way to put call on hold?

Answer: There are three methods:

- make ip address 0.0 in media information
- make media attribute a= send only
or a=inactive.
- make the port value 0 in media information.

5) How many times INVITE Request can re-send if we not get response for 1st INVITE?

Answer: SIX Times.

6) What is transaction?

Answer: Transaction consists of single request and any responses to that request which include 0 or more provisional response and one or more final response.

7) What is branch ID parameter why it is used ?

Answer: Branch ID parameter in Via header field serves as transaction identifier and is used by proxies to detect loop.Branch ID always begins with "z9hG4bk".

8) what is dialog?

Answer: The peer-to-peer relation between two user is known as dialog. The combination of TO tag,FROM tag and CALL-ID define dialog.

9) What is B2B (Back-to-back )user agent?

Answer: It is a logical entity that receives a request and process it as a user agent server.It is also used for hiding the identity.

10) What is the methods used for presence service? and which header contain the status of user?

Answer: SUBSCRIBER and NOTIFY used for presence service and Event header contain the status of user.

11) what is call ID?

Answer:Call ID used to identifies the particuler invitation or all registration of a particular client.

12) what is session dialog and call leg?

Answer:Dialog is peer-to-peer SIP relationship between the two users that persist for some time.It consist of To tag,From tag and Call ID.
Call leg used from same in RFC 2543.

13) why Via header used?

Answer:Via header indicates the path taken by the request so far and indicates the path that should be followed routing response.
It contain the transport protocol used to send the the messages, the client host name or network address and port number at which it wishes to receive the response.

14) what is branch parameter ?

Answer:Branch parameter used to identifies the transaction and also used by proxies to detect the loop .

15) How and why CSeq is used ?

Answer:CSeq is used to uniquely identifies the transaction and differentiate b/w new request and request retransmission.

16) why tag is used?

Answer:tag is used to identify the dialog and it also helpful in fault to reset the system to recover the dialog

17) what is Expire header in request?

Answer: The Expire header field gives the relative time after which the message expire.

18) What is the response code when the Expire header value is less than the server support time?

Answer:The Server gives the error 423(Interval to Brief )

19) What is the response code when user reject the any INVITE request?

Answer: The response code is 486(Busy Here).

20)Which method is used for the SMS(messaging)in IMS.

Answer: MESSAGE Request is used.

21) What are difference between OPTION and UPDATE methods?

Answer: OPTIONS used to know the capabilities of the end points, UPDATE used to update the session.

22) INVITE and CANCEL is single transaction ?

Answer: No , they are different transaction , according to the RFC 2543 they are intermingled but in the new RFC ther are separated.

23) What are the difference between RFC 2543 and RFC 3261 ?

Answer: List of the difference :
a) BYE can be sent only for the existing call according to the RFC 3261 for terminate unanswered call send CANCEL, early (RFC 2543)it can sent any time.
b)CANCEL and INVITE are intermingled in RFC 2543 but it separated in RFC 3262.
c) Loop detection is made optional in RFC 3261.(loop detection procedure in RFC 2543 had a serious bug which would report "spiral" as an error.
d) Usages of tag is made mandatory .(they are optional in RFC 2543).

24) What id the error respond , when Register server reject the registraion for short Duration?

Answer: With the error code 423 and Min-expire header.

25) When we kept the call on HOLD , is there any communication path persist?

Answer: During the call hold "one way communication" path persist.

26 ) Can We used UPDATE message to hold the session?

Answer: No, We can,t use UPDATE to hold the session.
   UPDATE allows a client to update  parameters of a session (such as the set of media streams 
and their codecs) but has no impact on the state of a dialog. In that sense, it is like a re-INVITE,
but unlike re-INVITE, it can be sent before the initial INVITE has been completed.
This makes it very useful for updating session parameters within early dialogs.

Monday, August 16, 2010

PRACK message in SIP

One problem with the original SIP specification was that it not provided any method for the recipient of a request to know if it's provisional responses have reached their destination when using an unreliable transport such as UDP. PRACK is the reliable provisional response ,using reliable provisional responses, these responses are retransmitted by the UAS in response to an INVITE until a PRACK is received from the UAC. If the PRACK is acceptable to the UAS, the UAS would then respond with a 200 OK to the PRACK. In this instance the PRACK serves the same role as an ACK in a normal INVITE transaction. However, unlike the ACK, PRACK has its own response. A call flow of an INVITE transaction using reliable provisional responses can be seen below.

Basic Call Flow with-out PRACK (Between UAC ---- UAS )
=======================================



------- INVITE , CSeq=1-------------------------------->

<-------------------100 Trying------------------------------

<-----------------180 Ringing , Cseq=1---------------

<--------------------200 OK, Cseq=1---------------------

------------------------- ACK, Cseq=1------------------------>


Call Flow With the PRack
===================
UAC UAS

-------------------INVITE ,Support =100rel, CSeq=1------------------------>

<-------------------100 Trying--------------------------------------------------------------

<-----------------180 Ringing ,RSeq=1, CSeq=1--------------------------------

---------------------PRACK, CSeq=2,RAck=1 INVITE------------------------->

<--------------------200 OK, CSeq=2 PRACK--------------------------------------

<--------------------200 OK, CSeq=1 INVITE--------------------------------------

------------------------- ACK, CSeq=1--------------------------------------------------->

IGMP

IGMP(Internet Group Management Protocol) is a communication protocol used to managed the membership of the Internet Protocol multicast group.It is used by the Hosts and adjacent multicast routers to established multicast group membership.
IGMP has three versions IGMP v1, v2 and v3.

> IGMPv1: Hosts can join multicast groups. There were no leave messages. Routers were using a time-out based mechanism to discover the groups that are of no interest to the members.It send only member specific query.

> IGMPv2: Leave messages were added to the protocol. Allow group membership termination to be quickly reported to the routing protocol, which is important for high-bandwidth multicast groups and/or subnets with highly volatile group membership.It send group specific query.

> IGMPv3: Major revision of the protocol. It allows hosts to specify the list of hosts from which they want to receive traffic from. Traffic from other hosts is blocked inside the network. It also allows hosts to block inside the network packets that come from sources that sent unwanted traffic. It send group as well as source specific query

The variant protocols of IGMP are:

  • DVMRP: Distance Vector Multicast Routing Protocol.
  • IGAP: IGMP for user Authentication Protocol.
  • RGMP: Router-port Group Management Protocol.

There are basically 5 types of messages in the IGMP that must be implemented in IGMP for the IGMP v3 functional properly and be compatible with previous versions:

  • 0x11: membership query
  • 0x22: version 3 membership report
  • 0x12: version 1 membership report
  • 0x16: version 2 membership report
  • 0x17 version 2 leave group
IGMP Snooping : It is the method which provide intelligence to gateway or router to avoid the multicast flooding on the device.

SSM(Source Specific Multicast) : It is method to deliver multicast packets, in which the packets that are delivered to a reciver are those packets which originating from a specific source address requested by the reciver . So limiting the source ,SSM reduce the demands on the network and improve the security.

Now these day there is boom for the IPTV, IGMP protocol is very important protocol for the IPTV functionality.IGMPv2 and V3 can be used for the IPTV.
In my next blog i will going to explain what are the roles of IGMP in the IPTV.

Note: For doing the testing of the IGMP basic functionality we can use the some open source tools .

Examples:

1) Iperf
:
It is a commonly used network testing tool that can Create the TCP and UDP streams and measure the throughput of a network that is carrying them .

On LAN Side of DUT: iperf -s -B 239.193.244.160 -p 5555 -u
On WAN Side of DUT : iperf -c 239.193.244.160 -p 5555 -u -T 12
Note: Jperf is a graphical froentend for iperf.
2) VLC Player.
On WAN side of the DUT stream the media using the VLC player and from the LAN side play the stream media.

3) Piref :
It is the tool to create the IGMPv3 packets for include and exclude functionality, it is used to do the performance or load testing of the IGMP .