91{
   92    char *path = 
NULL, filein[256], *filename = 
"";
 
   93    char *parse;
   97    );
   98    char dftbase[256];
   99    char *base;
  103    int ffactor = 320 * 80,
  104        res = 0,
  106        lastop = 0,
  108        speed = 1,
  111        maxlen = 0,
  112        mode = 0;
  114 
  119    } else
  121 
  124    } else {
  125        base = dftbase;
  126    }
  127    if (
args.argc > 1 && 
args.filename) {
 
  128        filename = 
args.filename;
 
  129    }
  134        return -1;
  135    }
  136 
  139    }
  141    for (res = 0; !res;) {
  143            if (
ast_app_getdata(chan, 
"dictate/enter_filename", filein, 
sizeof(filein), 0) ||
 
  145                res = -1;
  146                break;
  147            }
  148        } else {
  150            filename = "";
  151        }
  153        len = strlen(base) + strlen(filein) + 2;
 
  154        if (!path || 
len > maxlen) {
 
  157            memset(path, 0, 
len);
 
  159        } else {
  160            memset(path, 0, maxlen);
  161        }
  162 
  163        snprintf(path, 
len, 
"%s/%s", base, filein);
 
  166        memset(&flags, 0, sizeof(flags));
  170        speed = 1;
  171        res = 0;
  172        lastop = 0;
  173        samples = 0;
  179            }
  181                int got = 1;
  182                switch(mode) {
  185                    case '1':
  188                        break;
  189                    case '2':
  190                        speed++;
  191                        if (speed > 4) {
  192                            speed = 1;
  193                        }
  195                        break;
  196                    case '7':
  200                        }
  202                        break;
  203                    case '8':
  206                        break;
  207 
  208                    default:
  209                        got = 0;
  210                    }
  211                    break;
  214                    case '1':
  217                        break;
  218                    case '8':
  220                        lastop = 0;
  221                        break;
  222                    default:
  223                        got = 0;
  224                    }
  225                    break;
  226                default:
  227                    got = 0;
  228                }
  229                if (!got) {
  231                    case '#':
  233                        continue;
  234                        break;
  235                    case '*':
  239                        } else {
  241                        }
  242                        break;
  243                    case '0':
  246                        switch(mode) {
  249                            break;
  252                            break;
  253                        }
  256                        } 
else if (
digit < 0) {
 
  258                            break;
  259                        }
  260                        break;
  261                    }
  262                }
  263 
  265                switch(mode) {
  267                    int x;
  274                            } 
else if (
digit < 0) {
 
  275                                break;
  276                            }
  277                        }
  282                                break;
  285                        }
  287                    }
  288 
  290                        for (x = 0; x < speed; x++) {
  296                            } else {
  299                            }
  300                        }
  301                    }
  302                    break;
  305                        int oflags = O_CREAT | O_WRONLY;
  310                            } 
else if (
digit < 0) {
 
  311                                break;
  312                            }
  313                        }
  317                            oflags |= O_TRUNC;
  319                        } else {
  320                            oflags |= O_APPEND;
  321                        }
  326                        } else {
  328                        }
  329                    }
  332                    }
  333                    break;
  334                }
  335 
  336            }
  337 
  339        }
  340    }
  342    if (oldr) {
  345    }
  346    return 0;
  347}
static int play_and_wait(struct ast_channel *chan, char *file, char *digits)
#define ast_toggle_flag(it, flag)
#define ast_strdupa(s)
duplicate a string in memory from the stack
#define ast_malloc(len)
A wrapper for malloc()
#define ao2_ref(o, delta)
Reference/unreference an object and return the old refcount.
#define ao2_bump(obj)
Bump refcount on an AO2 object by one, returning the object.
void ast_channel_stream_set(struct ast_channel *chan, struct ast_filestream *value)
int ast_waitfor(struct ast_channel *chan, int ms)
Wait for input on a channel.
int ast_queue_frame(struct ast_channel *chan, struct ast_frame *f)
Queue one or more frames to a channel's frame queue.
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.
struct ast_frame * ast_read(struct ast_channel *chan)
Reads a frame.
int ast_set_read_format(struct ast_channel *chan, struct ast_format *format)
Sets read format on channel chan.
const char * ast_channel_language(const struct ast_channel *chan)
int ast_answer(struct ast_channel *chan)
Answer a channel.
int ast_safe_sleep(struct ast_channel *chan, int ms)
Wait for a specified amount of time, looking for hangups.
struct ast_format * ast_channel_readformat(struct ast_channel *chan)
ast_channel_state
ast_channel states
struct ast_filestream * ast_openstream(struct ast_channel *chan, const char *filename, const char *preflang)
Opens stream for use in seeking, playing.
struct ast_frame * ast_readframe(struct ast_filestream *s)
Read a frame from a filestream.
int ast_writestream(struct ast_filestream *fs, struct ast_frame *f)
Writes a frame to a stream.
int ast_seekstream(struct ast_filestream *fs, off_t sample_offset, int whence)
Seeks into stream.
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.
int ast_closestream(struct ast_filestream *f)
Closes a stream.
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
#define AST_APP_ARG(name)
Define an application argument.
enum ast_getdata_result 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_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
const char * ast_config_AST_SPOOL_DIR
int ast_say_number(struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options)
says a number
static force_inline int attribute_pure ast_strlen_zero(const char *s)
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
This structure is allocated by file.c in one chunk, together with buf_size and desc_size bytes of mem...
Structure used to handle boolean flags.
Data structure associated with a single frame of data.
struct ast_frame_subclass subclass
enum ast_frame_type frametype
#define ast_test_flag(p, flag)
#define ast_clear_flag(p, flag)
int ast_mkdir(const char *path, int mode)
Recursively create directory path.
#define ast_set_flag(p, flag)