Pages

Tuesday, January 17, 2012

PRACK

PRACK: We all know what is a response for a request. Here is a method in SIP which is a request for a response.

Sometimes provisional response needs reliability on transport. And SIP goes over UDP which is unreliable. So SIP introduces a method for Provisional Response reliability that is Provisional Response ACK. It works in a 3 way handshake mechanism. A provisional response is acked by PRACK which is replied with 200 Ok.

A PRACK can be used by UAC when the UAS sends a Provisional Response (1xx). Exception is 100 Trying. But such a PRACK request should be sent only if the provisional response has 100rel extension (100 reliability) in supported or required header field.


If UAS definitely require 100rel extension for call processing but is not listed in the supported header of INVITE / Request, UAS can terminate the call with 421 Extension required error message.

If UAC feels it does not knows 100rel extension sent in provisional response, it can reject the main request (Invite etc) with 420 Bad request.

The PRACK is an end-to-end request. Proxy does not have any dependancies on Provisional responses. They simply forward 1xx response. The only exception is 100 trying, which is hop to hop response. Hence the PRACK is not used for 100 trying alone.

Following are the headers which plays its role in decoding PRACK.
RSeq - Remote sequence number. The UAC will insert this number (random start value for security purpose) when it requires PRACK in the provisional response.
RAck - This header used in the PRACK request. Formed by combining the RSeq number, CSeq number, CSeq method of the provisional response.
Other than these two, CSeq, From, To, Call-ID all play their part as usual.

The provisional response is retransmitted as long as it gets a PRACK but within 4 secs. It first starts with 500ms (T1) and retransmitted in exponential backoff. Similarly the PRACK is retransmitted as long as UAC's 200 Ok reaches UAS.