Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
RTCDtmfSender Sync #215
The latest WebRTC 1.0 API specification (see http://w3c.github.io/webrtc-pc/archives/20150611/webrtc.html#rtcdtmfsender) provides a revised Peer-to-peer DTMF API in Section 7 which extends the RTCRtpSender interface. This issue was filed to track differences between the WebRTC 1.0 RTCDtmfSender and the ORTC API RTCDtmfSender.
Looking over the text, the major difference between WebRTC 1.0 and ORTC API is that WebRTC 1.0 contains the following text describing insertDTMF in Section 7.2.2:
The tones parameter is treated as a series of characters. The characters 0 through 9, A through D, #, and * generate the associated DTMF tones. The characters a to d are equivalent to A to D. The character ',' indicates a delay of 2 seconds before processing the next character in the tones parameter. All other characters must be considered unrecognized.
The duration parameter indicates the duration in ms to use for each character passed in the tones parameters. The duration cannot be more than 6000 ms or less than 40 ms. The default duration is 100 ms for each tone.
The interToneGap parameter indicates the gap between tones. It must be at least 30 ms. The default value is 70 ms.
The browser may increase the duration and interToneGap times to cause the times that DTMF start and stop to align with the boundaries of RTP packets but it must not increase either of them by more than the duration of a single RTP audio packet.
When the insertDTMF() method is invoked, the user agent must run the following steps:
Set the object's toneBuffer attribute to the value of the first argument, the duration attribute to the value of the second argument, and the interToneGap attribute to the value of the third argument.