diff --git a/CHANGES b/CHANGES
index 3060634ed35cceea6ec6736c03f24921478badc3..ced6e455d553a0a1e76ddd05ed747225d9a03b58 100644
--- a/CHANGES
+++ b/CHANGES
@@ -94,6 +94,12 @@ Dialplan Functions
      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
 -------------
   * A new option, 'I' has been added to both app_queue and app_dial.
diff --git a/main/features.c b/main/features.c
index f8ab00498c55e96fb635a8ba218eec984cc38994..2e8bb175d433777b8dee989bbd5939c9f0bca491 100644
--- a/main/features.c
+++ b/main/features.c
@@ -2074,6 +2074,13 @@ static int feature_exec_app(struct ast_channel *chan, struct ast_channel *peer,
 
 	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);