Re: [Stox] STOX Error Condition/Response code translation
Peter Saint-Andre <stpeter@stpeter.im> Thu, 18 July 2013 03:23 UTC
Return-Path: <stpeter@stpeter.im>
X-Original-To: stox@ietfa.amsl.com
Delivered-To: stox@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8788321F9A05 for <stox@ietfa.amsl.com>; Wed, 17 Jul 2013 20:23:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.056
X-Spam-Level:
X-Spam-Status: No, score=-102.056 tagged_above=-999 required=5 tests=[AWL=-0.327, BAYES_00=-2.599, SARE_MLH_Stock1=0.87, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FC+IZ3c24mve for <stox@ietfa.amsl.com>; Wed, 17 Jul 2013 20:23:28 -0700 (PDT)
Received: from stpeter.im (mailhost.stpeter.im [207.210.219.225]) by ietfa.amsl.com (Postfix) with ESMTP id 4E4F621F991F for <stox@ietf.org>; Wed, 17 Jul 2013 20:23:24 -0700 (PDT)
Received: from ergon.local (unknown [71.237.13.154]) (Authenticated sender: stpeter) by stpeter.im (Postfix) with ESMTPSA id 052E2413BC; Wed, 17 Jul 2013 21:24:53 -0600 (MDT)
Message-ID: <51E75FA9.7060104@stpeter.im>
Date: Wed, 17 Jul 2013 21:23:21 -0600
From: Peter Saint-Andre <stpeter@stpeter.im>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130620 Thunderbird/17.0.7
MIME-Version: 1.0
To: stox@ietf.org
References: <D928759B0247C54198D70FCD4A07DD8E38E382C0@ASHBDAG1M2.resource.ds.bah.com>
In-Reply-To: <D928759B0247C54198D70FCD4A07DD8E38E382C0@ASHBDAG1M2.resource.ds.bah.com>
X-Enigmail-Version: 1.5.1
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Subject: Re: [Stox] STOX Error Condition/Response code translation
X-BeenThere: stox@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: SIP-TO-XMPP Working Group discussion list <stox.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/stox>, <mailto:stox-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/stox>
List-Post: <mailto:stox@ietf.org>
List-Help: <mailto:stox-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/stox>, <mailto:stox-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 18 Jul 2013 03:23:33 -0000
Hi Mike, thank you very much for the feedback! On 7/15/13 10:36 AM, De Vries, Michael [USA] wrote: > Hello Everyone, > > The draft-ietf-stox-core-00 document specifies mappings between XMPP > error conditions and SIP response codes, but does not specify any > requirements/recommendations for handling the SIP "Reason-Phrase" in > the "Status-Line" header or the XMPP <text/> entry in the <error/> > block. According to the SIP and XMPP RFCs, the Reason-Phrase and > <error/> block appear to effectively serve the same purpose in > conveying additional error information intended for the human user, > so a direct translation between the two (when present) seems > reasonable to me. RFC 3261 says (Section 7.2): The Status-Code is a 3-digit integer result code that indicates the outcome of an attempt to understand and satisfy a request. The Reason-Phrase is intended to give a short textual description of the Status-Code. The Status-Code is intended for use by automata, whereas the Reason-Phrase is intended for the human user. A client is not required to examine or display the Reason-Phrase. And RFC 6120 says (Section 8.3.2): The <text/> element is OPTIONAL. If included, it is to be used only to provide descriptive or diagnostic information that supplements the meaning of a defined condition or application-specific condition. It MUST NOT be interpreted programmatically by an application. It SHOULD NOT be used as the error message presented to a human user, but MAY be shown in addition to the error message associated with the defined condition element (and, optionally, the application-specific condition element). Despite the caveat about clients not directly copying the <text/> element and using it as the error message shown to a user, I tend to agree that they are mostly equivalent and can reasonably be mapped to each other for interworking purposes. > Additionally, this could potentially help to distinguish errors which > are currently mapped down from many possibilities into a single > entry, such as SIP response codes 413-423 (and others) all being > mapped to the <bad-request/> XMPP Error Condition, assuming that the > SIP responses provide a Reason-Phrase. Additionally, it may even be > possible to provide the additional distinguishing information in the > XMPP <text/> block even if the SIP response does not contain a > Reason-Phrase for direct translation. > > For example: Assume the XMPP-SIP gateway receives a SIP 415 response > code (Unsupported Media Type) in response to some gateway-mediated > action between an XMPP user and SIP user. As per the > draft-ieftf-stox-core-00 document, this response code should be > translated and sent to the XMPP user effectively as: > > <error type='modify'> <bad-request > xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/> </error> > > > If this 415 response contains a Reason-Phrase (though it does not > appear to be mandated as per RFC3261), then the gateway could instead > send to the XMPP user: > > <error type='modify'> <bad-request > xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/> <text xml:lang='en' > xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'> [ ... Reason-Phrase > translated here ... ] </text> </error> > > > Additionally, if this 415 response does not contain a Reason-Phrase, > then the gateway could send the following to the XMPP user as a means > of distinguishing from other <bad-request/> errors: > > <error type='modify'> <bad-request > xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/> <text xml:lang='en' > xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'> Unsupported Media Type > </text> </error> > > > Similarly, a 416 response (Unsupported URI Scheme) without a > Reason-Phrase could be translated into: > > <error type='modify'> <bad-request > xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/> <text xml:lang='en' > xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'> Unsupported URI Scheme > </text> </error> > > > thus distinguishing between the 415 and 416 responses for the XMPP > human user, but effectively requiring some textual injection into the > message stream by the gateway which would need to be specified in the > document. That said, as these fields are all optional and not > related to actual SIP/XMPP application-level handling of messages, > there is no reason that the XMPP-SIP gateway must perform such a > translation, but I figured it might be worth exploring in this > discussion group. IMHO your proposal is reasonable as suggested behavior, although I don't think it rises to the level of a MUST or SHOULD requirement. I will look into it further and propose some text on the list. Peter -- Peter Saint-Andre https://stpeter.im/
- [Stox] STOX Error Condition/Response code transla… De Vries, Michael [USA]
- Re: [Stox] STOX Error Condition/Response code tra… Peter Saint-Andre