36 #include "asterisk/pbx.h"
99 static const char app[] =
"ControlPlayback";
118 return key == 35 || key == 42 || (key >= 48 && key <= 57);
126 if (strchr(haystack, needle))
166 skipms =
args.skip ? (atoi(
args.skip) ? atoi(
args.skip) : 3000) : 3000;
199 if (res > 0 &&
args.stop && strchr(
args.stop, res)) {
201 snprintf(stopkeybuf,
sizeof(stopkeybuf),
"%c", res);
212 snprintf(offsetbuf,
sizeof(offsetbuf),
"%ld", offsetms);
Main Channel structure associated with a channel.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
#define AST_APP_OPTION_ARG(option, flagno, argno)
Declares an application option that accepts an argument.
Asterisk main include file. File version handling, generic pbx functions.
#define AST_APP_OPTIONS(holder, options...)
Declares an array of options for an application.
int ast_control_streamfile(struct ast_channel *chan, const char *file, const char *fwd, const char *rev, const char *stop, const char *pause, const char *restart, int skipms, long *offsetms)
Stream a file with fast forward, pause, reverse, restart.
#define ast_test_flag(p, flag)
int ast_app_parse_options(const struct ast_app_option *options, struct ast_flags *flags, char **args, char *optstr)
Parses a string containing application options and sets flags/arguments.
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
static int load_module(void)
static int is_argument(const char *haystack, int needle)
int ast_unregister_application(const char *app)
Unregister an application.
#define ast_debug(level,...)
Log a DEBUG message.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
static int is_on_phonepad(char key)
#define ast_strdupa(s)
duplicate a string in memory from the stack
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...
Structure used to handle boolean flags.
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...
static int unload_module(void)
static struct ast_app_option cpb_opts[128]
Application convenience functions, designed to give consistent look and feel to Asterisk apps...
#define AST_APP_ARG(name)
Define an application argument.
struct ast_channel * chan
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
static int controlplayback_exec(struct ast_channel *chan, const char *data)
#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.