}
return res;
}
+
+int ast_control_streamfile(struct ast_channel *chan, char *file,char *f,char *r,int skipms) {
+ int res;
+ if ((res = ast_streamfile(chan, file, chan->language)))
+ ast_log(LOG_WARNING, "Unable to stream file %s\n", file);
+ if (!res)
+ res = ast_waitstream_fr(chan, AST_DIGIT_ANY,f,r,skipms);
+ return res;
+}
+
static int wait_file(struct ast_channel *chan, struct vm_state *vms, char *file)
{
- int res;
- if ((res = ast_streamfile(chan, file, chan->language)))
- ast_log(LOG_WARNING, "Unable to play message %s\n", file);
- if (!res)
- res = ast_waitstream_fr(chan, AST_DIGIT_ANY, "#", "*",skipms);
- return res;
+
+ return ast_control_streamfile(chan,file,"#","*",skipms);
+
}
static int play_message_datetime(struct ast_channel *chan, struct ast_vm_user *vmu, char *origtime, char *filename)
//! Stream a filename (or file descriptor) as a generator.
int ast_linear_stream(struct ast_channel *chan, const char *filename, int fd, int allowoverride);
+//! Stream a file with fast forward and reverse.
+int ast_control_streamfile(struct ast_channel *chan, char *file,char *f,char *r,int skipms);
+
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif