diff options
author | Matthew Fredrickson <creslin@digium.com> | 2007-05-09 17:35:54 +0000 |
---|---|---|
committer | Matthew Fredrickson <creslin@digium.com> | 2007-05-09 17:35:54 +0000 |
commit | e2ca869abd42b284914b95006de8fa11cf9a1ca2 (patch) | |
tree | 679ecd68200b660cf58f2b903ff8a9ffc5310f71 /channels/chan_zap.c | |
parent | 7e10164e20ad18e3fbb2c86d1d9d016b5d35aedb (diff) |
Merged revisions 63654 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r63654 | mattf | 2007-05-09 12:25:21 -0500 (Wed, 09 May 2007) | 10 lines
Merged revisions 63653 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r63653 | mattf | 2007-05-09 12:20:20 -0500 (Wed, 09 May 2007) | 2 lines
Make sure we only create a DSP if it's requested on SUB_REAL
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_zap.c')
-rw-r--r-- | channels/chan_zap.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 78e30bccf..5f3c23fb9 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -5580,26 +5580,28 @@ static struct ast_channel *zt_new(struct zt_pvt *i, int state, int startpbx, int i->subs[index].linear = 0; zt_setlinear(i->subs[index].zfd, i->subs[index].linear); features = 0; - if (i->busydetect && CANBUSYDETECT(i)) - features |= DSP_FEATURE_BUSY_DETECT; - if ((i->callprogress & 1) && CANPROGRESSDETECT(i)) - features |= DSP_FEATURE_CALL_PROGRESS; - if ((!i->outgoing && (i->callprogress & 4)) || - (i->outgoing && (i->callprogress & 2))) { - features |= DSP_FEATURE_FAX_DETECT; - } + if (index == SUB_REAL) { + if (i->busydetect && CANBUSYDETECT(i)) + features |= DSP_FEATURE_BUSY_DETECT; + if ((i->callprogress & 1) && CANPROGRESSDETECT(i)) + features |= DSP_FEATURE_CALL_PROGRESS; + if ((!i->outgoing && (i->callprogress & 4)) || + (i->outgoing && (i->callprogress & 2))) { + features |= DSP_FEATURE_FAX_DETECT; + } #ifdef ZT_TONEDETECT - x = ZT_TONEDETECT_ON | ZT_TONEDETECT_MUTE; - if (ioctl(i->subs[index].zfd, ZT_TONEDETECT, &x)) { + x = ZT_TONEDETECT_ON | ZT_TONEDETECT_MUTE; + if (ioctl(i->subs[index].zfd, ZT_TONEDETECT, &x)) { #endif - i->hardwaredtmf = 0; - features |= DSP_FEATURE_DTMF_DETECT; + i->hardwaredtmf = 0; + features |= DSP_FEATURE_DTMF_DETECT; #ifdef ZT_TONEDETECT - } else if (NEED_MFDETECT(i)) { - i->hardwaredtmf = 1; - features |= DSP_FEATURE_DTMF_DETECT; - } + } else if (NEED_MFDETECT(i)) { + i->hardwaredtmf = 1; + features |= DSP_FEATURE_DTMF_DETECT; + } #endif + } if (features) { if (i->dsp) { if (option_debug) |