diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-30 17:11:02 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-30 17:11:02 +0000 |
commit | 472195023eb301d80ea9560f8e5d94b496abd5bc (patch) | |
tree | 54c9164cdbce687baa99e4b40bf9f1c9507b14ae /res/res_features.c | |
parent | ffe4a02eeae9080e099c19bf8aee563859119503 (diff) |
(closes issue #10327)
Reported by: kkiely
Instead of directly mucking with the extension/context/priority of the channel we are transferring when it has a PBX simply call ast_async_goto on it. This will ensure that the channel gets handled properly and sent to the right place.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@77778 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_features.c')
-rw-r--r-- | res/res_features.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/res/res_features.c b/res/res_features.c index 1d616657f..acc966848 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -699,18 +699,14 @@ static int builtin_blindtransfer(struct ast_channel *chan, struct ast_channel *p ast_cdr_setdestchan(transferer->cdr, transferee->name); ast_cdr_setapp(transferer->cdr, "BLINDTRANSFER",""); } - if (!transferee->pbx) { - /* Doh! Use our handy async_goto functions */ - if (option_verbose > 2) - ast_verbose(VERBOSE_PREFIX_3 "Transferring %s to '%s' (context %s) priority 1\n" - ,transferee->name, xferto, transferer_real_context); - if (ast_async_goto(transferee, transferer_real_context, xferto, 1)) - ast_log(LOG_WARNING, "Async goto failed :-(\n"); + if (!transferee->pbx) res = -1; - } else { - /* Set the channel's new extension, since it exists, using transferer context */ - set_c_e_p(transferee, transferer_real_context, xferto, 0); - } + + if (option_verbose > 2) + ast_verbose(VERBOSE_PREFIX_3 "Transferring %s to '%s' (context %s) priority 1\n" + ,transferee->name, xferto, transferer_real_context); + if (ast_async_goto(transferee, transferer_real_context, xferto, 1)) + ast_log(LOG_WARNING, "Async goto failed :-(\n"); check_goto_on_transfer(transferer); return res; } else { |