Default to 128 when echo cancel is "yes"
authorMark Spencer <markster@digium.com>
Mon, 24 Mar 2003 20:33:33 +0000 (20:33 +0000)
committerMark Spencer <markster@digium.com>
Mon, 24 Mar 2003 20:33:33 +0000 (20:33 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@681 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c

index 3609057..9935b8d 100755 (executable)
@@ -6239,14 +6239,17 @@ int load_module()
                } else if (!strcasecmp(v->name, "callprogress")) {
                        callprogress = ast_true(v->value);
                } else if (!strcasecmp(v->name, "echocancel")) {
                } else if (!strcasecmp(v->name, "callprogress")) {
                        callprogress = ast_true(v->value);
                } else if (!strcasecmp(v->name, "echocancel")) {
-                       if (v->value && strlen(v->value))
+                       if (v->value && strlen(v->value)) {
                                y = atoi(v->value);
                                y = atoi(v->value);
-                       else
+                       } else
                                y = 0;
                        if ((y == 32) || (y == 64) || (y == 128) || (y == 256))
                                echocancel = y;
                                y = 0;
                        if ((y == 32) || (y == 64) || (y == 128) || (y == 256))
                                echocancel = y;
-                       else
+                       else {
                                echocancel = ast_true(v->value);
                                echocancel = ast_true(v->value);
+                               if (echocancel)
+                                       echocancel=128;
+                       }
                } else if (!strcasecmp(v->name, "hidecallerid")) {
                        hidecallerid = ast_true(v->value);
                } else if (!strcasecmp(v->name, "callreturn")) {
                } else if (!strcasecmp(v->name, "hidecallerid")) {
                        hidecallerid = ast_true(v->value);
                } else if (!strcasecmp(v->name, "callreturn")) {