[Stox] STOX Error Condition/Response code translation

"De Vries, Michael [USA]" <devries_michael@bah.com> Mon, 15 July 2013 16:36 UTC

Return-Path: <prvs=9011ec0d2=devries_michael@bah.com>
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 9F2D621E80AC for <stox@ietfa.amsl.com>; Mon, 15 Jul 2013 09:36:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.729
X-Spam-Level:
X-Spam-Status: No, score=-5.729 tagged_above=-999 required=5 tests=[AWL=0.001, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, SARE_MLH_Stock1=0.87]
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 hUKJKxeS1m8q for <stox@ietfa.amsl.com>; Mon, 15 Jul 2013 09:36:35 -0700 (PDT)
Received: from mclniron02-ext.bah.com (mclniron02-ext.bah.com [128.229.5.22]) by ietfa.amsl.com (Postfix) with ESMTP id C6AC121E80E7 for <stox@ietf.org>; Mon, 15 Jul 2013 09:36:23 -0700 (PDT)
x-SBRS: None
X-REMOTE-IP: 10.12.10.216
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Ap8EAM0j5FEKDArY/2dsb2JhbABahAnBUoEpdIIlBTpRASoUQiYBBBu9eY8zg0NtA6w7gig
X-IPAS-Result: Ap8EAM0j5FEKDArY/2dsb2JhbABahAnBUoEpdIIlBTpRASoUQiYBBBu9eY8zg0NtA6w7gig
X-IronPort-AV: E=Sophos;i="4.89,670,1367985600"; d="scan'208";a="500768835"
Received: from ashbcshb05.resource.ds.bah.com ([10.12.10.216]) by mclniron02-int.bah.com with ESMTP; 15 Jul 2013 12:36:17 -0400
Received: from ASHBDAG1M2.resource.ds.bah.com ([169.254.2.93]) by ASHBCSHB05.resource.ds.bah.com ([10.12.10.216]) with mapi id 14.03.0123.003; Mon, 15 Jul 2013 12:36:17 -0400
From: "De Vries, Michael [USA]" <devries_michael@bah.com>
To: "stox@ietf.org" <stox@ietf.org>
Thread-Topic: STOX Error Condition/Response code translation
Thread-Index: Ac6BeW3GprYlO9XDTaec9Xmhavny5g==
Date: Mon, 15 Jul 2013 16:36:17 +0000
Message-ID: <D928759B0247C54198D70FCD4A07DD8E38E382C0@ASHBDAG1M2.resource.ds.bah.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.12.230.125]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: [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: Mon, 15 Jul 2013 16:36:40 -0000

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.  

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.


Thanks,
--Mike DeVries