[Asterisk-Dev] DTMF and Zaptel Native Bridging

Joel Daniels joeld at invtools.com
Mon Dec 6 16:08:30 MST 2004


I like the concept of native zaptel bridging, as this can reduce the round tip
latency on a zaptel to zaptel call to virtually zero.  However we can't use it
for our setup, because we need DTMF based call transfer, and once you enable
DTMF detection the native bridging code will not run.  What is really confusing
to me is that at the beginning of the zt_bridge(...) function in chan_zap.c, we
find this line of code:

if (flags & (AST_BRIDGE_DTMF_CHANNEL_0 | AST_BRIDGE_DTMF_CHANNEL_1))
    return -2

And in line with this we set ignoredtmf to 1 before calling ast_read(...)

But then we have specific DTMF processing code where we check to see if that
frame (which was read ignoring DTMF) might be DTMF, and whether or not
AST_BRIDGE_DTMF_CHANNEL_[0|1] is set, which it is certainly not:

if (f->frametype == AST_FRAME_DTMF) {
    if (((who == c0) && (flags & AST_BRIDGE_DTMF_CHANNEL_0)) ||
        ((who == c1) && (flags & AST_BRIDGE_DTMF_CHANNEL_1)) {

I tried commenting out the code that returned -2 if
AST_BRIDGE_DTMF_CHANNEL[0|1] was set, and commenting out the ignoredtmf
business, and the native bridge code seemed to work, with DTMF detection.  The
only problem is that the other side of the phone call hears the annoying DTMF
squeal, even as it is being detected, but I hope that by using the Conference
Muting/UnMuting DTMF stuff, I can fix this.

Any thoughts, is there a reason for all this guarding against DTMF, or is it
just a bug?

   - Joel Daniels




More information about the asterisk-dev mailing list