WAS v8.5 > Develop applications > Develop SIP applications > Develop SIP applicationsDevelop SIP applications that support PRACK
A SIP response to an INVITE request can be final or provisional. Final responses are always sent reliably, but provisional responses typically are not. For cases where you need to send a provisional response reliably, we can use the PRACK (Provisional response acknowledgement) method.
For you to be able to develop applications that support PRACK, the following criteria must be met:
- The client that sends the INVITE request must put a 100rel tag in the Supported or the Require header to indicate the client supports PRACK.
- The SIP servlet must respond by invoking the sendReliably() method instead of the send() method to send the response.
PRACK is described in the following standards:
- RFC 3262 ("Reliability of Provisional Responses in the SIP"), which extends RFC 3261 ("SIP: Session Initiation Protocol"), adding PRACK and the option tag 100rel.
- Section 6.7.1 ("Reliable Provisional Responses") of JSR 116 ("SIP Servlet API v1.0").
- For an application acting as a proxy, do this:
- Make the application generate and send a reliable provisional response for any INVITE request that has no tag in the To field.
- For an application acting as a user agent client (UAC), do this:
- Make the application add the 100rel tag to outgoing INVITE requests. The option tag must appear in either the Supported header or the Require header.
- Within the application's doProvisionalResponse(...) method, prepare the application to create and send PRACK requests for incoming reliable provisional responses. The application must create the PRACK request on the response's dialog through a SipSession.createRequest(...) method, and it must set the RAck header according to RFC 3262 Section 7.2 ("RAck").
- The application that acts as an UAC will not receive doPrack( ) methods. The UAC sends INVITE and receives Reliable responses. When the UAC receives the Reliable response, it sends PRACK a request to the UAS and receives a 200 OK on the PRACK so it should next implement doResponse( ) in order to receive it.
- For an application acting as a user agent server (UAS), do this:
- If an incoming INVITE request requires the 100rel tag, trying to send a 101-199 response unreliably using the send() method causes an Exception.
- Make the application declare a SipErrorListener to receive noPrackReceived() events when a reliable provisional response is not acknowledged within 64*T1 seconds, where T1 is a SIP timer. Within the noPrackReceived() event processing, the application should generate and send a 5xx error response for the associated INVITE request per JSR 116 Section 6.7.1.
- Make the application have at most one outstanding, unacknowledged reliable provisional response. Trying to send another one before the first's acknowledgement results in an Exception.
- Verify the application enforces the RFC 3262 offer/answer semantics surrounding PRACK requests containing session descriptions. Specifically, a servlet must not send a 2xx final response if any unacknowledged provisional responses contained a session description.
Related
Browse all SIP topics
Reference:
SIP industry standards compliance