Sat Apr 26 2014 22:01:45

Asterisk developer's documentation


app_celgenuserevent.c File Reference

Generate User-Defined CEL event. More...

#include "asterisk.h"
#include "asterisk/module.h"
#include "asterisk/app.h"
#include "asterisk/channel.h"
#include "asterisk/cel.h"
Include dependency graph for app_celgenuserevent.c:

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_infoast_module_info = &__mod_info

Detailed Description

Generate User-Defined CEL event.

Author:
Steve Murphy

Definition in file app_celgenuserevent.c.


Function Documentation

static void __reg_module ( void  ) [static]

Definition at line 100 of file app_celgenuserevent.c.

static void __unreg_module ( void  ) [static]

Definition at line 100 of file app_celgenuserevent.c.

static int celgenuserevent_exec ( struct ast_channel chan,
const char *  data 
) [static]

Definition at line 61 of file app_celgenuserevent.c.

References args, AST_APP_ARG, ast_cel_report_event(), AST_CEL_USER_DEFINED, AST_DECLARE_APP_ARGS, AST_STANDARD_APP_ARGS, ast_strlen_zero(), and parse().

Referenced by load_module().

{
   int res = 0;
   char *parse;
   AST_DECLARE_APP_ARGS(args,
      AST_APP_ARG(event);
      AST_APP_ARG(extra);
   );

   if (ast_strlen_zero(data)) {
      return 0;
   }

   parse = ast_strdupa(data);
   AST_STANDARD_APP_ARGS(args, parse);

   ast_cel_report_event(chan, AST_CEL_USER_DEFINED, args.event, args.extra, NULL);
   return res;
}
static int unload_module ( void  ) [static]

Definition at line 81 of file app_celgenuserevent.c.

References ast_unregister_application().


Variable Documentation

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 100 of file app_celgenuserevent.c.

char* app = "CELGenUserEvent" [static]

Definition at line 59 of file app_celgenuserevent.c.

Definition at line 100 of file app_celgenuserevent.c.