72 static int acf_vmcount_exec(
struct ast_channel *chan,
const char *cmd,
char *argsstr,
char *buf,
size_t len)
83 if (ast_strlen_zero(argsstr))
88 if (ast_strlen_zero(args.vmbox)) {
92 if (ast_strlen_zero(args.folder)) {
93 args.folder =
"INBOX";
96 while ((mailbox = strsep(&args.vmbox,
"&"))) {
98 if (ast_strlen_zero(mailbox)) {
102 total += (c > 0 ? c : 0);
104 snprintf(buf, len,
"%d", total);
111 .read = acf_vmcount_exec,
115 static int unload_module(
void)
120 static int load_module(
void)
125 AST_MODULE_INFO_STANDARD(
ASTERISK_GPL_KEY,
"Indicator for whether a voice mailbox has messages in a given folder.");
Main Channel structure associated with a channel.
Asterisk locking-related definitions:
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.
Generic File Format Support. Should be included by clients of the file handling routines. File service providers should instead include mod_format.h.
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.
Core PBX routines and definitions.
int ast_app_messagecount(const char *mailbox_id, const char *folder)
Get the number of messages in a given mailbox folder.
#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.