[Freeswitch-dev] DTMF duration unit
Hi all, I don't clearly get what unit we should use in dtmf-duration parameters (core min-dtmf-duration / max-dtmf-duration and sofia dtmf-duration). The variable name and some parts of the code/wiki imply it's in milliseconds (for example in sofia.c, we can see a line saying profile->dtmf_duration = 100;). However, the default values in switch_types.h suggest the values should be based on timestamp like in RTP. Something like: minimum = 400 @ 8kHz => 50ms default = 2000 @ 8kHz => 250ms maximum = 192000 @ 8kHz => 24s If the later is the right one, should I change values when using WB codecs that are NOT sampling at 8kHz? Also, is the "unit" consistent across all endpoint modules? Thanks, François.
Reply to my own questions: On Mon, 2013-02-04 at 11:54 +0100, François Delawarde wrote:
I don't clearly get what unit we should use in dtmf-duration parameters (core min-dtmf-duration / max-dtmf-duration and sofia dtmf-duration).
"*dtmf-duration" variables should be specified in timestamp units, as in RFC-2833.
Also, is the "unit" consistent across all endpoint modules?
For SIP at least, the behavior seems a bit inconsistent: * RFC-2833, FS always specifies a timestamp rate 8000Hz (the default) in rtpmap (telephone-event/8000), so the default values are: min-dtmf-duration=400 => 50ms default-dtmf-duration=2000 => 250ms max-dtmf-duration=192000 => 24s * SIP INFO, FS feeds the same values into the "Duration=" header of SIP INFO messages, but these are interpreted as milliseconds, so when using SIP INFO, the default values end up being: min-dtmf-duration=400 => 400ms default-dtmf-duration=2000 => 2s max-dtmf-duration=192000 => 192s * INBAND, teletone probably uses milliseconds as well, did not check. So as long as you are using RFC-2833, everything should be okay. I don't know of any device requiring SIP INFO anyway, do you? I can open a jira if a dev confirms the behavior is not intended. Regards, François.
participants (1)
-
François Delawarde