diff --git a/file.c b/file.c
index b3e92e3156d131a318a32d451d3b9ddcfcaff4d7..fa0eb259d3e6d32099dc5b50e28180bb97cbb896 100755
--- a/file.c
+++ b/file.c
@@ -524,7 +524,9 @@ static int ast_readaudio_callback(void *data)
 	}
 	if (whennext != s->lasttimeout) {
 #ifdef ZAPTEL_OPTIMIZATIONS
-		ast_settimeout(s->owner, whennext, ast_readaudio_callback, s);
+		if (s->timingfd > -1)
+			ast_settimeout(s->owner, whennext, ast_readaudio_callback, s);
+		else
 #else
 		s->owner->streamid = ast_sched_add(s->owner->sched, whennext/8, ast_readaudio_callback, s);
 #endif