[Freeswitch-dev] Detecting in-band DTMF Digits in Openzap?

Moises Silva moises.silva at gmail.com
Thu Aug 13 09:24:20 PDT 2009


On Wed, Aug 12, 2009 at 3:26 AM, Alex Green <alexg at etherstack.com> wrote:

> 2.:
> Setting an event callback and waiting for ZAP_EVENT_DTMF works for
> in-band digits on a PRI channel.
>

Are you just pointing out that it works for PRI or implying that does not
work for analog? for hardware DTMF I am sure this will NOT work, either for
PRI or Analog.


> 3.: Potential bug:
> As suggested by Moises, adding extra logging in libteletone_detect.c
> shows that digits were detected, but the ZAP_EVENT_DTMF events were
> *not* sent back for an analog channel (I am using an Openvox A800p, but
> it looks to be the same for all analog cards).
>

you mean libteletone detects it but ZAP_EVENT_DTMF is not launched? the next
test should be in zap_channel_read, which uses teletone_dtmf_detect and
teletone_dtmf_get to retrieve DTMF and queue the DTMF, there you will be
able to find out what is going on.

4.: Potential bug:
> DTMF digit detection *eats some audio* each time a digit is detected. If
> the device is connected directly to free switch this is not a problem.
> If a device makes a call through freeswitch (to let's say phone banking)
> a digit that is held down may be detected as 3 digits (sometimes more)
> due to the consumed audio. This can be heard on the other side of
> freeswitch as a start-stop at the start of the DTMF.
>

Indeed ZAP_CHANNEL_SUPRESS_DTMF causes zap_channel_read to memset the read
data each time a digit hit is found. The problem is that there is no
DTMF_START and DTMF_END events and the DTMF length is lost, we just have a
plain DTMF event for the start. Not sure about how to use libteletone to
detect the DTMF end though.

Anthony, Mike? care to comment about this one?

-- 
Moises Silva
Software Developer
Sangoma Technologies Inc. | 50 McIntosh Drive, Suite 120, Markham ON L3R 9T3
Canada
t. 1 905 474 1990 x 128 | e. moy at sangoma.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20090813/2037753e/attachment.html 


More information about the FreeSWITCH-dev mailing list