Re: [rtcweb] The DTMF API [Was: Traffic should be encrypted. (Re: Let's define the purpose of WebRTC)]

Justin Uberti <juberti@google.com> Wed, 16 November 2011 06:13 UTC

Return-Path: <juberti@google.com>
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 77A2E21F9119 for <rtcweb@ietfa.amsl.com>; Tue, 15 Nov 2011 22:13:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.869
X-Spam-Level:
X-Spam-Status: No, score=-102.869 tagged_above=-999 required=5 tests=[AWL=0.107, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 zOD3btPGuHWe for <rtcweb@ietfa.amsl.com>; Tue, 15 Nov 2011 22:13:30 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by ietfa.amsl.com (Postfix) with ESMTP id 118B621F90DB for <rtcweb@ietf.org>; Tue, 15 Nov 2011 22:13:28 -0800 (PST)
Received: by iaeo4 with SMTP id o4so171096iae.31 for <rtcweb@ietf.org>; Tue, 15 Nov 2011 22:13:27 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:x-system-of-record; bh=qoWiKcldpw9xqgw/uSCpp8N4TT/0IrYHiS8xjuzkhHU=; b=jbHPPuz3ADGnaCt5fGc5wuEFbGY1oHP1ILbcmk9yprzz6wvjdn1KdoC3pukh9Uo+CC xaryDgGlc3CXozojegIQ==
Received: by 10.231.28.106 with SMTP id l42mr7147563ibc.66.1321424007446; Tue, 15 Nov 2011 22:13:27 -0800 (PST)
Received: by 10.231.28.106 with SMTP id l42mr7147554ibc.66.1321424007227; Tue, 15 Nov 2011 22:13:27 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.194.134 with HTTP; Tue, 15 Nov 2011 22:13:06 -0800 (PST)
In-Reply-To: <D666B5A5-BF2E-46B7-B97F-06C3736E8357@acmepacket.com>
References: <CAOJ7v-18cNX8xussOPXSEoFxAARu8WriL8XgxPVUXBrWhz=FFg@mail.gmail.com> <4EC28CF5.6000109@jesup.org> <D666B5A5-BF2E-46B7-B97F-06C3736E8357@acmepacket.com>
From: Justin Uberti <juberti@google.com>
Date: Wed, 16 Nov 2011 01:13:06 -0500
Message-ID: <CAOJ7v-3v5Zu9ZOuL3Qqu+aEDJ4a3cqH+oJ2yj_ewOpxKe=jA_g@mail.gmail.com>
To: Hadriel Kaplan <HKaplan@acmepacket.com>
Content-Type: multipart/alternative; boundary="001517740adc8c67d104b1d4004b"
X-System-Of-Record: true
Cc: Randell Jesup <randell-ietf@jesup.org>, "<rtcweb@ietf.org>" <rtcweb@ietf.org>
Subject: Re: [rtcweb] The DTMF API [Was: Traffic should be encrypted. (Re: Let's define the purpose of WebRTC)]
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: Wed, 16 Nov 2011 06:13:31 -0000

On Tue, Nov 15, 2011 at 9:43 PM, Hadriel Kaplan <HKaplan@acmepacket.com>wrote:

>
> On Nov 15, 2011, at 11:01 AM, Randell Jesup wrote:
>
> > The problem is you need a bunch more timing info that when it starts.
> DTMF is not just "this was played", though many use it that way.  DTMF has
> length as well, and that length may even be indeterminate.  Many SIP ATAs
> and the like only support sending DTMF as X ms on, Y ms off, but you'll
> note that those are often configurable, and the protocol is much more
> expressive than that.
> >
> > That said: we absolutely can decide that we only support only sending
> "now", and that the duration is fixed (or configurable).  For the uses
> we're talking about, that's probably sufficient.  Some odd PSTN-interop
> things have been known to use DTMF duration ("hold 4 to fast-forward" or
> "press and hold 5 to pan the security camera"), but they're rare IMHO, and
> PSTN interop isn't the prime usecase (and many/most other voip devices
> don't support press-and-hold anyways).  I'd be fine with this.
>
>
> You'd be surprised how many things use/need DTMF duration. :(
>
> It caused a lot of issues for certain Mobile/Cellular networks a long time
> ago where the cell phones couldn't generate a duration for DTMF - I can't
> remember if it was a limitation of the phones or the cellular technology,
> but it caused lots of user complaints.
> It also caused issues in H.323 because H.245 UII supported both indicating
> with/without duration and those sending without had problems talking to
> those needing it.
>
> Regardless, as an FYI - I had put the following DTMF API requirements in
> draft-kaplan-rtcweb-sip-interworking-requirements-01:
>
>      ----------------------------------------------------------------
>      A2-13           WebRTC MUST provide a means for the
>                      Browser to generate [RFC4733] DMTF RTP
>                      Events for at least the events 0-15, in
>                      an audio-type RTP packet stream.
>      ----------------------------------------------------------------
>      A2-14           WebRTC MAY provide a means for the
>                      Browser to receive [RFC4733] DMTF RTP
>                      Events for the events 0-15.
>      ----------------------------------------------------------------
>      A2-15           WebRTC MUST provide a means for the
>                      Javascript application to invoke [RFC4733]
>                      DTMF events to be generated, and their
>                      duration, with a default duration of 50ms.
>                      In other words, the Javascript should be
>                      able to tell the Browser to generate event
>                      "0" for 50ms based on a button click, for
>                      example.
>      ----------------------------------------------------------------
>      A2-16           WebRTC MUST provide a means for the
>                      Javascript application to enable or
>                      disable [RFC4733] use, per session.
>      ----------------------------------------------------------------
>
>
OK, how about

[Local]MediaStreamTrack.sendDTMF(in DOMString tones, in optional long
duration)

ex:
sendDTMF("1")  // plays tone 1 for 50 ms
sendDTMF("2", 200)  // plays tone 2 for 200 ms
sendDTMF("123")  // plays tones 1, 2, 3 in succession, each for 50 ms
sendDTMF("456", 200)  // plays tones 4, 5, 6 in succession, each for 200 ms