aboutsummaryrefslogtreecommitdiffstats
path: root/app.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-04-03 17:58:19 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-04-03 17:58:19 +0000
commit0eab41e3fe17be10a6e1e38dc2eeefdf5ebd68dd (patch)
treeb9c5ae9bd4b531aae492404272f1fd0a256dd96f /app.c
parent1439e18f715e58315f4c3678133509b482843e15 (diff)
When doing a built-in blind or attended transfer, restore the ability to use '#'
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: http://svn.digium.com/svn/asterisk/branches/1.2@59886 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'app.c')
-rw-r--r--app.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/app.c b/app.c
index a47776904..bbd3bfdad 100644
--- 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))