Re: [rtcweb] JSEP-03: O/A state machine and trickle ICE with forking

Harald Alvestrand <harald@alvestrand.no> Fri, 01 March 2013 10:53 UTC

Return-Path: <harald@alvestrand.no>
X-Original-To: rtcweb@ietfa.amsl.com
Delivered-To: rtcweb@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id AEE9221F8696 for <rtcweb@ietfa.amsl.com>; Fri, 1 Mar 2013 02:53:18 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -110.498
X-Spam-Level:
X-Spam-Status: No, score=-110.498 tagged_above=-999 required=5 tests=[AWL=0.100, BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-8, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AirsIUgKI7b4 for <rtcweb@ietfa.amsl.com>; Fri, 1 Mar 2013 02:53:17 -0800 (PST)
Received: from eikenes.alvestrand.no (eikenes.alvestrand.no [158.38.152.233]) by ietfa.amsl.com (Postfix) with ESMTP id E68BD21F8550 for <rtcweb@ietf.org>; Fri, 1 Mar 2013 02:53:16 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by eikenes.alvestrand.no (Postfix) with ESMTP id 0C7B439E09F for <rtcweb@ietf.org>; Fri, 1 Mar 2013 11:53:15 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at eikenes.alvestrand.no
Received: from eikenes.alvestrand.no ([127.0.0.1]) by localhost (eikenes.alvestrand.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Hm89GM1PkXD0 for <rtcweb@ietf.org>; Fri, 1 Mar 2013 11:53:13 +0100 (CET)
Received: from [193.157.215.103] (unknown [193.157.215.103]) by eikenes.alvestrand.no (Postfix) with ESMTPSA id CA7B639E05D for <rtcweb@ietf.org>; Fri, 1 Mar 2013 11:53:13 +0100 (CET)
Message-ID: <51308899.9050802@alvestrand.no>
Date: Fri, 01 Mar 2013 11:53:13 +0100
From: Harald Alvestrand <harald@alvestrand.no>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2
MIME-Version: 1.0
To: rtcweb@ietf.org
References: <7594FB04B1934943A5C02806D1A2204B10B6DE@ESESSMB209.ericsson.se> <CAOJ7v-0UTceYRjiTL2tPWhnJ914dsk54MYd1vvXAGLmp8ByztQ@mail.gmail.com> <7594FB04B1934943A5C02806D1A2204B10B98F@ESESSMB209.ericsson.se> <CAOJ7v-1VMjQ01J2vxJdwt0M7O7LiBeLLxDeUxCiKp4JRDH+ofA@mail.gmail.com>
In-Reply-To: <CAOJ7v-1VMjQ01J2vxJdwt0M7O7LiBeLLxDeUxCiKp4JRDH+ofA@mail.gmail.com>
Content-Type: multipart/alternative; boundary="------------060800010702090009080008"
Subject: Re: [rtcweb] JSEP-03: O/A state machine and trickle ICE with forking
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Real-Time Communication in WEB-browsers working group list <rtcweb.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/rtcweb>
List-Post: <mailto:rtcweb@ietf.org>
List-Help: <mailto:rtcweb-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 01 Mar 2013 10:53:18 -0000

On 02/28/2013 11:37 PM, Justin Uberti wrote:
>
>
>
> On Wed, Feb 27, 2013 at 10:57 PM, Christer Holmberg 
> <christer.holmberg@ericsson.com 
> <mailto:christer.holmberg@ericsson.com>> wrote:
>
>
>     Hi Justin,
>
>     Thanks for your response!
>
>     Comments inline, with an additional state machine question (Q_OA_3).
>
>
>     ------------------
>
>
>     >> Q_OA_1: As I have commented earlier, the state machine does not
>     support setting of remote offer when a
>     >> remote pranswer has been set. A JS SIP app may e.g. receive an
>     SDP answer in a reliable 18x response,
>     >> call setPranswer, and then receive an UPDATE on the same leg
>     with a new offer.
>     >
>     > Section 3.5.2, paragraph 2, attempts to provide a workaround for
>     this issue.
>
>     Section 3.5.2 talks about parallel forking, and how it can be
>     solved by creating a new PC, and then send an UPDATE to provide
>     the new PC information to the remote entity.
>
>     But, my issues is when the remote entity sends an UPDATE, with a
>     new offer. It's not even related to forking. See my example below:
>
>
>     BROWSER                         JS APP                REMOTE ENITTY
>
>         ------ create offer ----------
>                                                  -------- SDP Offer
>     1----------------->
>                                                 <------- SDP Answer 1
>     ----------------
>         ------ set pranswer ---------
>                                                 <------- SDP Offer 2
>     -------------------
>         ------ ??? ----------------------
>
>
>     ------------------
>
>
> Right. This is clearly a problem, but the reason it is a problem is 
> because the two sides don't agree on the state of the negotiation. In 
> a forking case, it would be handled via the mechanism I mentioned 
> above. In a non-forking case, this is not solvable even with cloning, 
> because the two sides are out of sync. The browser has to handle this 
> case by rejecting SDP Offer 2.
>

My understanding is that the mismatch is that the JS APP isn't giving a 
consistent story to the browser on whether the answer was final or not.
This sequence would work:

BROWSER                         JS APP      REMOTE ENITTY

     ------ create offer ----------
                                              -------- SDP Offer 
1----------------->
                                             <------- SDP Answer 1 
----------------
     ------ set remote pranswer(1) ---------
                                             <------- SDP Offer 2 
-------------------
     ------ set remote answer(1) -----
     ------ set remote offer(2) -----

that is, when the JS app gets the information that there's a new offer 
incoming, it realizes that Answer 1 needs to be treated as a final 
answer, and finalizes it before passing in the new offer.

(I'll leave it to others to argue about whether or not there needs to be 
a stable state between the set remote answer(1) and set remote offer(2))