Subject: Error when the SDP is bad in a SIP request

From: "Scott Petrack"<[email-masked]>
Date: Fri, 19 Jun 1998 04:16:11 +0200

From: Scott Petrack@VOCALTEC on 06/19/98 04:16 AM

I am writing the PINT I-D, and I am still looking for the "right" way to
have the SIP server return an error if it is a
perfectly good SIP server that doesn't understand the GSTN tag. Perhaps the
question is a hole in SIP:

Suppose a SIP server gets a request whose SIP is perfectly well formed,
but whose payload is malformed, say
an badly formed SDP description. Is it  "400 Bad Request" --  even when the
SIP is perfect, and only the SDP is bad.

If the answer is "400 Bad Request" is there any way for the server to
return the offending line back to the client  (or first offending line if
there are several?). This would solve my problem -- a SIP server that
doesn't understand PINT would just choke on the "malformed" GSTN tag.   I
could bend the "Warning:" to suit this purpose, but I'm not sure that this
is correct.

If there is no way to for the server to indicate the bad line, then I will
use a "Require: ietf.pint.GSTN"  tag whenever the SDP description has a
GSTN tag in it. This will allow the server to return the fact that it
doesn't understand GSTN. But this is pretty horrible, it seems to me. It
complicates both client and server unecessarily, and the solution is much
less generic than just having the server return the offending line in the
"Bad Request" response.

Scott Petrack
VocalTec Communications Ltd.
[email-masked]

---

From: Henning Schulzrinne <[email-masked]>
Date: Fri, 19 Jun 1998 17:41:17 -0400

> could bend the "Warning:" to suit this purpose, but I'm not sure that this

This is probably the best solution. You don't really want to mix SIP and
SDP (since there may be others in the future) too much. My suggestion:
define a MIME type text/errors that simply lists (compiler style, if you
like) the erroneous lines. E.g.,

12: codec 79 not supported
13: country code +99 not understood

Alternatively, if you want standardized numeric error codes, the Warning
messages are appropriate.

> ---------
> This message came from the IETF PINT Working Group Mailing List.

-- 
Henning Schulzrinne         email: [email-masked]
Dept. of Computer Science   phone: +1 732 949 8344 (at Bell Labs)
Columbia University         fax:   +1 212 666-0140
New York, NY 10027          URL:   http://www.cs.columbia.edu/~hgs

---

From: Mark Handley <[email-masked]>
Date: Fri, 19 Jun 1998 18:04:38 -0400

>> could bend the "Warning:" to suit this purpose, but I'm not sure that this

There are two distinct cases - when the SDP is illegal syntax, and
when the SDP is legal but conveys a session you cannot participate in.

"400 Bad Request" seems appropriate for the former, but "606 Not
Acceptable" should be used for the latter.  I would hope the PINT SDP
is legal SDP syntax, just indicating a format or media that this
server doesn't understand, and so 606 would be the appropriate
response.

This leads me to realise we're missing a warning code - there should
be a "606.X Incompatible Media" warning code to complement
Incompatible Format and Incompatible Protocol, although at a pinch
Incompatible Protocol could serve this purpose.

We could also add a "4xx Malformed Payload" response code, but I don't
see we gain that much by doing so as it won't change the client's
behaviour - it would only be useful for debugging and as Henning
states, a textual payload in a 400 reponse would be fine for that
purpose.

Mark