Don't split unless it's got echo training
authorMark Spencer <markster@digium.com>
Fri, 20 Aug 2004 21:07:10 +0000 (21:07 +0000)
committerMark Spencer <markster@digium.com>
Fri, 20 Aug 2004 21:07:10 +0000 (21:07 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3628 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c

index b06ec1d..f11d02b 100755 (executable)
@@ -1635,7 +1635,7 @@ static int zt_call(struct ast_channel *ast, char *rdest, int timeout)
                        snprintf(p->dop.dialstr, sizeof(p->dop.dialstr), "M*%s#", c + p->stripmsd);
                } else 
                        snprintf(p->dop.dialstr, sizeof(p->dop.dialstr), "T%sw", c + p->stripmsd);
-               if (strlen(p->dop.dialstr) > 4) {
+               if (p->echotraining && (strlen(p->dop.dialstr) > 4)) {
                        memset(p->echorest, 'w', sizeof(p->echorest) - 1);
                        strcpy(p->echorest + (p->echotraining / 400) + 1, p->dop.dialstr + strlen(p->dop.dialstr) - 2);
                        p->echorest[sizeof(p->echorest) - 1] = '\0';