]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 60797 via svnmerge from
authorJoshua Colp <jcolp@digium.com>
Mon, 9 Apr 2007 01:03:14 +0000 (01:03 +0000)
committerJoshua Colp <jcolp@digium.com>
Mon, 9 Apr 2007 01:03:14 +0000 (01:03 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r60797 | file | 2007-04-08 20:59:29 -0400 (Sun, 08 Apr 2007) | 2 lines

When calling a device that then forwards us elsewhere... we have to make our channels compatible if it is the only channel being dialed. (issue #9445 reported by marcelbarbulescu)

........

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

apps/app_dial.c

index 21362443ff1133408f1b7d3de586ec23985a864c..d253800f4db71772e5d6924fc8bb95a6d8370399 100644 (file)
@@ -492,11 +492,12 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l
                                                cause = AST_CAUSE_BUSY;
                                        } else {
                                                /* Setup parameters */
-                                               c = o->chan = ast_request(tech, in->nativeformats, stuff, &cause);
-                                               if (!c)
-                                                       ast_log(LOG_NOTICE, "Unable to create local channel for call forward to '%s/%s' (cause = %d)\n", tech, stuff, cause);
-                                               else
+                                               if ((c = o->chan = ast_request(tech, in->nativeformats, stuff, &cause))) {
+                                                       if (single)
+                                                               ast_channel_make_compatible(o->chan, in);
                                                        ast_channel_inherit_variables(in, o->chan);
+                                               } else
+                                                       ast_log(LOG_NOTICE, "Unable to create local channel for call forward to '%s/%s' (cause = %d)\n", tech, stuff, cause);
                                        }
                                } else {
                                        if (option_verbose > 2)