This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25976 - DTMFSender.insertDTMF steps should validate the values of duration and interToneGap.
Summary: DTMFSender.insertDTMF steps should validate the values of duration and interT...
Status: RESOLVED FIXED
Alias: None
Product: WebRTC Working Group
Classification: Unclassified
Component: WebRTC API (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Web RTC Working Group
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-04 09:33 UTC by Kiran
Modified: 2014-06-09 08:35 UTC (History)
2 users (show)

See Also:


Attachments

Description Kiran 2014-06-04 09:33:02 UTC
The steps of insertDTMF should validate values of duration and interToneGap before assigning.

Following step can be added to validate it.

3. If the values of duration or interToneGap are out of the specified range, return and abort these steps.

or

3. If the values of duration or interToneGap are out of the specified range, throw the corresponding error and abort these steps.
Comment 1 Adam Bergkvist 2014-06-08 15:22:07 UTC
This has been talked about before and if I remember correctly we decided not to throw, but to clamp the input values to the valid ranges.

Something like:

x. If duration is less than 40 ms, let duration be 40 ms. Otherwise, if duration is greater than 6000 ms, let duration be 6000 ms.
Comment 2 Adam Bergkvist 2014-06-09 08:35:58 UTC
Added default values to the idl and updated the algorithm.

Proposed fix: https://github.com/fluffy/webrtc-w3c/commit/02f5a3ac13c9c343747be75b8d8a2a874d5b8d8c

Closing bug.