Thursday, May 6, 2010

RFC 3262 SIP PRACK

RFC 3262
- Reliability of Provisional Responses in the Session Initiation Protocol (SIP)

 SIP PRACK Overview (Provisional Response Acknowledgement)

One problem with the original SIP specification was that it provided no 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. The ability to make these provisional responses reliable is defined by RFC 3262 "Reliability of Provisional Responses in SIP"

There are two types of responses defined by SIP.

  • They are provisional (mostly sent unreliably)
  • and final.  Final responses (2xx-6xx) convey the result of the request processing and are sent reliably.
  • SIP Provisional responses do not have an acknowledgement system so they are not reliable.
  • There are certain scenarios in which the provisional SIP responses (1xx) must be delivered reliably.
  •  For example in a SIP/PSTN inter-working scenario it is crucial that the 180 and 183 messages are not missed. To solve this problem the SIP PRACK method guarantees a reliable and ordered delivery of provisional responses in SIP.

 Diagram - SIP PRACK Handshake


 When 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.


UAC (User Agent Client) - UAS (User Agent Server) Behaviour 

The following table shows the overall behavior of UAS and UAC with various SGP configuration combinations.

UAC

UAS

Call Processing

SGP: PRACK Disabled

SGP: PRACK Disabled

Normal Call

SGP: PRACK Disabled

SGP: PRACK Supported

Normal Call

SGP: PRACK Disabled

SGP: PRACK Require

Call Rejected

SGP: PRACK Supported

SGP: PRACK Disabled

Normal Call

SGP: PRACK Supported

SGP: PRACK Supported

PRACK Call

SGP: PRACK Supported

SGP: PRACK Require

PRACK Call

SGP: PRACK Require

SGP: PRACK Disabled

Call Rejected

SGP: PRACK Require

SGP: PRACK Supported

PRACK Call

SGP: PRACK Require

SGP: PRACK Require

PRACK Call

Call Tracing:

Success

16:32:35.762 CALL(SIP) (00:0004:00) SENT 183 Session Progress Reliable (100rel) to 10.129.45.102:8000 UDP

16:32:35.782 CALL(SIP) (00:0004:00) RCVD PRACK from 10.129.45.102:8000 Cseq:2 with Via sent-by: 10.129.45.102 UDP

16:32:35.782 CALL(SIP) (00:0004:00) SENT 200 OK PRACK to 10.129.45.102:8000 UDP

 
 

Failure

21:16:47.845 CALL(SIP) (01:00004:00) SENT 421 Extension Required [PRACK support is required]
to 10.129.45.104:5060 Cseq:1

21:18:09.286 CALL(SIP) (01:00005:00) SENT 420 Bad Extension [Unsupported SIP request arrived at L3UA-TUC]
to 10.129.45.104:5060 Cseq:1

 SDP SUPPORT in PRACK 

Overview of SDP support in  SIP PRACK 

The IMG now supports embedding the SDP (Session Description Protocol) information within the PRACK message.  

PRACK sip:222@10.129.45.104:5060 SIP/2.0

Via: SIP/2.0/UDP 10.129.47.146:8000;branch=z9hG4bK3b1bce

0-22330

Max-Forwards: 70

From: sip:111@10.129.47.146:8000;tag=48346074

To: sip:222@10.129.45.104;tag=a94c095b773be1dd6e8d668a785a9c84904eaa2e

Call-ID: 11408@10.129.47.146

CSeq: 2 PRACK

RAck: 1 1 INVITE

Content-Type: application/sdp

Content-Length: 174

                       
 

v=0

o=_ 2890844527 2890844527 IN IP4 10.129.47.146

s=-

c=IN IP4 10.129.47.146

t=0 0

m=audio 9000 RTP/AVP 0 101

a=rtpmap:0 PCMU/8000

a=rtpmap:101 telephone-event/8000

  Above is a sample PRACK message that contains the SDP information in it. The IMG supports incoming PRACK with SDP support and all currently implemented rules of SDP decoding/overlap failure still apply. This means the following: 

  • An invalid SDP message will be ignored by the IMG
  • The IMG will accept a valid PRACK message which has invalid SDP information embedded. It will discard only the SDP portion of the PRACK message. (Media parameters will not change.)
  • The IMG does not support sending out a PRACK message with the SDP information embedded. It will only send out a PRACK message without the SDP information embedded. 

Troubleshooting

If you are experiencing problems with this feature, check the following:

  • Make sure PRACK is enabled in the SIP SGP
  • Make sure the correct SIP SGP is assigned to the External Gateway
  • The External Gateway must support PRACK.

============================================================================

Any incoming INVITE messages with a Require header field indicating a SIP extension that is not in this list of supported SIP extensions are automatically rejected with a 420 (Bad Extension) response. If an application supports 100rel, incoming INVITE messages with Supported or Require header fields for the 100rel SIP extension are exposed to the application. If the application does not support 100rel, incoming INVITE messages with Require header fields for 100rel are automatically rejected with a 420 response. Note that incoming INVITE messages with Supported header fields for 100rel are still exposed to the application as there is no requirement to support this extension even though the inviter supports it. When the application sends any INVITE message, the platform will automatically add Supported or Require header fields for 100rel depending on the reliability policy set for the session.

*******************************************************************************************************************************

No comments: