127 if (
args.argc != 2) {
142 if (!strcmp(
args.type,
"ast")) {
144 }
else if (!strcmp(
args.type,
"tech")) {
210 .
name =
"HANGUPCAUSE",
215 .
name =
"HANGUPCAUSE_KEYS",
219 static const char app[] =
"HangupCauseClear";
static int load_module(void)
#define ast_channel_lock(chan)
Main Channel structure associated with a channel.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
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.
char * ast_str_buffer(const struct ast_str *buf)
Returns the string buffer within the ast_str buf.
int ast_unregister_application(const char *app)
Unregister an application.
int ast_custom_function_unregister(struct ast_custom_function *acf)
Unregister a custom function.
struct ast_str * ast_channel_dialed_causes_channels(const struct ast_channel *chan)
Retrieve a comma-separated list of channels for which dialed cause information is available...
General Asterisk PBX channel definitions.
static struct ast_custom_function hangupcause_function
static int unload_module(void)
Data structure associated with a custom dialplan function.
static int hangupcause_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
#define ao2_ref(o, delta)
#define ast_strdupa(s)
duplicate a string in memory from the stack
static int hangupcause_keys_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
Core PBX routines and definitions.
The descriptor of a dynamic string XXX storage will be optimized later if needed We use the ts field ...
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
#define ast_channel_unlock(chan)
const char * ast_cause2str(int state) attribute_pure
Gives the string form of a given cause code.
Module has failed to load, may be in an inconsistent state.
static int hangupcause_clear_exec(struct ast_channel *chan, const char *data)
size_t ast_str_strlen(const struct ast_str *buf)
Returns the current length of the string stored within buf.
static struct ast_custom_function hangupcause_keys_function
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
struct ast_control_pvt_cause_code * ast_channel_dialed_causes_find(const struct ast_channel *chan, const char *chan_name)
Retrieve a ref-counted cause code information structure.
void ast_channel_dialed_causes_clear(const struct ast_channel *chan)
Clear all cause information from the channel.
#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_register_application_xml(app, execute)
Register an application using XML documentation.
#define AST_APP_ARG(name)
Define an application argument.