diff --git a/apps/app_dial.c b/apps/app_dial.c
index 665e714faf295dc9e3db90b4feb9daca9ce8a1ae..52190378545cb7d3d8026147d6c62ae7e8ae0b6c 100755
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -222,6 +222,9 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
 							else
 								ast_log(LOG_WARNING, "Out of memory\n");
 						}
+						if (o->chan->rdnis) 
+							free(o->chan->rdnis);
+						in->rdnis = strdup(in->exten);
 						if (ast_call(o->chan, tmpchan, 0)) {
 							ast_log(LOG_NOTICE, "Failed to dial on local channel for call forward to '%s'\n", tmpchan);
 							o->stillgoing = 0;