Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv17936/channels
Modified Files:
chan_zap.c
Log Message:
Handle DTMF properly when combined with other events
Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.536
retrieving revision 1.537
diff -u -d -r1.536 -r1.537
--- chan_zap.c 27 Oct 2005 02:19:37 -0000 1.536
+++ chan_zap.c 5 Nov 2005 22:30:31 -0000 1.537
@@ -2937,7 +2937,10 @@
val = 0;
ioctl(p->subs[SUB_REAL].zfd, ZT_TONEDETECT, &val);
#endif
-
+ if (!p->hardwaredtmf && p->dsp) {
+ p->dsp_features &= ~DSP_FEATURE_DTMF_DETECT;
+ ast_dsp_set_features(p->dsp, p->dsp_features);
+ }
}
static void enable_dtmf_detect(struct zt_pvt *p)
@@ -2952,6 +2955,10 @@
val = ZT_TONEDETECT_ON | ZT_TONEDETECT_MUTE;
ioctl(p->subs[SUB_REAL].zfd, ZT_TONEDETECT, &val);
#endif
+ if (!p->hardwaredtmf && p->dsp) {
+ p->dsp_features |= DSP_FEATURE_DTMF_DETECT;
+ ast_dsp_set_features(p->dsp, p->dsp_features);
+ }
}
static enum ast_bridge_result zt_bridge(struct ast_channel *c0, struct
ast_channel *c1, int flags, struct ast_frame **fo, struct ast_channel **rc, int
timeoutms)
@@ -3198,7 +3205,7 @@
if (f->frametype == AST_FRAME_DTMF) {
if ((who == c0) && p0->pulsedial) {
ast_write(c1, f);
- } else if (p1->pulsedial) {
+ } else if ((who == c1) && p1->pulsedial) {
ast_write(c0, f);
} else {
*fo = f;
_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs