]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
(closes issue #10415)
authorJoshua Colp <jcolp@digium.com>
Tue, 14 Aug 2007 15:27:13 +0000 (15:27 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 14 Aug 2007 15:27:13 +0000 (15:27 +0000)
Reported by: atis
Revert fix for #10327 as it causes more issues then it solves.

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

res/res_features.c

index acc966848c881ab1781058913873ac39a08a2cb0..1d616657f4a32b4a09a0aef2f3557f64da4d2d22 100644 (file)
@@ -699,14 +699,18 @@ 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)
+               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");
                        res = -1;
-               
-               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");
+               } 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);
                return res;
        } else {