37 #include "asterisk/build.h"
84 static int acf_version_exec(
struct ast_channel *chan,
const char *cmd,
85 char *parse,
char *buffer,
size_t buflen)
94 if (!ast_strlen_zero(args.info) ) {
95 if (!strcasecmp(args.info,
"ASTERISK_VERSION_NUM"))
97 else if (!strcasecmp(args.info,
"BUILD_USER"))
98 response_char = BUILD_USER;
99 else if (!strcasecmp(args.info,
"BUILD_HOSTNAME"))
100 response_char = BUILD_HOSTNAME;
101 else if (!strcasecmp(args.info,
"BUILD_MACHINE"))
102 response_char = BUILD_MACHINE;
103 else if (!strcasecmp(args.info,
"BUILD_KERNEL"))
104 response_char = BUILD_KERNEL;
105 else if (!strcasecmp(args.info,
"BUILD_OS"))
106 response_char = BUILD_OS;
107 else if (!strcasecmp(args.info,
"BUILD_DATE"))
108 response_char = BUILD_DATE;
111 ast_debug(1,
"VERSION returns %s result, given %s argument\n", response_char, args.info);
120 .read = acf_version_exec,
123 static int unload_module(
void)
130 static int load_module(
void)
135 AST_MODULE_INFO_STANDARD(
ASTERISK_GPL_KEY,
"Get Asterisk Version/Build Info");
Main Channel structure associated with a channel.
Asterisk main include file. File version handling, generic pbx functions.
Asterisk version information.
const char * ast_get_version(void)
Retrieve the Asterisk version string.
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
int ast_custom_function_unregister(struct ast_custom_function *acf)
Unregister a custom function.
General Asterisk PBX channel definitions.
Data structure associated with a custom dialplan function.
#define ast_debug(level,...)
Log a DEBUG message.
Core PBX routines and definitions.
const char * ast_get_version_num(void)
Retrieve the numeric Asterisk version.
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
#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_custom_function_register(acf)
Register a custom function.
#define AST_APP_ARG(name)
Define an application argument.