Re: problem with sending provisional response with Requiresheader

"Jeroen van Bemmel" <[email protected]> Thu, 21 Dec 2006 20:19:13 +0100
Newsgroups gmane.comp.voip.nist-sip
Message-ID <003d01c72534$e64e80a0$0601a8c0@BEMBUSTER>
Jim,

You are right. Fixed in CVS

Regards,
Jeroen
  ----- Original Message ----- 
  From: Barton, Jim
  To: [email protected]
  Sent: Thursday, December 21, 2006 1:43 AM
  Subject: [nist-sip] problem with sending provisional response with 
Requiresheader




  I am getting the following exception from the nist-sip stack when 
attempting to send a 183 provisional response for an INVITE which does not 
have a Requires header but does have a Supported 100rel header:



  javax.sip.SipException: No require header in the request

          at 
gov.nist.javax.sip.stack.SIPDialog.createReliableProvisionalResponse(SIPDialog.java:2350)



  The INVITE being responded to is:



  INVITE sip:[email protected]:5091 SIP/2.0

  Call-ID: [email protected]!

  CSeq: 1 INVITE

  From: <sip:[email protected]:5090>;tag=12345

  To: <sip:[email protected]:5091>

  Via: SIP/2.0/UDP 
127.0.0.1:5090;branch=z9hG4bK6af4c36e7910883c0c1a5fd12412a996

  Max-Forwards: 70

  Contact: <sip:[email protected]:5090>

  Supported: 100rel

  Allow: 
INVITE,OPTIONS,BYE,CANCEL,ACK,PRACK,UPDATE,SUBSCRIBE,NOTIFY,INFO,REGISTER,REFER

  Content-Length: 0



  I notice that this problem is an exception thrown in 
SIPDialog.createReliableProvisionalResponse based solely on the condition 
that the INVITE has no Requires header:



              if (request.getHeader(Supported.NAME) == null)

                          throw new SipException("No Suported header in the 
request");



              if (request.getHeader(RequireHeader.NAME) == null)

                          throw new SipException("No require header in the 
request");



   However, the comment in this method (which I assume might be a quote from 
the RFC) states the following:



                          /*

                           * A UAS MUST NOT attempt to send a 100 (Trying) 
response reliably. Only

                           * provisional responses numbered 101 to 199 may 
be sent reliably. If

                           * the request did not include either a Supported 
or Require header

                           * field indicating this feature, the UAS MUST NOT 
send the provisional

                           * response reliably.

                           */



  My interpretation of the above is that the request must have either have a 
Requires header OR a Supported header. The code, however, appears to 
implement a logical AND of these two conditions by insisting that both 
headers be provided. Unless my interpretation is wrong, I think this code is 
unnecessarily restrictive.



  Thanks,



  Jim Barton













------------------------------------------------------------------------------


  _______________________________________________
  nist-sip mailing list
  [email protected]
  http://www-x.antd.nist.gov/mailman/listinfo/nist-sip

_______________________________________________
nist-sip mailing list
[email protected]
http://www-x.antd.nist.gov/mailman/listinfo/nist-sip