diff --git a/apps/app_record.c b/apps/app_record.c
index 7c55e7a56cfac9f63a4ff69270416fbd12f18bb3..f84baa37a6253f6eb2ea44893570b27c5ec58dc4 100755
--- a/apps/app_record.c
+++ b/apps/app_record.c
@@ -105,6 +105,10 @@ static int record_exec(struct ast_channel *chan, void *data)
 		ext = strchr(filename, '.');
 		if (!ext)
 			ext = strchr(filename, ':');
+		if (ext) {
+			*ext = '\0';
+			ext++;
+		}
 	}
 	if (!ext) {
 		ast_log(LOG_WARNING, "No extension specified to filename!\n");