71 #define path_BIN "/usr/bin/"
72 #define path_LOCAL "/usr/local/bin/"
74 static char *
app =
"ICES";
89 dup2(fd, STDIN_FILENO);
98 execlp(
"ices2",
"ices", filename,
SENTINEL);
100 ast_debug(1,
"Couldn't find ices version 2, attempting to use ices version 1.\n");
104 execlp(
"ices",
"ices", filename,
SENTINEL);
120 char filename[256]=
"";
132 flags = fcntl(fds[1], F_GETFL);
133 fcntl(fds[1], F_SETFL, flags | O_NONBLOCK);
155 if (((
char *)data)[0] ==
'/')
160 c = strchr(filename,
'|');
176 ast_debug(1,
"Null frame == hangup() detected\n");
183 if (
errno != EAGAIN) {
199 if (!res && oreadformat)
Main Channel structure associated with a channel.
static int ices_exec(struct ast_channel *chan, const char *data)
#define AST_MODULE_INFO_STANDARD(keystr, desc)
Asterisk locking-related definitions:
Asterisk main include file. File version handling, generic pbx functions.
int ast_safe_fork(int stop_reaper)
Common routine to safely fork without a chance of a signal handler firing badly in the child...
Support for translation of data formats. translate.c.
struct ast_frame * ast_read(struct ast_channel *chan)
Reads a frame.
static int icesencode(char *filename, int fd)
Generic File Format Support. Should be included by clients of the file handling routines. File service providers should instead include mod_format.h.
static int unload_module(void)
int ast_unregister_application(const char *app)
Unregister an application.
static int load_module(void)
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...
#define ast_debug(level,...)
Log a DEBUG message.
General Asterisk PBX channel definitions.
Asterisk file paths, configured in asterisk.conf.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
Asterisk internal frame definitions.
Core PBX routines and definitions.
int ast_set_priority(int)
We set ourselves to a high priority, that we might pre-empt everything else. If your PBX has heavy ac...
const char * ast_config_AST_CONFIG_DIR
enum ast_channel_state _state
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...
void ast_close_fds_above_n(int n)
Common routine for child processes, to close all fds prior to exec(2)
#define AST_FORMAT_SLINEAR
int ast_waitfor(struct ast_channel *chan, int ms)
Wait for input on a channel.
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
int ast_answer(struct ast_channel *chan)
Answer a channel.
Application convenience functions, designed to give consistent look and feel to Asterisk apps...
Data structure associated with a single frame of data.
enum ast_frame_type frametype
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
union ast_frame::@172 data
int ast_stopstream(struct ast_channel *c)
Stops a stream.
#define ast_register_application_xml(app, execute)
Register an application using XML documentation.
#define ASTERISK_FILE_VERSION(file, version)
Register/unregister a source code file with the core.
#define ast_opt_high_priority