mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-07 02:18:15 +00:00
(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: https://origsvn.digium.com/svn/asterisk/branches/1.4@77778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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_setdestchan(transferer->cdr, transferee->name);
|
||||||
ast_cdr_setapp(transferer->cdr, "BLINDTRANSFER","");
|
ast_cdr_setapp(transferer->cdr, "BLINDTRANSFER","");
|
||||||
}
|
}
|
||||||
if (!transferee->pbx) {
|
if (!transferee->pbx)
|
||||||
/* Doh! Use our handy async_goto functions */
|
res = -1;
|
||||||
|
|
||||||
if (option_verbose > 2)
|
if (option_verbose > 2)
|
||||||
ast_verbose(VERBOSE_PREFIX_3 "Transferring %s to '%s' (context %s) priority 1\n"
|
ast_verbose(VERBOSE_PREFIX_3 "Transferring %s to '%s' (context %s) priority 1\n"
|
||||||
,transferee->name, xferto, transferer_real_context);
|
,transferee->name, xferto, transferer_real_context);
|
||||||
if (ast_async_goto(transferee, transferer_real_context, xferto, 1))
|
if (ast_async_goto(transferee, transferer_real_context, xferto, 1))
|
||||||
ast_log(LOG_WARNING, "Async goto failed :-(\n");
|
ast_log(LOG_WARNING, "Async goto failed :-(\n");
|
||||||
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);
|
|
||||||
}
|
|
||||||
check_goto_on_transfer(transferer);
|
check_goto_on_transfer(transferer);
|
||||||
return res;
|
return res;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user