]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge Script <automerge@asterisk.org>
Wed, 9 May 2007 18:18:21 +0000 (18:18 +0000)
committerAutomerge Script <automerge@asterisk.org>
Wed, 9 May 2007 18:18:21 +0000 (18:18 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@63696 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c

index 3dea1aa5d37c96927bbd358ad44aa54d568b487e..4d8d91440764377b126abb442fa5a4613f93166f 100644 (file)
@@ -5191,28 +5191,30 @@ 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) {
                                ast_log(LOG_DEBUG, "Already have a dsp on %s?\n", tmp->name);