#include "asterisk.h"
#include "asterisk/module.h"
#include "asterisk/app.h"
#include "asterisk/channel.h"
#include "asterisk/cel.h"

Go to the source code of this file.
Functions | |
| static void | __reg_module (void) |
| static void | __unreg_module (void) |
| static int | celgenuserevent_exec (struct ast_channel *chan, const char *data) |
| static int | load_module (void) |
| static int | unload_module (void) |
Variables | |
| static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_DEFAULT , .description = "Generate an User-Defined CEL event" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = AST_BUILDOPT_SUM, .load = load_module, .unload = unload_module, } |
| static char * | app = "CELGenUserEvent" |
| static struct ast_module_info * | ast_module_info = &__mod_info |
Definition in file app_celgenuserevent.c.
| static void __reg_module | ( | void | ) | [static] |
Definition at line 98 of file app_celgenuserevent.c.
| static void __unreg_module | ( | void | ) | [static] |
Definition at line 98 of file app_celgenuserevent.c.
| static int celgenuserevent_exec | ( | struct ast_channel * | chan, | |
| const char * | data | |||
| ) | [static] |
Definition at line 54 of file app_celgenuserevent.c.
References AST_APP_ARG, ast_cel_report_event(), AST_CEL_USER_DEFINED, AST_DECLARE_APP_ARGS, AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero(), and parse().
Referenced by load_module().
00055 { 00056 int res = 0; 00057 char *parse; 00058 AST_DECLARE_APP_ARGS(args, 00059 AST_APP_ARG(event); 00060 AST_APP_ARG(extra); 00061 ); 00062 00063 if (ast_strlen_zero(data)) { 00064 return 0; 00065 } 00066 00067 parse = ast_strdupa(data); 00068 AST_STANDARD_APP_ARGS(args, parse); 00069 00070 ast_cel_report_event(chan, AST_CEL_USER_DEFINED, args.event, args.extra, NULL); 00071 return res; 00072 }
| static int load_module | ( | void | ) | [static] |
Definition at line 85 of file app_celgenuserevent.c.
References AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, ast_register_application_xml, and celgenuserevent_exec().
00086 { 00087 int res = ast_register_application_xml(app, celgenuserevent_exec); 00088 if (res) { 00089 return AST_MODULE_LOAD_DECLINE; 00090 } else { 00091 return AST_MODULE_LOAD_SUCCESS; 00092 } 00093 }
| static int unload_module | ( | void | ) | [static] |
Definition at line 74 of file app_celgenuserevent.c.
References ast_module_user_hangup_all, and ast_unregister_application().
00075 { 00076 int res; 00077 00078 res = ast_unregister_application(app); 00079 00080 ast_module_user_hangup_all(); 00081 00082 return res; 00083 }
struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_DEFAULT , .description = "Generate an User-Defined CEL event" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = AST_BUILDOPT_SUM, .load = load_module, .unload = unload_module, } [static] |
Definition at line 98 of file app_celgenuserevent.c.
char* app = "CELGenUserEvent" [static] |
Definition at line 52 of file app_celgenuserevent.c.
struct ast_module_info* ast_module_info = &__mod_info [static] |
Definition at line 98 of file app_celgenuserevent.c.
1.5.6