90 char *path = NULL, filein[256], *filename =
"";
101 int ffactor = 320 * 80,
125 if (
args.argc > 1 &&
args.filename) {
126 filename =
args.filename;
138 for (res = 0; !res;) {
140 if (
ast_app_getdata(chan,
"dictate/enter_filename", filein,
sizeof(filein), 0) ||
150 len = strlen(base) + strlen(filein) + 2;
151 if (!path ||
len > maxlen) {
153 memset(path, 0,
len);
156 memset(path, 0, maxlen);
159 snprintf(path,
len,
"%s/%s", base, filein);
162 memset(&flags, 0,
sizeof(flags));
252 }
else if (digit < 0) {
270 }
else if (digit < 0) {
286 for (x = 0; x < speed; x++) {
301 int oflags = O_CREAT | O_WRONLY;
306 }
else if (digit < 0) {
int ast_safe_sleep(struct ast_channel *chan, int ms)
Wait for a specified amount of time, looking for hangups.
union ast_frame_subclass subclass
int ast_app_getdata(struct ast_channel *c, const char *prompt, char *s, int maxlen, int timeout)
Plays a stream and gets DTMF data from a channel.
#define ast_alloca(size)
call __builtin_alloca to ensure we get gcc builtin semantics
#define ast_test_flag(p, flag)
#define ast_toggle_flag(it, flag)
#define ast_set_flag(p, flag)
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
struct ast_frame * ast_read(struct ast_channel *chan)
Reads a frame.
int ast_set_read_format(struct ast_channel *chan, format_t format)
Sets read format on channel chan Set read format for channel to whichever component of "format" is be...
static force_inline int attribute_pure ast_strlen_zero(const char *s)
int ast_queue_frame(struct ast_channel *chan, struct ast_frame *f)
Queue one or more frames to a channel's frame queue.
#define ast_strdupa(s)
duplicate a string in memory from the stack
static int play_and_wait(struct ast_channel *chan, char *file, char *digits)
struct ast_frame * ast_readframe(struct ast_filestream *s)
Read a frame from a filestream.
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
enum ast_channel_state _state
struct ast_filestream * ast_writefile(const char *filename, const char *type, const char *comment, int flags, int check, mode_t mode)
Starts writing a file.
void ast_log(int level, const char *file, int line, const char *function, const char *fmt,...)
Used for sending a log message This is the standard logger function. Probably the only way you will i...
int ast_seekstream(struct ast_filestream *fs, off_t sample_offset, int whence)
Seeks into stream.
static void parse(struct mgcp_request *req)
int ast_closestream(struct ast_filestream *f)
Closes a stream.
int ast_write(struct ast_channel *chan, struct ast_frame *frame)
Write a frame to a channel This function writes the given frame to the indicated channel.
const char * ast_config_AST_SPOOL_DIR
Structure used to handle boolean flags.
#define ast_clear_flag(p, flag)
This structure is allocated by file.c in one chunk, together with buf_size and desc_size bytes of mem...
#define AST_FORMAT_SLINEAR
int ast_waitfor(struct ast_channel *chan, int ms)
Wait for input on a channel.
int ast_say_number(struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options)
says a number
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
int ast_writestream(struct ast_filestream *fs, struct ast_frame *f)
Writes a frame to a stream.
int ast_answer(struct ast_channel *chan)
Answer a channel.
Data structure associated with a single frame of data.
#define AST_APP_ARG(name)
Define an application argument.
enum ast_frame_type frametype
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
struct ast_filestream * stream
union ast_frame::@172 data
const ast_string_field language
struct ast_filestream * ast_openstream(struct ast_channel *chan, const char *filename, const char *preflang)
Opens stream for use in seeking, playing.
int ast_mkdir(const char *path, int mode)
Recursively create directory path.