diff --git a/apps/app_dial.c b/apps/app_dial.c
index 47fdc5b79c5a6b2eed3022d6a8809d37772018a9..178cd279ae7fea60f14011b05c34a96860806fa8 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1393,7 +1393,10 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
 			ast_app_group_set_channel(tc, outbound_group);
 
 		/* Inherit context and extension */
-		ast_copy_string(tc->dialcontext, chan->context, sizeof(tc->dialcontext));
+		if (!ast_strlen_zero(chan->macrocontext))
+			ast_copy_string(tc->dialcontext, chan->macrocontext, sizeof(tc->dialcontext));
+		else
+			ast_copy_string(tc->dialcontext, chan->context, sizeof(tc->dialcontext));
 		ast_copy_string(tc->exten, chan->exten, sizeof(tc->exten));
 
 		res = ast_call(tc, numsubst, 0);	/* Place the call, but don't wait on the answer */