dimas at dataart.com
Mon Jan 21 19:53:04 CST 2008
I've got no response to the mail below. I would like to completely remove support for DSP_DIGIMODE_MUTECONF from DSP code unless someone has idea what it is for. Please comment.
From: Dmitry Andrianov
Sent: Monday, December 17, 2007 10:20 PM
To: Asterisk Developers Mailing List
Does anyone remember the idea behind DSP_DIGITMODE_MUTECONF option?
I stuck at it while trying to nail down problems with Zap channels muted for some reason. Although DSP_DIGITMODE_MUTECONF probably is not related to my problems at the end, I spent some time looking at the code and got some questions. First of all it looks like that code may be outdated and does not perform any real job now. If it does, things are a bit worse because if my understanding is right - the code is broken.
In short it looks like the code does some simple de-bouncing for DTMF digits and sends AST_FRAME_DTMF with subclass 'm' (MUTE) before first digit and AST_FRAME_DTMF with subclass 'u' (UNMUTE) after the last.
1. I'm not really sure why this is needed at all because AFAIK digit-detection code in the dtmf_detect removes DTMF tones when it finds digits anyway (unless NOQUELCH flag is passed)
2. dtmf_detect also does de-bouncing.
3. I do not understand for what reason app_queue.c sets CONFMUTE option on Zap channels (using ast_channel_setoption( ... AST_OPTION_TONE_VERIFY...)
4. Chan_zap seems to be the one real user for 'm'/'u' frames but I'm nit sure what it does with them.
I'll appreciate if someone could shed some light on the DSP_DIGITMODE_MUTECONF / AST_OPTION_TONE_VERIFY stuff.
PS: why I consider implementation broken:
(note that I got these items only observing the code, not under real tests)
1. While __ast_dsp_digitdetect returns the same digit, the code will be generating AST_FRAME_DTMF_BEGIN frames for that digit over and over
2. When digit changes without going thru 0 (for example '5' changes to '4' without a inter-digit interval), the code will be repeatedly generating AST_FRAME_DTMF_END only for the first digit in sequence (because dsp->thinkdigit = digit; is missing)
3. It will never send 'u' (UNMUTE) frame because dsp->thinkdigit needs to be 'x' for that while when the last digit was terminated (digit became 0), the dsp->thinkdigit will be set to 0 and will never get 'x'
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the asterisk-dev