[asterisk-commits] file: branch file/dialing_api r50225 - /team/file/dialing_api/main/dial.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Jan 9 18:54:47 MST 2007


Author: file
Date: Tue Jan  9 19:54:46 2007
New Revision: 50225

URL: http://svn.digium.com/view/asterisk?view=rev&rev=50225
Log:
We have to find the relative dial channel in order to get options.

Modified:
    team/file/dialing_api/main/dial.c

Modified: team/file/dialing_api/main/dial.c
URL: http://svn.digium.com/view/asterisk/team/file/dialing_api/main/dial.c?view=diff&rev=50225&r1=50224&r2=50225
==============================================================================
--- team/file/dialing_api/main/dial.c (original)
+++ team/file/dialing_api/main/dial.c Tue Jan  9 19:54:46 2007
@@ -495,8 +495,8 @@
 			channel->owner = NULL;
 		}
 		/* If ANSWER_EXEC is enabled as an option, execute application on answered channel */
-		if ((answer_exec = FIND_RELATIVE_OPTION(dial, channel, AST_DIAL_OPTION_ANSWER_EXEC)))
-			answer_exec_run(AST_LIST_FIRST(&dial->channels)->owner, answer_exec->app, answer_exec->args);
+		if ((channel = find_relative_dial_channel(dial, who)) && (answer_exec = FIND_RELATIVE_OPTION(dial, channel, AST_DIAL_OPTION_ANSWER_EXEC)))
+			answer_exec_run(who, answer_exec->app, answer_exec->args);
 	} else if (dial->status == AST_DIAL_RESULT_HANGUP) {
 		/* Hangup everything */
 		AST_LIST_TRAVERSE(&dial->channels, channel, list) {



More information about the asterisk-commits mailing list