Asterisk - The Open Source Telephony Project
18.5.0
|
Connect to festival. More...
#include "asterisk.h"
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <signal.h>
#include <fcntl.h>
#include <ctype.h>
#include <errno.h>
#include "asterisk/file.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/md5.h"
#include "asterisk/config.h"
#include "asterisk/utils.h"
#include "asterisk/lock.h"
#include "asterisk/app.h"
#include "asterisk/endian.h"
#include "asterisk/format_cache.h"
Go to the source code of this file.
Macros | |
#define | FESTIVAL_CONFIG "festival.conf" |
#define | MAXFESTLEN 2048 |
#define | MAXLEN 180 |
Functions | |
AST_MODULE_INFO_STANDARD_EXTENDED (ASTERISK_GPL_KEY, "Simple Festival Interface") | |
static int | festival_exec (struct ast_channel *chan, const char *vdata) |
static int | load_module (void) |
Load the module. More... | |
static int | send_waveform_to_channel (struct ast_channel *chan, char *waveform, int length, char *intkeys) |
static int | send_waveform_to_fd (char *waveform, int length, int fd) |
static char * | socket_receive_file_to_buff (int fd, int *size) |
static int | unload_module (void) |
Variables | |
static char * | app = "Festival" |
Connect to festival.
Definition in file app_festival.c.
#define FESTIVAL_CONFIG "festival.conf" |
Definition at line 66 of file app_festival.c.
Referenced by festival_exec(), and load_module().
#define MAXFESTLEN 2048 |
Definition at line 68 of file app_festival.c.
Referenced by festival_exec().
#define MAXLEN 180 |
Definition at line 67 of file app_festival.c.
AST_MODULE_INFO_STANDARD_EXTENDED | ( | ASTERISK_GPL_KEY | , |
"Simple Festival Interface" | |||
) |
Referenced by load_module().
|
static |
Definition at line 279 of file app_festival.c.
References args, ast_alloca, AST_APP_ARG, ast_config_destroy(), ast_config_load, ast_debug, AST_DECLARE_APP_ARGS, AST_DIGIT_ANY, AST_FILE_MODE, ast_free, ast_gethostbyname(), ast_log, AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero, ast_true(), ast_variable_retrieve(), CONFIG_STATUS_FILEINVALID, errno, FESTIVAL_CONFIG, host, LOG_ERROR, LOG_WARNING, MAXFESTLEN, MD5Final(), MD5Init(), MD5Update(), NULL, send_waveform_to_channel(), socket_receive_file_to_buff(), and text.
Referenced by load_module().
|
static |
Load the module.
Module loading including tests for configuration or dependencies. This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE, or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails tests return AST_MODULE_LOAD_FAILURE. If the module can not load the configuration file or other non-critical problem return AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
Definition at line 563 of file app_festival.c.
References app, ast_config_destroy(), ast_config_load, ast_log, AST_MODULE_INFO_STANDARD_EXTENDED(), AST_MODULE_LOAD_DECLINE, ast_register_application_xml, ASTERISK_GPL_KEY, CONFIG_STATUS_FILEINVALID, FESTIVAL_CONFIG, festival_exec(), LOG_ERROR, and LOG_WARNING.
|
static |
Definition at line 174 of file app_festival.c.
References ao2_bump, ao2_cleanup, ast_answer(), ast_channel_writeformat(), ast_debug, ast_format_slin, AST_FRAME_DTMF, AST_FRAME_VOICE, ast_frfree, AST_FRIENDLY_OFFSET, ast_indicate(), ast_log, ast_read(), ast_set_write_format(), AST_STATE_UP, ast_stopstream(), ast_waitfor(), ast_write(), ast_frame::frametype, ast_frame_subclass::integer, LOG_WARNING, ast_frame::offset, ast_frame::samples, send_waveform_to_fd(), and ast_frame::subclass.
Referenced by festival_exec().
|
static |
Definition at line 140 of file app_festival.c.
References ast_close_fds_above_n(), ast_log, ast_opt_high_priority, ast_safe_fork(), ast_set_priority(), c, and LOG_WARNING.
Referenced by send_waveform_to_channel().
|
static |
Definition at line 89 of file app_festival.c.
References ast_free, ast_malloc, ast_realloc, buff, c, NULL, and tmp().
Referenced by festival_exec().
|
static |
Definition at line 548 of file app_festival.c.
References app, and ast_unregister_application().
|
static |
Definition at line 87 of file app_festival.c.
Referenced by load_module(), and unload_module().