[asterisk-commits] file: branch 1.2 r60797 - /branches/1.2/apps/app_dial.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sun Apr 8 17:59:30 MST 2007


Author: file
Date: Sun Apr  8 19:59:29 2007
New Revision: 60797

URL: http://svn.digium.com/view/asterisk?view=rev&rev=60797
Log:
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)

Modified:
    branches/1.2/apps/app_dial.c

Modified: branches/1.2/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/apps/app_dial.c?view=diff&rev=60797&r1=60796&r2=60797
==============================================================================
--- branches/1.2/apps/app_dial.c (original)
+++ branches/1.2/apps/app_dial.c Sun Apr  8 19:59:29 2007
@@ -470,10 +470,12 @@
 							ast_verbose(VERBOSE_PREFIX_3 "Now forwarding %s to '%s/%s' (thanks to %s)\n", in->name, tech, stuff, o->chan->name);
 						/* Setup parameters */
 						o->chan = ast_request(tech, in->nativeformats, stuff, &cause);
-						if (!o->chan)
+						if (o->chan) {
+							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
-							ast_channel_inherit_variables(in, o->chan);
 					} else {
 						if (option_verbose > 2)
 							ast_verbose(VERBOSE_PREFIX_3 "Too many forwards from %s\n", o->chan->name);



More information about the asterisk-commits mailing list