Re: Proposal: Fire a toneDiscarded event while discarding the invalid DTMF values.

On 2014-06-13 14:11, Makaraju, Maridi Raju (Raju) wrote:
>> On 13/06/14 10:00, Harald Alvestrand wrote:
>>> On 06/13/2014 07:47 AM, Justin Uberti wrote:
>>>> Passing in a bad string of tones seems like a programming error, and
>>>> we should throw an exception immediately.
>>
>> +1
>>
>>>>
>>>
>>> are you suggesting that all apps should be required to know how to strip
>>> +1 (707) 344-4489 to 17073444489, or are you suggesting a more complex
>>
>> IMO it should be required to know how to strip.
>
> [Raju] IMO, insertDTMF() API ignoring standard well-known phone
> numbers format separators (for readability) is probably better. These
> include "+-.()". This behavior makes webrtc consistent existing
> systems where these are mostly ignored. This also makes it consistent
> with webrtc handling of "," even though it is not a DTMF symbol.
> These separators are documented in
> http://www.ietf.org/rfc/rfc3601.txt . This RFC uses 'p' for pause
> instead of ','. I think ',' is widely accepted and is ok for webrtc
> use.
>
> I also agree with the comment that every app writing code to parse
> and remove these very common separators is un-necessary and may give
> bad taste for the API.

So if the general rule would be to throw on unrecognized characters. But 
we add common number separators, like "+-.()", to our list of 
recognized, but specially handled characters (to be ignored in this 
case). And then we don't notify the script when we simply skip over an 
ignored character.

That would work for me.

/Adam

Received on Friday, 13 June 2014 12:27:54 UTC