diff --git a/apps/app_dial.c b/apps/app_dial.c
index 3ce59e78145ca5b24294b44cf53665ce7b993d4e..8bec88b7692112d6e63cfd4958a71f533d3db382 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1722,7 +1722,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
 
 		if (!res) {
 			if (calldurationlimit > 0) {
-				chan->whentohangup = time(NULL) + calldurationlimit;
+				peer->whentohangup = time(NULL) + calldurationlimit;
 			}
 			if (!ast_strlen_zero(dtmfcalled)) { 
 				if (option_verbose > 2)