Fri Jun 19 12:09:24 2009

Asterisk developer's documentation


app_cdr.c

Go to the documentation of this file.
00001 /*
00002  * Asterisk -- An open source telephony toolkit.
00003  *
00004  * Copyright (C) 1999 - 2005, Digium, Inc.
00005  *
00006  * Martin Pycko <martinp@digium.com>
00007  *
00008  * See http://www.asterisk.org for more information about
00009  * the Asterisk project. Please do not directly contact
00010  * any of the maintainers of this project for assistance;
00011  * the project provides a web site, mailing lists and IRC
00012  * channels for your use.
00013  *
00014  * This program is free software, distributed under the terms of
00015  * the GNU General Public License Version 2. See the LICENSE file
00016  * at the top of the source tree.
00017  */
00018 
00019 /*! \file
00020  *
00021  * \brief Applications connected with CDR engine
00022  *
00023  * \author Martin Pycko <martinp@digium.com>
00024  *
00025  * \ingroup applications
00026  */
00027 
00028 #include "asterisk.h"
00029 
00030 ASTERISK_FILE_VERSION(__FILE__, "$Revision: 103249 $")
00031 
00032 #include "asterisk/channel.h"
00033 #include "asterisk/module.h"
00034 
00035 static char *nocdr_descrip =
00036 "  NoCDR(): This application will tell Asterisk not to maintain a CDR for the\n"
00037 "current call.\n";
00038 
00039 static char *nocdr_app = "NoCDR";
00040 static char *nocdr_synopsis = "Tell Asterisk to not maintain a CDR for the current call";
00041 
00042 
00043 static int nocdr_exec(struct ast_channel *chan, void *data)
00044 {
00045    if (chan->cdr)
00046       ast_set_flag(chan->cdr, AST_CDR_FLAG_POST_DISABLED);
00047 
00048    return 0;
00049 }
00050 
00051 static int unload_module(void)
00052 {
00053    return ast_unregister_application(nocdr_app);
00054 }
00055 
00056 static int load_module(void)
00057 {
00058    if (ast_register_application(nocdr_app, nocdr_exec, nocdr_synopsis, nocdr_descrip))
00059       return AST_MODULE_LOAD_FAILURE;
00060    return AST_MODULE_LOAD_SUCCESS;
00061 }
00062 
00063 AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Tell Asterisk to not maintain a CDR for the current call");

Generated on Fri Jun 19 12:09:24 2009 for Asterisk - the Open Source PBX by  doxygen 1.4.7