func_cdr.c File Reference

Call Detail Record related dialplan functions. More...

#include "asterisk.h"
#include "asterisk/module.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/utils.h"
#include "asterisk/app.h"
#include "asterisk/cdr.h"
#include "asterisk/stasis.h"
#include "asterisk/stasis_message_router.h"

Include dependency graph for func_cdr.c:

Go to the source code of this file.

Data Structures

struct  cdr_func_data
struct  cdr_func_payload

Enumerations

enum  cdr_option_flags { OPT_UNPARSED = (1 << 1), OPT_FLOAT = (1 << 2) }

Functions

static void __reg_module (void)
static void __unreg_module (void)
static int cdr_prop_write (struct ast_channel *chan, const char *cmd, char *parse, const char *value)
static void cdr_prop_write_callback (void *data, struct stasis_subscription *sub, struct stasis_message *message)
static int cdr_read (struct ast_channel *chan, const char *cmd, char *parse, char *buf, size_t len)
static void cdr_read_callback (void *data, struct stasis_subscription *sub, struct stasis_message *message)
static int cdr_write (struct ast_channel *chan, const char *cmd, char *parse, const char *value)
static void cdr_write_callback (void *data, struct stasis_subscription *sub, struct stasis_message *message)
static int load_module (void)
 STASIS_MESSAGE_TYPE_DEFN_LOCAL (cdr_prop_write_message_type)
 STASIS_MESSAGE_TYPE_DEFN_LOCAL (cdr_write_message_type)
 STASIS_MESSAGE_TYPE_DEFN_LOCAL (cdr_read_message_type)
static int unload_module (void)

Variables

static struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Call Detail Record (CDR) dialplan functions" , .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, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, }
static struct ast_module_infoast_module_info = &__mod_info
static struct ast_app_option cdr_func_options [128] = { [ 'f' ] = { .flag = OPT_FLOAT }, [ 'u' ] = { .flag = OPT_UNPARSED },}
static struct ast_custom_function cdr_function
static struct ast_custom_function cdr_prop_function


Detailed Description

Call Detail Record related dialplan functions.

Author:
Anthony Minessale II

Definition in file func_cdr.c.


Enumeration Type Documentation

Enumerator:
OPT_UNPARSED 
OPT_FLOAT 

Definition at line 196 of file func_cdr.c.

00196                       {
00197    OPT_UNPARSED = (1 << 1),
00198    OPT_FLOAT = (1 << 2),
00199 };


Function Documentation

static void __reg_module ( void   )  [static]

Definition at line 643 of file func_cdr.c.

static void __unreg_module ( void   )  [static]

Definition at line 643 of file func_cdr.c.

static int cdr_prop_write ( struct ast_channel chan,
const char *  cmd,
char *  parse,
const char *  value 
) [static]

Definition at line 541 of file func_cdr.c.

References ao2_alloc, ao2_cleanup, ast_cdr_message_router(), ast_channel_name(), ast_log, AST_LOG_WARNING, LOG_WARNING, NULL, RAII_VAR, router, stasis_message_create(), and stasis_message_router_publish_sync().

00543 {
00544    RAII_VAR(struct stasis_message *, message, NULL, ao2_cleanup);
00545    RAII_VAR(struct cdr_func_payload *, payload, NULL, ao2_cleanup);
00546    RAII_VAR(struct stasis_message_router *, router, ast_cdr_message_router(), ao2_cleanup);
00547 
00548    if (!chan) {
00549       ast_log(LOG_WARNING, "No channel was provided to %s function.\n", cmd);
00550       return -1;
00551    }
00552 
00553    if (!router) {
00554       ast_log(AST_LOG_WARNING, "Failed to manipulate CDR for channel %s: no message router\n",
00555          ast_channel_name(chan));
00556       return -1;
00557    }
00558 
00559    if (!cdr_write_message_type()) {
00560       ast_log(AST_LOG_WARNING, "Failed to manipulate CDR for channel %s: message type not available\n",
00561          ast_channel_name(chan));
00562       return -1;
00563    }
00564 
00565    payload = ao2_alloc(sizeof(*payload), NULL);
00566    if (!payload) {
00567       return -1;
00568    }
00569    payload->chan = chan;
00570    payload->cmd = cmd;
00571    payload->arguments = parse;
00572    payload->value = value;
00573 
00574    message = stasis_message_create(cdr_prop_write_message_type(), payload);
00575    if (!message) {
00576       ast_log(AST_LOG_WARNING, "Failed to manipulate CDR for channel %s: unable to create message\n",
00577          ast_channel_name(chan));
00578       return -1;
00579    }
00580    stasis_message_router_publish_sync(router, message);
00581 
00582    return 0;
00583 }

static void cdr_prop_write_callback ( void *  data,
struct stasis_subscription sub,
struct stasis_message message 
) [static]

Definition at line 390 of file func_cdr.c.

References args, cdr_func_payload::arguments, AST_APP_ARG, ast_cdr_clear_property(), AST_CDR_FLAG_DISABLE_ALL, AST_CDR_FLAG_PARTY_A, ast_cdr_set_property(), ast_channel_name(), AST_DECLARE_APP_ARGS, ast_log, AST_LOG_WARNING, AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero, ast_true(), cdr_func_payload::chan, cdr_func_payload::cmd, parse(), stasis_message_data(), stasis_message_type(), and cdr_func_payload::value.

Referenced by load_module().

00391 {
00392    struct cdr_func_payload *payload = stasis_message_data(message);
00393    enum ast_cdr_options option;
00394    char *parse;
00395    AST_DECLARE_APP_ARGS(args,
00396       AST_APP_ARG(variable);
00397       AST_APP_ARG(options);
00398    );
00399 
00400    if (cdr_prop_write_message_type() != stasis_message_type(message)) {
00401       return;
00402    }
00403 
00404    if (!payload) {
00405       return;
00406    }
00407 
00408    if (ast_strlen_zero(payload->arguments)) {
00409       ast_log(AST_LOG_WARNING, "%s requires a variable (%s(variable)=value)\n)",
00410          payload->cmd, payload->cmd);
00411       return;
00412    }
00413    if (ast_strlen_zero(payload->value)) {
00414       ast_log(AST_LOG_WARNING, "%s requires a value (%s(variable)=value)\n)",
00415          payload->cmd, payload->cmd);
00416       return;
00417    }
00418    parse = ast_strdupa(payload->arguments);
00419    AST_STANDARD_APP_ARGS(args, parse);
00420 
00421    if (!strcasecmp("party_a", args.variable)) {
00422       option = AST_CDR_FLAG_PARTY_A;
00423    } else if (!strcasecmp("disable", args.variable)) {
00424       option = AST_CDR_FLAG_DISABLE_ALL;
00425    } else {
00426       ast_log(AST_LOG_WARNING, "Unknown option %s used with %s\n", args.variable, payload->cmd);
00427       return;
00428    }
00429 
00430    if (ast_true(payload->value)) {
00431       ast_cdr_set_property(ast_channel_name(payload->chan), option);
00432    } else {
00433       ast_cdr_clear_property(ast_channel_name(payload->chan), option);
00434    }
00435 }

static int cdr_read ( struct ast_channel chan,
const char *  cmd,
char *  parse,
char *  buf,
size_t  len 
) [static]

Definition at line 438 of file func_cdr.c.

References ao2_alloc, ao2_cleanup, ast_cdr_message_router(), ast_channel_name(), ast_log, AST_LOG_WARNING, ast_strlen_zero, cdr_func_data::buf, cdr_read_callback(), ast_channel::data, cdr_func_data::len, LOG_WARNING, NULL, RAII_VAR, router, stasis_message_create(), and stasis_message_router_publish_sync().

00440 {
00441    RAII_VAR(struct stasis_message *, message, NULL, ao2_cleanup);
00442    RAII_VAR(struct cdr_func_payload *, payload, NULL, ao2_cleanup);
00443    struct cdr_func_data output = { 0, };
00444 
00445    if (!chan) {
00446       ast_log(LOG_WARNING, "No channel was provided to %s function.\n", cmd);
00447       return -1;
00448    }
00449 
00450    if (!cdr_read_message_type()) {
00451       ast_log(AST_LOG_WARNING, "Failed to manipulate CDR for channel %s: message type not available\n",
00452          ast_channel_name(chan));
00453       return -1;
00454    }
00455 
00456    payload = ao2_alloc(sizeof(*payload), NULL);
00457    if (!payload) {
00458       return -1;
00459    }
00460    payload->chan = chan;
00461    payload->cmd = cmd;
00462    payload->arguments = parse;
00463    payload->data = &output;
00464 
00465    buf[0] = '\0';/* Ensure the buffer is initialized. */
00466    output.buf = buf;
00467    output.len = len;
00468 
00469    message = stasis_message_create(cdr_read_message_type(), payload);
00470    if (!message) {
00471       ast_log(AST_LOG_WARNING, "Failed to manipulate CDR for channel %s: unable to create message\n",
00472          ast_channel_name(chan));
00473       return -1;
00474    }
00475 
00476    /* If this is a request on a dummy channel, we're doing post-processing on an
00477     * already dispatched CDR. Simply call the callback to calculate the value and
00478     * return, instead of posting to Stasis as we would for a running channel.
00479     */
00480    if (ast_strlen_zero(ast_channel_name(chan))) {
00481       cdr_read_callback(NULL, NULL, message);
00482    } else {
00483       RAII_VAR(struct stasis_message_router *, router, ast_cdr_message_router(), ao2_cleanup);
00484 
00485       if (!router) {
00486          ast_log(AST_LOG_WARNING, "Failed to manipulate CDR for channel %s: no message router\n",
00487             ast_channel_name(chan));
00488          return -1;
00489       }
00490       stasis_message_router_publish_sync(router, message);
00491    }
00492 
00493    return 0;
00494 }

static void cdr_read_callback ( void *  data,
struct stasis_subscription sub,
struct stasis_message message 
) [static]

Definition at line 223 of file func_cdr.c.

References amaflags, args, cdr_func_payload::arguments, AST_APP_ARG, ast_app_parse_options(), ast_assert, ast_cdr_disp2str(), ast_cdr_format_var(), ast_cdr_getvar(), ast_channel_amaflags2string(), ast_channel_cdr(), ast_channel_name(), ast_copy_string(), AST_DECLARE_APP_ARGS, ast_localtime(), ast_log, AST_LOG_WARNING, ast_set_flag, AST_STANDARD_APP_ARGS, ast_strdupa, ast_strftime(), ast_strlen_zero, ast_test_flag, cdr_func_data::buf, cdr_func_options, cdr_func_payload::chan, cdr_func_payload::cmd, cdr_func_payload::data, cdr_func_data::len, NULL, OPT_FLOAT, OPT_UNPARSED, stasis_message_data(), stasis_message_type(), and value.

Referenced by cdr_read(), and load_module().

00224 {
00225    struct cdr_func_payload *payload = stasis_message_data(message);
00226    struct cdr_func_data *output;
00227    char *info;
00228    char *value = NULL;
00229    struct ast_flags flags = { 0 };
00230    char tempbuf[512];
00231    AST_DECLARE_APP_ARGS(args,
00232       AST_APP_ARG(variable);
00233       AST_APP_ARG(options);
00234    );
00235 
00236    if (cdr_read_message_type() != stasis_message_type(message)) {
00237       return;
00238    }
00239 
00240    ast_assert(payload != NULL);
00241    output = payload->data;
00242    ast_assert(output != NULL);
00243 
00244    if (ast_strlen_zero(payload->arguments)) {
00245       ast_log(AST_LOG_WARNING, "%s requires a variable (%s(variable[,option]))\n)",
00246          payload->cmd, payload->cmd);
00247       return;
00248    }
00249    info = ast_strdupa(payload->arguments);
00250    AST_STANDARD_APP_ARGS(args, info);
00251 
00252    if (!ast_strlen_zero(args.options)) {
00253       ast_app_parse_options(cdr_func_options, &flags, NULL, args.options);
00254    }
00255 
00256    if (ast_strlen_zero(ast_channel_name(payload->chan))) {
00257       /* Format request on a dummy channel */
00258       ast_cdr_format_var(ast_channel_cdr(payload->chan), args.variable, &value, tempbuf, sizeof(tempbuf), 0);
00259       if (ast_strlen_zero(value)) {
00260          return;
00261       }
00262       ast_copy_string(tempbuf, value, sizeof(tempbuf));
00263       ast_set_flag(&flags, OPT_UNPARSED);
00264    } else if (ast_cdr_getvar(ast_channel_name(payload->chan), args.variable, tempbuf, sizeof(tempbuf))) {
00265       return;
00266    }
00267 
00268    if (ast_test_flag(&flags, OPT_FLOAT)
00269       && (!strcasecmp("billsec", args.variable) || !strcasecmp("duration", args.variable))) {
00270       long ms;
00271       double dtime;
00272 
00273       if (sscanf(tempbuf, "%30ld", &ms) != 1) {
00274          ast_log(AST_LOG_WARNING, "Unable to parse %s (%s) from the CDR for channel %s\n",
00275             args.variable, tempbuf, ast_channel_name(payload->chan));
00276          return;
00277       }
00278       dtime = (double)(ms / 1000.0);
00279       snprintf(tempbuf, sizeof(tempbuf), "%lf", dtime);
00280    } else if (!ast_test_flag(&flags, OPT_UNPARSED)) {
00281       if (!strcasecmp("start", args.variable)
00282          || !strcasecmp("end", args.variable)
00283          || !strcasecmp("answer", args.variable)) {
00284          struct timeval fmt_time;
00285          struct ast_tm tm;
00286          /* tv_usec is suseconds_t, which could be int or long */
00287          long int tv_sec;
00288          long int tv_usec;
00289 
00290          if (sscanf(tempbuf, "%ld.%ld", &tv_sec, &tv_usec) != 2) {
00291             ast_log(AST_LOG_WARNING, "Unable to parse %s (%s) from the CDR for channel %s\n",
00292                args.variable, tempbuf, ast_channel_name(payload->chan));
00293             return;
00294          }
00295          if (tv_sec) {
00296             fmt_time.tv_sec = tv_sec;
00297             fmt_time.tv_usec = tv_usec;
00298             ast_localtime(&fmt_time, &tm, NULL);
00299             ast_strftime(tempbuf, sizeof(tempbuf), "%Y-%m-%d %T", &tm);
00300          } else {
00301             tempbuf[0] = '\0';
00302          }
00303       } else if (!strcasecmp("disposition", args.variable)) {
00304          int disposition;
00305 
00306          if (sscanf(tempbuf, "%8d", &disposition) != 1) {
00307             ast_log(AST_LOG_WARNING, "Unable to parse %s (%s) from the CDR for channel %s\n",
00308                args.variable, tempbuf, ast_channel_name(payload->chan));
00309             return;
00310          }
00311          snprintf(tempbuf, sizeof(tempbuf), "%s", ast_cdr_disp2str(disposition));
00312       } else if (!strcasecmp("amaflags", args.variable)) {
00313          int amaflags;
00314 
00315          if (sscanf(tempbuf, "%8d", &amaflags) != 1) {
00316             ast_log(AST_LOG_WARNING, "Unable to parse %s (%s) from the CDR for channel %s\n",
00317                args.variable, tempbuf, ast_channel_name(payload->chan));
00318             return;
00319          }
00320          snprintf(tempbuf, sizeof(tempbuf), "%s", ast_channel_amaflags2string(amaflags));
00321       }
00322    }
00323 
00324    ast_copy_string(output->buf, tempbuf, output->len);
00325 }

static int cdr_write ( struct ast_channel chan,
const char *  cmd,
char *  parse,
const char *  value 
) [static]

Definition at line 496 of file func_cdr.c.

References ao2_alloc, ao2_cleanup, ast_cdr_message_router(), ast_channel_name(), ast_log, AST_LOG_WARNING, LOG_WARNING, NULL, RAII_VAR, router, stasis_message_create(), and stasis_message_router_publish_sync().

00498 {
00499    RAII_VAR(struct stasis_message *, message, NULL, ao2_cleanup);
00500    RAII_VAR(struct cdr_func_payload *, payload, NULL, ao2_cleanup);
00501    RAII_VAR(struct stasis_message_router *, router,
00502            ast_cdr_message_router(), ao2_cleanup);
00503 
00504    if (!chan) {
00505       ast_log(LOG_WARNING, "No channel was provided to %s function.\n", cmd);
00506       return -1;
00507    }
00508 
00509    if (!router) {
00510       ast_log(AST_LOG_WARNING, "Failed to manipulate CDR for channel %s: no message router\n",
00511          ast_channel_name(chan));
00512       return -1;
00513    }
00514 
00515    if (!cdr_write_message_type()) {
00516       ast_log(AST_LOG_WARNING, "Failed to manipulate CDR for channel %s: message type not available\n",
00517          ast_channel_name(chan));
00518       return -1;
00519    }
00520 
00521    payload = ao2_alloc(sizeof(*payload), NULL);
00522    if (!payload) {
00523       return -1;
00524    }
00525    payload->chan = chan;
00526    payload->cmd = cmd;
00527    payload->arguments = parse;
00528    payload->value = value;
00529 
00530    message = stasis_message_create(cdr_write_message_type(), payload);
00531    if (!message) {
00532       ast_log(AST_LOG_WARNING, "Failed to manipulate CDR for channel %s: unable to create message\n",
00533          ast_channel_name(chan));
00534       return -1;
00535    }
00536    stasis_message_router_publish_sync(router, message);
00537 
00538    return 0;
00539 }

static void cdr_write_callback ( void *  data,
struct stasis_subscription sub,
struct stasis_message message 
) [static]

Definition at line 327 of file func_cdr.c.

References amaflags, args, cdr_func_payload::arguments, AST_APP_ARG, ast_app_parse_options(), ast_cdr_setuserfield(), ast_cdr_setvar(), ast_channel_amaflags_set(), ast_channel_lock, ast_channel_name(), ast_channel_string2amaflag(), ast_channel_unlock, AST_DECLARE_APP_ARGS, ast_log, AST_LOG_WARNING, AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero, cdr_func_options, cdr_func_payload::chan, cdr_func_payload::cmd, NULL, parse(), stasis_message_data(), stasis_message_type(), and cdr_func_payload::value.

Referenced by load_module().

00328 {
00329    struct cdr_func_payload *payload = stasis_message_data(message);
00330    struct ast_flags flags = { 0 };
00331    AST_DECLARE_APP_ARGS(args,
00332       AST_APP_ARG(variable);
00333       AST_APP_ARG(options);
00334    );
00335    char *parse;
00336 
00337    if (cdr_write_message_type() != stasis_message_type(message)) {
00338       return;
00339    }
00340 
00341    if (!payload) {
00342       return;
00343    }
00344 
00345    if (ast_strlen_zero(payload->arguments)) {
00346       ast_log(AST_LOG_WARNING, "%s requires a variable (%s(variable)=value)\n)",
00347          payload->cmd, payload->cmd);
00348       return;
00349    }
00350    if (ast_strlen_zero(payload->value)) {
00351       ast_log(AST_LOG_WARNING, "%s requires a value (%s(variable)=value)\n)",
00352          payload->cmd, payload->cmd);
00353       return;
00354    }
00355    parse = ast_strdupa(payload->arguments);
00356    AST_STANDARD_APP_ARGS(args, parse);
00357 
00358    if (!ast_strlen_zero(args.options)) {
00359       ast_app_parse_options(cdr_func_options, &flags, NULL, args.options);
00360    }
00361 
00362    if (!strcasecmp(args.variable, "accountcode")) {
00363       ast_log(AST_LOG_WARNING, "Using the CDR function to set 'accountcode' is deprecated. Please use the CHANNEL function instead.\n");
00364       ast_channel_lock(payload->chan);
00365       ast_channel_accountcode_set(payload->chan, payload->value);
00366       ast_channel_unlock(payload->chan);
00367    } else if (!strcasecmp(args.variable, "peeraccount")) {
00368       ast_log(AST_LOG_WARNING, "The 'peeraccount' setting is not supported. Please set the 'accountcode' on the appropriate channel using the CHANNEL function.\n");
00369    } else if (!strcasecmp(args.variable, "userfield")) {
00370       ast_cdr_setuserfield(ast_channel_name(payload->chan), payload->value);
00371    } else if (!strcasecmp(args.variable, "amaflags")) {
00372       ast_log(AST_LOG_WARNING, "Using the CDR function to set 'amaflags' is deprecated. Please use the CHANNEL function instead.\n");
00373       if (isdigit(*payload->value)) {
00374          int amaflags;
00375          sscanf(payload->value, "%30d", &amaflags);
00376          ast_channel_lock(payload->chan);
00377          ast_channel_amaflags_set(payload->chan, amaflags);
00378          ast_channel_unlock(payload->chan);
00379       } else {
00380          ast_channel_lock(payload->chan);
00381          ast_channel_amaflags_set(payload->chan, ast_channel_string2amaflag(payload->value));
00382          ast_channel_unlock(payload->chan);
00383       }
00384    } else {
00385       ast_cdr_setvar(ast_channel_name(payload->chan), args.variable, payload->value);
00386    }
00387    return;
00388 }

static int load_module ( void   )  [static]

Definition at line 616 of file func_cdr.c.

References ao2_cleanup, ast_cdr_message_router(), ast_custom_function_register, AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_SUCCESS, cdr_prop_write_callback(), cdr_read_callback(), cdr_write_callback(), NULL, RAII_VAR, router, stasis_message_router_add(), and STASIS_MESSAGE_TYPE_INIT.

00617 {
00618    RAII_VAR(struct stasis_message_router *, router, ast_cdr_message_router(), ao2_cleanup);
00619    int res = 0;
00620 
00621    if (!router) {
00622       return AST_MODULE_LOAD_FAILURE;
00623    }
00624 
00625    res |= STASIS_MESSAGE_TYPE_INIT(cdr_read_message_type);
00626    res |= STASIS_MESSAGE_TYPE_INIT(cdr_write_message_type);
00627    res |= STASIS_MESSAGE_TYPE_INIT(cdr_prop_write_message_type);
00628    res |= ast_custom_function_register(&cdr_function);
00629    res |= ast_custom_function_register(&cdr_prop_function);
00630    res |= stasis_message_router_add(router, cdr_prop_write_message_type(),
00631                                     cdr_prop_write_callback, NULL);
00632    res |= stasis_message_router_add(router, cdr_write_message_type(),
00633                                     cdr_write_callback, NULL);
00634    res |= stasis_message_router_add(router, cdr_read_message_type(),
00635                                     cdr_read_callback, NULL);
00636 
00637    if (res) {
00638       return AST_MODULE_LOAD_FAILURE;
00639    }
00640    return AST_MODULE_LOAD_SUCCESS;
00641 }

STASIS_MESSAGE_TYPE_DEFN_LOCAL ( cdr_prop_write_message_type   ) 

STASIS_MESSAGE_TYPE_DEFN_LOCAL ( cdr_write_message_type   ) 

STASIS_MESSAGE_TYPE_DEFN_LOCAL ( cdr_read_message_type   ) 

static int unload_module ( void   )  [static]

Definition at line 597 of file func_cdr.c.

References ao2_cleanup, ast_cdr_message_router(), ast_custom_function_unregister(), RAII_VAR, router, stasis_message_router_remove(), and STASIS_MESSAGE_TYPE_CLEANUP.

00598 {
00599    RAII_VAR(struct stasis_message_router *, router, ast_cdr_message_router(), ao2_cleanup);
00600    int res = 0;
00601 
00602    if (router) {
00603       stasis_message_router_remove(router, cdr_prop_write_message_type());
00604       stasis_message_router_remove(router, cdr_write_message_type());
00605       stasis_message_router_remove(router, cdr_read_message_type());
00606    }
00607    STASIS_MESSAGE_TYPE_CLEANUP(cdr_read_message_type);
00608    STASIS_MESSAGE_TYPE_CLEANUP(cdr_write_message_type);
00609    STASIS_MESSAGE_TYPE_CLEANUP(cdr_prop_write_message_type);
00610    res |= ast_custom_function_unregister(&cdr_function);
00611    res |= ast_custom_function_unregister(&cdr_prop_function);
00612 
00613    return res;
00614 }


Variable Documentation

struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Call Detail Record (CDR) dialplan functions" , .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, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, } [static]

Definition at line 643 of file func_cdr.c.

Definition at line 643 of file func_cdr.c.

struct ast_app_option cdr_func_options[128] = { [ 'f' ] = { .flag = OPT_FLOAT }, [ 'u' ] = { .flag = OPT_UNPARSED },} [static]

Definition at line 204 of file func_cdr.c.

Referenced by cdr_read_callback(), and cdr_write_callback().

Initial value:

 {
   .name = "CDR",
   .read = cdr_read,
   .write = cdr_write,
}

Definition at line 585 of file func_cdr.c.

Initial value:

 {
   .name = "CDR_PROP",
   .read = NULL,
   .write = cdr_prop_write,
}

Definition at line 591 of file func_cdr.c.


Generated on Thu Apr 16 06:31:12 2015 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6