#include "asterisk.h"
#include <sys/types.h>
#include <stdlib.h>
#include "asterisk/channel.h"
#include "asterisk/module.h"
#include "asterisk/pbx.h"
Go to the source code of this file.
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static int | load_module (void) |
static int | nocdr_exec (struct ast_channel *chan, void *data) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_DEFAULT | AST_MODFLAG_BUILDSUM, .description = "Tell Asterisk to not maintain a CDR for the current call" , .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 = "361d7bb937402d51e4658efb5b4d76e4" , .load = load_module, .unload = unload_module, } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static char * | nocdr_app = "NoCDR" |
static char * | nocdr_descrip |
static char * | nocdr_synopsis = "Tell Asterisk to not maintain a CDR for the current call" |
Martin Pycko <martinp@digium.com>
Definition in file app_cdr.c.
static int load_module | ( | void | ) | [static] |
Definition at line 73 of file app_cdr.c.
References ast_register_application(), and nocdr_exec().
00074 { 00075 return ast_register_application(nocdr_app, nocdr_exec, nocdr_synopsis, nocdr_descrip); 00076 }
static int nocdr_exec | ( | struct ast_channel * | chan, | |
void * | data | |||
) | [static] |
Definition at line 47 of file app_cdr.c.
References AST_CDR_FLAG_POST_DISABLED, ast_module_user_add, ast_module_user_remove, ast_set_flag, ast_channel::cdr, and ast_module_user::chan.
Referenced by load_module().
00048 { 00049 struct ast_module_user *u; 00050 00051 u = ast_module_user_add(chan); 00052 00053 if (chan->cdr) { 00054 ast_set_flag(chan->cdr, AST_CDR_FLAG_POST_DISABLED); 00055 } 00056 00057 ast_module_user_remove(u); 00058 00059 return 0; 00060 }
static int unload_module | ( | void | ) | [static] |
Definition at line 62 of file app_cdr.c.
References ast_module_user_hangup_all, and ast_unregister_application().
00063 { 00064 int res; 00065 00066 res = ast_unregister_application(nocdr_app); 00067 00068 ast_module_user_hangup_all(); 00069 00070 return res; 00071 }
struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_DEFAULT | AST_MODFLAG_BUILDSUM, .description = "Tell Asterisk to not maintain a CDR for the current call" , .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 = "361d7bb937402d51e4658efb5b4d76e4" , .load = load_module, .unload = unload_module, } [static] |
const struct ast_module_info* ast_module_info = &__mod_info [static] |
char* nocdr_descrip [static] |
char* nocdr_synopsis = "Tell Asterisk to not maintain a CDR for the current call" [static] |