70 static char *
app =
"WaitUntil";
77 struct timeval future = { 0, };
87 if (sscanf(data,
"%30ld%30lf", &seconds, &fraction) == 0) {
93 future.tv_sec = seconds;
94 future.tv_usec = fraction * 1000000;
97 ast_log(
LOG_NOTICE,
"WaitUntil called in the past (now %ld, arg %ld)\n", (
long)now.tv_sec, (
long)future.tv_sec);
int ast_safe_sleep(struct ast_channel *chan, int ms)
Wait for a specified amount of time, looking for hangups.
Main Channel structure associated with a channel.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
Asterisk main include file. File version handling, generic pbx functions.
static int unload_module(void)
struct timeval ast_tvnow(void)
Returns current timeval. Meant to replace calls to gettimeofday().
int64_t ast_tvdiff_ms(struct timeval end, struct timeval start)
Computes the difference (in milliseconds) between two struct timeval instances.
int ast_unregister_application(const char *app)
Unregister an application.
#define ast_strlen_zero(foo)
General Asterisk PBX channel definitions.
Core PBX routines and definitions.
static int load_module(void)
Support for logging to various files, console and syslog Configuration in file logger.conf.
int pbx_builtin_setvar_helper(struct ast_channel *chan, const char *name, const char *value)
Add a variable to the channel variable stack, removing the most recently set value for the same name...
#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.
static int waituntil_exec(struct ast_channel *chan, const char *data)