Re: [MMUSIC] Open source SIP/WebRTC real-time text integration

Lorenzo Miniero <lorenzo@meetecho.com> Wed, 18 December 2019 14:48 UTC

Return-Path: <lorenzo@meetecho.com>
X-Original-To: mmusic@ietfa.amsl.com
Delivered-To: mmusic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 530781201EA for <mmusic@ietfa.amsl.com>; Wed, 18 Dec 2019 06:48:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=aruba.it
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id U0t9ZoUVWjsZ for <mmusic@ietfa.amsl.com>; Wed, 18 Dec 2019 06:48:11 -0800 (PST)
Received: from smtpcmd13146.aruba.it (smtpcmd13146.aruba.it [62.149.156.146]) by ietfa.amsl.com (Postfix) with ESMTP id AEACE120112 for <mmusic@ietf.org>; Wed, 18 Dec 2019 06:48:10 -0800 (PST)
Received: from lminiero ([93.44.36.221]) by smtpcmd13.ad.aruba.it with bizsmtp id fSo82101B4mGZ9p01So8wN; Wed, 18 Dec 2019 15:48:09 +0100
Date: Wed, 18 Dec 2019 15:48:07 +0100
From: Lorenzo Miniero <lorenzo@meetecho.com>
To: Christer Holmberg <christer.holmberg@ericsson.com>
Cc: "mmusic@ietf.org" <mmusic@ietf.org>
Message-ID: <20191218154807.313f9dc7@lminiero>
In-Reply-To: <14EEE460-EA5C-436F-B987-003106DB01FA@ericsson.com>
References: <20191218120451.7dd7093b@lminiero> <14EEE460-EA5C-436F-B987-003106DB01FA@ericsson.com>
Organization: Meetecho
X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-redhat-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aruba.it; s=a1; t=1576680489; bh=hHadTt0zJHqg1rwMuKDqFJundqUMfaOfZc+t/3f2I+c=; h=Date:From:To:Subject:MIME-Version:Content-Type; b=FbRvgt0ssaPEDrhmrAauJ01qTfUgz5CnrgFaddCpKB0/tBZ0CbohulaxNgjnOgYbT dECfPTVUJ8YMVBMFBnY+DCgKAPBe3IKfOQz9wMnRJruX88dq7at2sRXx0qeXwVOFJo WxssrQVxjE9A7Eech7Z32tNyd00QGWQsG81SAMeGTV1GBiiQNY+DmuID8kdNjB1g1k m36EFcdk53Tg98HC9h8ioiSKgb1tpuFm0wK+JqB2aPSFkOlHqHM8h1rXgg3TBg0CVl J2kFzkDb6RHUi2B4OAyaZAUSsAvc9D5knprGrI7+4jF9gTvHZmtAaC3v7yt6vP5kL9 ZcMdwBl53uYEQ==
Archived-At: <https://mailarchive.ietf.org/arch/msg/mmusic/Cf6oMK3JxFrGIdojsZaDcYKjs1I>
Subject: Re: [MMUSIC] Open source SIP/WebRTC real-time text integration
X-BeenThere: mmusic@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Multiparty Multimedia Session Control Working Group <mmusic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/mmusic>, <mailto:mmusic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/mmusic/>
List-Post: <mailto:mmusic@ietf.org>
List-Help: <mailto:mmusic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/mmusic>, <mailto:mmusic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 18 Dec 2019 14:48:14 -0000

On Wed, 18 Dec 2019 13:58:06 +0000
Christer Holmberg <christer.holmberg@ericsson.com> wrote:

> Hi Lorenzo,
> 
> It's super nice to hear that you are implementing RTT over data
> channel! Feel free to keep us up to data as the work progress.
> 


Hi Christer, will do for sure!


> As far as browsers rejecting non-supported attributes is concerned, I
> think that is an issue that should be raised in W3C. As a temporary
> solution, could the JS app simply not remove them before passing the
> SDP to the browser?
> 


Actually I should clarify that it's what I *thought* would happen, as
I've seen it happening in the past in some cases. Anyway, I just tried
injecting some of those attributes in the SDP Janus sends to the
browser, i.e.:

	a=dcmap:1 label="JanusDataChannel";subprotocol="t140"
	a=dcsa:1 hlang-send:en
	a=dcsa:1 hlang-recv:en

and to my pleasant surprise Chrome didn't complain, so I was wrong in
that regard. It doesn't do anything with those attributes either,
though, which probably means they're completely ignored at the moment.
There's no trace of those in the answer, for instance, which means at
the moment the web application would have to munge the SDP to add those
values manually, something I try to avoid whenever possible.

That said, since the SIP endpoint I'm using for testing doesn't provide
any hint on what should be added there (e.g., in terms of supported
languages), my server wouldn't be able to come up with something to
negotiate there anyway. For labels, since this first integration only
supports 1-1 calls, I thought it safe to rely on the default label that
is opened when data channels are negotiated with Janus (the
"JanusDataChannel" you see listed in the snippet above).

Lorenzo


> Regards,
> 
> Christer
> 
> 
> 
> On 18/12/2019, 13.05, "mmusic on behalf of Lorenzo Miniero"
> <mmusic-bounces@ietf.org on behalf of lorenzo@meetecho.com> wrote:
> 
>     Hi all,
>     
>     as I anticipated in another post, I've recently started working
> with real-time text: mostly for fun (I've always been intrigued by the
>     protocol), but also because I wanted to get it working with
> WebRTC, especially in light of its importance for the upcoming NG
> emergency services. Considering Christer's recent efforts on
> standardizing how to use RTT on WebRTC, I thought I'd share this
> here, so that it can hopefully provide a testing framework: it is not
> complete, and doesn't adhere 100% to the specification yet (more on
> that in a minute), but I think it might be helpful as a running code
> reference anyway. 
>     Specifically, I've integrated support for real-time text in our
> open source Janus WebRTC server. Janus is a modular component, and
> one of the plugins implements a SIP gateway: this is where I
> implemented support for T.140 and red. The way it works is
> "straightforward": 
>     	1. Any time we get an incoming SIP call on the SIP side
> with an m=text m-line, we translate that to an m=application, so that
>     	we can negotiate data channels on the WebRTC side.
>     
>     	2. At the same time, if the WebRTC peer negotiates an
>     	m=application line, we turn that into an m=text section to
>     	negotiate real-time text on the SIP side.
>     
>     	3. Then, if we receive T.140 packets from SIP, we relay
> them via data channels using binary data (we use an Uint8Array in
>     	the web application); if we receive RED packets, we parse
> it in order to get the T.140 blocks we need, and relay those via data
>     	channels (since the draft explains redundancy is not
> needed, thanks to SCTP).
>     
>     	4. When we get T.140 blocks via data channels (which
> again the web application sends as an Uint8Array), we either send
> them as they are in RTP packets (if RED was not negotiated), or we
>     	create a RED RTP packet with redundant info on previously
> sent packets (if RED was negotiated instead).
>     
>     This is the effort in a nutshell, and from my simple tests it
> seems to be working as expected so far. You can find a more
> comprehensive description of the whole effort in this blog post:
>     
>     https://protect2.fireeye.com/v1/url?k=c2a19457-9e284e10-c2a1d4cc-0cc47ad93c18-c1355b6e18f62d8a&q=1&e=78bf43a6-cc22-44d8-bbaf-2cb644177cfa&u=https%3A%2F%2Fwww.meetecho.com%2Fblog%2Frealtime-text-sip-and-webrtc%2F
>     
>     The Janus branch supporting real-time text, instead, is here:
>     
>     https://protect2.fireeye.com/v1/url?k=ce273934-92aee373-ce2779af-0cc47ad93c18-c8ae4c94a2ec0095&q=1&e=78bf43a6-cc22-44d8-bbaf-2cb644177cfa&u=https%3A%2F%2Fgithub.com%2Fmeetecho%2Fjanus-gateway%2Fpull%2F1898
>     
>     As explained in the blog post, the effort is not complete, and
> there are some things that are either missing, or need to be
> improved, namely: 
>     	1. We're not using the dcmap and dcsa attributes on the
> WebRTC side yet: the reason is that browsers don't support them, at
>     	the moment, and so putting them there may result in the
> SDP being rejected and the session broken. This means that,
>     	currently, we use a default label for exchanging T.140
> blocks with the server.
>     
>     	2. While we support RED, we're not using the redundant
> info for packets we receive yet, and we're not properly handling
> packet loss or out of order packets yet either. This is something we
>     	plan to work on in the future, as I was more interested in
>     	getting the specification in general to work first.
>     
>     	3. On the client side in WebRTC, we're not doing any
> buffering, meaning we send every character as soon as we type it,
> which is clearly suboptimal. Again, something we plan to fix later on,
>     	either in the web application (buffer there), or on the
> server side (buffer incoming T.140 blocks there, before crafting RTP
>     	packets).
>     
>     I hope this will be considered useful, and I'm looking forward to
> keep on working on this as the specifications moves forward. If you
> have any questions or doubts, please don't hesitate to ask; besides,
> I'll be in Vancouver for the next IETF, so in case you want to talk
> about it in person there, see a demo, or make some interoperability
> tests, I'll be glad to do that as well.
>     
>     Thanks,
>     Lorenzo
>     
>     -- 
>     I'm getting older but, unlike whisky, I'm not getting any better
>     https://twitter.com/elminiero
>     
>     _______________________________________________
>     mmusic mailing list
>     mmusic@ietf.org
>     https://www.ietf.org/mailman/listinfo/mmusic
>     
> 



-- 
I'm getting older but, unlike whisky, I'm not getting any better
https://twitter.com/elminiero