[asterisk-commits] jpeeler: trunk r214309 - in /trunk: CHANGES main/features.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Aug 26 18:13:24 CDT 2009
Author: jpeeler
Date: Wed Aug 26 18:13:19 2009
New Revision: 214309
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=214309
Log:
Add two new dialplan variables when using features
Added DYNAMIC_FEATURENAME which holds the last triggered dynamic feature.
Added DYNAMIC_PEERNAME which holds the unique channel name on the other side
and is set when a dynamic feature is triggered.
(closes issue #14663)
Reported by: tamiel
Patches:
20090313_features.diff uploaded by tamiel (license 712)
Tested by: tamiel
Modified:
trunk/CHANGES
trunk/main/features.c
Modified: trunk/CHANGES
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/CHANGES?view=diff&rev=214309&r1=214308&r2=214309
==============================================================================
--- trunk/CHANGES (original)
+++ trunk/CHANGES Wed Aug 26 18:13:19 2009
@@ -93,6 +93,12 @@
disabled)
voice - voice mode (returns from FAX mode, reverting the changes that
were made when FAX mode was requested)
+
+Dialplan Variables
+------------------
+ * Added DYNAMIC_FEATURENAME which holds the last triggered dynamic feature.
+ * Added DYNAMIC_PEERNAME which holds the unique channel name on the other side
+ and is set when a dynamic feature is triggered.
Queue changes
-------------
Modified: trunk/main/features.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/features.c?view=diff&rev=214309&r1=214308&r2=214309
==============================================================================
--- trunk/main/features.c (original)
+++ trunk/main/features.c Wed Aug 26 18:13:19 2009
@@ -2074,6 +2074,13 @@
ast_autoservice_start(idle);
+ if(work && idle) {
+ pbx_builtin_setvar_helper(work, "DYNAMIC_PEERNAME", idle->name);
+ pbx_builtin_setvar_helper(idle, "DYNAMIC_PEERNAME", work->name);
+ pbx_builtin_setvar_helper(work, "DYNAMIC_FEATURENAME", feature->sname);
+ pbx_builtin_setvar_helper(idle, "DYNAMIC_FEATURENAME", feature->sname);
+ }
+
if (!ast_strlen_zero(feature->moh_class))
ast_moh_start(idle, feature->moh_class, NULL);
More information about the asterisk-commits
mailing list