diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-01-04 18:30:53 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-01-04 18:30:53 +0000 |
commit | 921618f045d1c97dcf48dc6f29e3fd19ecfa8fff (patch) | |
tree | 969f91cd16917ecf49d5340e0cb86b33d55a090f /main/pbx.c | |
parent | 739aac8ba868103875b01c611911761c4326237d (diff) |
Merged revisions 237406 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r237406 | tilghman | 2010-01-04 12:28:28 -0600 (Mon, 04 Jan 2010) | 23 lines
Merged revisions 237405 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r237405 | tilghman | 2010-01-04 12:19:00 -0600 (Mon, 04 Jan 2010) | 16 lines
Add a flag to disable the Background behavior, for AGI users.
This is in a section of code that relates to two other issues, namely
issue #14011 and issue #14940), one of which was the behavior of
Background when called with a context argument that matched the current
context. This fix broke FreePBX, however, in a post-Dial situation.
Needless to say, this is an extremely difficult collision of several
different issues. While the use of an exception flag is ugly, fixing all
of the issues linked is rather difficult (although if someone would like
to propose a better solution, we're happy to entertain that suggestion).
(closes issue #16434)
Reported by: rickead2000
Patches:
20091217__issue16434.diff.txt uploaded by tilghman (license 14)
20091222__issue16434__1.6.1.diff.txt uploaded by tilghman (license 14)
Tested by: rickead2000
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@237409 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/pbx.c')
-rw-r--r-- | main/pbx.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/main/pbx.c b/main/pbx.c index 186bad365..3785092ad 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -8876,8 +8876,13 @@ static int pbx_builtin_background(struct ast_channel *chan, void *data) * (but a longer extension COULD have matched), it would have previously * gone immediately to the "i" extension, but will now need to wait for a * timeout. + * + * Later, we had to add a flag to disable this workaround, because AGI + * users can EXEC Background and reasonably expect that the DTMF code will + * be returned (see #16434). */ - if ((exten[0] = res) && + if (!ast_test_flag(chan, AST_FLAG_DISABLE_WORKAROUNDS) && + (exten[0] = res) && ast_canmatch_extension(chan, args.context, exten, 1, chan->cid.cid_num) && !ast_matchmore_extension(chan, args.context, exten, 1, chan->cid.cid_num)) { snprintf(chan->exten, sizeof(chan->exten), "%c", res); |