Index: main/file.c =================================================================== --- main/file.c (revision 66997) +++ main/file.c (working copy) @@ -1093,8 +1093,13 @@ int ast_waitstream_full(struct ast_channel *c, const char *breakon, int audiofd, int cmdfd) { - return waitstream_core(c, breakon, NULL, NULL, 0, - audiofd, cmdfd, NULL /* no context */); + if (audiofd > -1 && cmdfd > -1) { + return waitstream_core(c, breakon, NULL, NULL, 0, + audiofd, cmdfd, NULL /* no context */); + } else { + return waitstream_core(c, breakon, NULL, NULL, 0, + -1, -1, NULL /* no context */); + } } int ast_waitstream_exten(struct ast_channel *c, const char *context)