[asterisk-commits] mmichelson: branch 1.4 r91273 - /branches/1.4/apps/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Dec 5 16:35:52 CST 2007


Author: mmichelson
Date: Wed Dec  5 16:35:52 2007
New Revision: 91273

URL: http://svn.digium.com/view/asterisk?view=rev&rev=91273
Log:
The 'G' option for Dial() did not properly handle the case where only a label was
provided. This was due to the fact that the answering channel did not have an extension
set, so ast_parseable_goto would fail. This fix eliminates the call to ast_parseable_goto
on the answering channel since it is a wasteful call. The answering channel and the calling
channel are both directed to the same extension and context, just different priorities, so
we can just copy the values from the calling channel to the answering channel and increment
the answering channel's priority.

(closes issue #11382, reported by jon, patch by me with correction by jon)


Modified:
    branches/1.4/apps/app_dial.c
    branches/1.4/apps/app_voicemail.c

Modified: branches/1.4/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_dial.c?view=diff&rev=91273&r1=91272&r2=91273
==============================================================================
--- branches/1.4/apps/app_dial.c (original)
+++ branches/1.4/apps/app_dial.c Wed Dec  5 16:35:52 2007
@@ -1528,8 +1528,10 @@
 		if (chan && peer && ast_test_flag(&opts, OPT_GOTO) && !ast_strlen_zero(opt_args[OPT_ARG_GOTO])) {
 			replace_macro_delimiter(opt_args[OPT_ARG_GOTO]);
 			ast_parseable_goto(chan, opt_args[OPT_ARG_GOTO]);
-			ast_parseable_goto(peer, opt_args[OPT_ARG_GOTO]);
-			peer->priority++;
+			/* peer goes to the same context and extension as chan, so just copy info from chan*/
+			ast_copy_string(peer->context, chan->context, sizeof(peer->context));
+			ast_copy_string(peer->exten, chan->exten, sizeof(peer->exten));
+			peer->priority = chan->priority + 2;
 			ast_pbx_start(peer);
 			hanguptree(outgoing, NULL);
 			if (continue_exec)

Modified: branches/1.4/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_voicemail.c?view=diff&rev=91273&r1=91272&r2=91273
==============================================================================
--- branches/1.4/apps/app_voicemail.c (original)
+++ branches/1.4/apps/app_voicemail.c Wed Dec  5 16:35:52 2007
@@ -6493,9 +6493,7 @@
 	/* Set language from config to override channel language */
 	if (!ast_strlen_zero(vmu->language))
 		ast_string_field_set(chan, language, vmu->language);
-#ifndef IMAP_STORAGE
 	create_dirpath(vms.curdir, sizeof(vms.curdir), vmu->context, vms.username, "");
-#endif
 	/* Retrieve old and new message counts */
 	if (option_debug)
 		ast_log(LOG_DEBUG, "Before open_mailbox\n");




More information about the asterisk-commits mailing list