115 static char *app_sayunixtime =
"SayUnixTime";
116 static char *app_datetime =
"DateTime";
118 static int sayunixtime_exec(
struct ast_channel *chan,
const char *data)
132 char *opt_args[OPT_ARG_ARRAY_SIZE];
133 const char *interrupt_string;
144 if (!ast_strlen_zero(args.options)) {
146 if (ast_test_flag64(&opts, OPT_JUMP)){
147 haltondigits = AST_DIGIT_ANY;
152 ast_channel_lock(chan);
155 haltondigits = AST_DIGIT_ANY;
157 ast_channel_unlock(chan);
159 ast_get_time_t(ast_strlen_zero(args.timeval) ? NULL : args.timeval, &unixtime, time(NULL), NULL);
166 res = ast_say_date_with_format(chan, unixtime, haltondigits,
167 ast_channel_language(chan), ast_strlen_zero(args.format) ? NULL : args.format, ast_strlen_zero(args.timezone) ? NULL : args.timezone);
173 static int unload_module(
void)
183 static int load_module(
void)
Main Channel structure associated with a channel.
Asterisk main include file. File version handling, generic pbx functions.
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
ast_channel_state
ast_channel states
Generic File Format Support. Should be included by clients of the file handling routines. File service providers should instead include mod_format.h.
Structure used to handle a large number of boolean flags == used only in app_dial?
int ast_unregister_application(const char *app)
Unregister an application.
const char * pbx_builtin_getvar_helper(struct ast_channel *chan, const char *name)
Return a pointer to the value of the corresponding channel variable.
#define AST_APP_OPTIONS(holder, options...)
Declares an array of options for an application.
int ast_get_time_t(const char *src, time_t *dst, time_t _default, int *consumed)
Parse a time (integer) string.
General Asterisk PBX channel definitions.
#define ast_strdupa(s)
duplicate a string in memory from the stack
Core PBX routines and definitions.
int ast_app_parse_options64(const struct ast_app_option *options, struct ast_flags64 *flags, char **args, char *optstr)
Parses a string containing application options and sets flags/arguments.
int attribute_pure ast_true(const char *val)
Make sure something is true. Determine if a string containing a boolean value is "true". This function checks to see whether a string passed to it is an indication of an "true" value. It checks to see if the string is "yes", "true", "y", "t", "on" or "1".
#define AST_APP_OPTION_ARG(option, flagno, argno)
Declares an application option that accepts an argument.
int ast_answer(struct ast_channel *chan)
Answer a channel.
Say numbers and dates (maybe words one day too)
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
Application convenience functions, designed to give consistent look and feel to Asterisk apps...
#define ast_register_application_xml(app, execute)
Register an application using XML documentation.
#define AST_APP_ARG(name)
Define an application argument.