diff options
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r-- | apps/app_dial.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c index 178cd279a..524837f12 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -1397,7 +1397,10 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags 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)); + if (!ast_strlen_zero(chan->macroexten)) + ast_copy_string(tc->exten, chan->macroexten, sizeof(tc->exten)); + else + 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 */ |