[asterisk-commits] rmudgett: branch certified-11.6 r419662 - in /certified/branches/11.6: ./ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jul 25 18:27:12 CDT 2014


Author: rmudgett
Date: Fri Jul 25 18:27:08 2014
New Revision: 419662

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=419662
Log:
features.c: Allow appliationmap to use Gosub.

Using DYNAMIC_FEATURES with a Gosub application as the mapped application
does not work.  It does not work because Gosub just pushes the current
dialplan context, exten, and priority onto a stack and sets the specified
Gosub location.  Gosub does not have a dialplan execution loop to run
dialplan like Macro.

* Made the DYNAMIC_FEATURES application mapping feature call
ast_app_exec_macro() and ast_app_exec_sub() for the Macro and Gosub
applications respectively.

* Backported ast_app_exec_macro() and ast_app_exec_sub() from v11 to
execute dialplan routines from the DYNAMIC_FEATURES application mapping
feature.

NOTE: This issue does not affect v12+ because it already does what this
patch implements.

AST-1391 #close
Reported by: Guenther Kelleter

Review: https://reviewboard.asterisk.org/r/3844/
........

Merged revisions 419630 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 419631 from http://svn.asterisk.org/svn/asterisk/branches/11

Modified:
    certified/branches/11.6/   (props changed)
    certified/branches/11.6/main/features.c

Propchange: certified/branches/11.6/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: certified/branches/11.6/main/features.c
URL: http://svnview.digium.com/svn/asterisk/certified/branches/11.6/main/features.c?view=diff&rev=419662&r1=419661&r2=419662
==============================================================================
--- certified/branches/11.6/main/features.c (original)
+++ certified/branches/11.6/main/features.c Fri Jul 25 18:27:08 2014
@@ -3526,7 +3526,13 @@
 	if (!ast_strlen_zero(feature->moh_class))
 		ast_moh_start(idle, feature->moh_class, NULL);
 
-	res = pbx_exec(work, app, feature->app_args);
+	if (!strcasecmp("Gosub", feature->app)) {
+		res = ast_app_exec_sub(NULL, work, feature->app_args, 0);
+	} else if (!strcasecmp("Macro", feature->app)) {
+		res = ast_app_exec_macro(NULL, work, feature->app_args);
+	} else {
+		res = pbx_exec(work, app, feature->app_args);
+	}
 
 	if (!ast_strlen_zero(feature->moh_class))
 		ast_moh_stop(idle);




More information about the asterisk-commits mailing list