]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
When doing a built-in blind or attended transfer, restore the ability to use '#'
authorRussell Bryant <russell@russellbryant.com>
Tue, 3 Apr 2007 17:58:19 +0000 (17:58 +0000)
committerRussell Bryant <russell@russellbryant.com>
Tue, 3 Apr 2007 17:58:19 +0000 (17:58 +0000)
to terminate the number and immediately do the transfer instead of having to
dial the number and just wait for the feature digit timeout.
(issue #8366, xueliangliang)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59886 65c4cc65-6c06-0410-ace0-fbb531ad65f3

app.c

diff --git a/app.c b/app.c
index a477769042f8208bc9336b8daab767cd2dee80dd..bbd3bfdad68014727ebd2b73122cb2db149869fe 100644 (file)
--- a/app.c
+++ b/app.c
@@ -84,14 +84,11 @@ int ast_app_dtget(struct ast_channel *chan, const char *context, char *collect,
                        ast_playtones_stop(chan);
                if (res < 1)
                        break;
+               if (res == '#')
+                       break;
                collect[x++] = res;
-               if (!ast_matchmore_extension(chan, context, collect, 1, chan->cid.cid_num)) {
-                       if (collect[x-1] == '#') {
-                               /* Not a valid extension, ending in #, assume the # was to finish dialing */
-                               collect[x-1] = '\0';
-                       }
+               if (!ast_matchmore_extension(chan, context, collect, 1, chan->cid.cid_num))
                        break;
-               }
        }
        if (res >= 0) {
                if (ast_exists_extension(chan, context, collect, 1, chan->cid.cid_num))