Re: [Stox] core: response code mappings

Peter Saint-Andre <stpeter@stpeter.im> Mon, 19 August 2013 03:20 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 4C3D711E81A9 for <stox@ietfa.amsl.com>; Sun, 18 Aug 2013 20:20:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.116
X-Spam-Level:
X-Spam-Status: No, score=-102.116 tagged_above=-999 required=5 tests=[AWL=-0.387, 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 tCHGhJwQc7qh for <stox@ietfa.amsl.com>; Sun, 18 Aug 2013 20:20:12 -0700 (PDT)
Received: from stpeter.im (mailhost.stpeter.im [207.210.219.225]) by ietfa.amsl.com (Postfix) with ESMTP id 5E3E411E81A7 for <stox@ietf.org>; Sun, 18 Aug 2013 20:20:12 -0700 (PDT)
Received: from ergon.local (unknown [71.237.13.154]) (Authenticated sender: stpeter) by stpeter.im (Postfix) with ESMTPSA id 81A6C414F7; Sun, 18 Aug 2013 21:23:25 -0600 (MDT)
Message-ID: <52118EE9.3090002@stpeter.im>
Date: Sun, 18 Aug 2013 21:20:09 -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: "Olle E. Johansson" <oej@edvina.net>
References: <520EDFBB.90503@stpeter.im> <DF2E9C50-1E56-4434-B28C-0CEE44B251A6@edvina.net>
In-Reply-To: <DF2E9C50-1E56-4434-B28C-0CEE44B251A6@edvina.net>
X-Enigmail-Version: 1.5.2
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Cc: "stox@ietf.org" <stox@ietf.org>
Subject: Re: [Stox] core: response code mappings
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, 19 Aug 2013 03:20:17 -0000

Hi Olle, that is helpful feedback.

On 8/17/13 1:28 AM, Olle E. Johansson wrote:
> 
> 17 aug 2013 kl. 04:28 skrev Peter Saint-Andre <stpeter@stpeter.im>:
> 
>> The SIP Parameters Registry has a list of SIP response codes:
>>
>> http://www.iana.org/assignments/sip-parameters/sip-parameters.xml#sip-parameters-7
>>
>> A number of those are not specified in RFC 3261. Thus the question
>> arises: for which codes do we need to define mappings? We could define
>> mappings for all of them, but I wonder if that's advisable. Some of the
>> additional codes are specified in RFCs that update RFC 3261 (e.g., code
>> 440 from RFC 5393), whereas other codes are specified in "non-core" RFCs
>> that don't update RFC 3261 (e.g., code 470 from RFC 5360). Would it
>> perhaps make sense to map the "core" codes and not the "non-core" codes?
> 
> I don't really have any good answer. Can just look into the Asterisk code and see
> that we've implemented a selection... :-)
> 
> The important part is to have a generic mapping for 2xx, 3xx, 4xx, 5xx and 6xx codes,
> so that if a gateway gets an unknown code, it knows how to map it to something. In SIP,
> an unknown 4xx code is the same as 400 etc.

True. I think we can provide that information in the stox-core spec
(e.g., in XMPP <bad-request/> is like a default 400). That way, if an
entity encounters a response code that it doesn't understand, at least
it can map it appropriately.

> After years of struggling with translations between SIP and ISDN in the Asterisk core,
> I know that this is a hard problem. Especially in the case where you have SIP -> xmpp -> SIP 
> and want the same error code on the other side. You simply can't please everyone when
> mapping between two protocols.

Agreed. Those round-trip mappings are especially difficult, but it would
be good to look at a few examples because I think we'll end up at
default things like SIP 400 codes in a lot of situations. I'll
investigate the matter soon and post some proposed text to this list.


Peter

-- 
Peter Saint-Andre
https://stpeter.im/