36 #include "asterisk/file.h"
58 static char *
app =
"WaitForRing";
70 if (!data || (sscanf(data,
"%30lg", &s) != 1)) {
84 timeout_ms = s * 1000.0;
98 ast_verb(3,
"Got a ring but still waiting for timeout\n");
117 ast_verb(3,
"Got a ring after the timeout\n");
union ast_frame_subclass subclass
Main Channel structure associated with a channel.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
Asterisk locking-related definitions:
Asterisk main include file. File version handling, generic pbx functions.
struct ast_frame * ast_read(struct ast_channel *chan)
Reads a frame.
struct timeval ast_tvnow(void)
Returns current timeval. Meant to replace calls to gettimeofday().
#define ast_opt_transmit_silence
int ast_unregister_application(const char *app)
Unregister an application.
#define ast_verb(level,...)
General Asterisk PBX channel definitions.
Core PBX routines and definitions.
struct ast_silence_generator * ast_channel_start_silence_generator(struct ast_channel *chan)
Starts a silence generator on the given channel.
int ast_remaining_ms(struct timeval start, int max_ms)
Calculate remaining milliseconds given a starting timestamp and upper bound.
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_channel_stop_silence_generator(struct ast_channel *chan, struct ast_silence_generator *state)
Stops a previously-started silence generator on the given channel.
static int load_module(void)
int ast_waitfor(struct ast_channel *chan, int ms)
Wait for input on a channel.
static int unload_module(void)
Data structure associated with a single frame of data.
static int waitforring_exec(struct ast_channel *chan, const char *data)
enum ast_frame_type frametype
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
#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.