summaryrefslogtreecommitdiff
path: root/apps/app_cdr.c
AgeCommit message (Collapse)Author
2017-04-12modules: change module LOAD_FAILUREs to LOAD_DECLINESGeorge Joseph
In all non-pbx modules, AST_MODULE_LOAD_FAILURE has been changed to AST_MODULE_LOAD_DECLINE. This prevents asterisk from exiting if a module can't be loaded. If the user wishes to retain the FAILURE behavior for a specific module, they can use the "require" or "preload-require" keyword in modules.conf. A new API was added to logger: ast_is_logger_initialized(). This allows asterisk.c/check_init() to print to the error log once the logger subsystem is ready instead of just to stdout. If something does fail before the logger is initialized, we now print to stderr instead of stdout. Change-Id: I5f4b50623d9b5a6cb7c5624a8c5c1274c13b2b25
2016-10-27Remove ASTERISK_REGISTER_FILE.Corey Farrell
ASTERISK_REGISTER_FILE no longer has any purpose so this commit removes all traces of it. Previously exported symbols removed: * __ast_register_file * __ast_unregister_file * ast_complete_source_filename This also removes the mtx_prof static variable that was declared when MTX_PROFILE was enabled. This variable was only used in lock.c so it is now initialized in that file only. ASTERISK-26480 #close Change-Id: I1074af07d71f9e159c48ef36631aa432c86f9966
2015-04-13git migration: Refactor the ASTERISK_FILE_VERSION macroMatt Jordan
Git does not support the ability to replace a token with a version string during check-in. While it does have support for replacing a token on clone, this is somewhat sub-optimal: the token is replaced with the object hash, which is not particularly easy for human consumption. What's more, in practice, the source file version was often not terribly useful. Generally, when triaging bugs, the overall version of Asterisk is far more useful than an individual SVN version of a file. As a result, this patch removes Asterisk's support for showing source file versions. Specifically, it does the following: * Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and remove passing the version in with the macro. Other facilities than 'core show file version' make use of the file names, such as setting a debug level only on a specific file. As such, the act of registering source files with the Asterisk core still has use. The macro rename now reflects the new macro purpose. * main/asterisk: - Refactor the file_version structure to reflect that it no longer tracks a version field. - Remove the "core show file version" CLI command. Without the file version, it is no longer useful. - Remove the ast_file_version_find function. The file version is no longer tracked. - Rename ast_register_file_version/ast_unregister_file_version to ast_register_file/ast_unregister_file, respectively. * main/manager: Remove value from the Version key of the ModuleCheck Action. The actual key itself has not been removed, as doing so would absolutely constitute a backwards incompatible change. However, since the file version is no longer tracked, there is no need to attempt to include it in the Version key. * UPGRADE: Add notes for: - Modification to the ModuleCheck AMI Action - Removal of the "core show file version" CLI command Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
2014-01-12CDRs: Synchronize dialplan applications that manipulate CDRs with the engineMatthew Jordan
In https://reviewboard.asterisk.org/r/3057/, applications and functions that manipulate CDRs were made to interact over Stasis. This was done to synchronize manipulations of CDRs from the dialplan with the updates the engine itself receives over the message bus. This change rested on a faulty premise: that messages published to the CDR topic or to a topic that forwards to the CDR topic are synchronized with the messages handled by the CDR topic subscription in the CDR engine. This is not the case. There is no ordering guaranteed for two messages published to the same topic; ordering is only guaranteed if a message is published to the same subscriber. Stasis was modified in r405311 to allow a publisher to synchronize on the subscriber. This patch uses that API to synchronize the CDR publishers with the CDR engine message router, which maintains the overall topic subscription. (closes issue ASTERISK-22884) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/3099/ ........ Merged revisions 405312 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-19app_cdr,app_forkcdr,func_cdr: Synchronize with engine when manipulating stateMatthew Jordan
When doing the rework of the CDR engine that pushed all of the logic into cdr.c and made it respond to changes in channel state over Stasis, we knew that accessing the CDR engine from the dialplan would be "slightly" non-deterministic. Dialplan threads would be accessing CDRs while Stasis threads would be updating the state of said CDRs - whereas in the past, everything happened on the dialplan threads. Tests have shown that "slightly" is in reality "very". This patch synchronizes things by making the dialplan applications/functions that manipulate CDRs do so over Stasis. ForkCDR, NoCDR, ResetCDR, CDR, and CDR_PROP now all use Stasis to send their requests over to the CDR engine, and synchronize on the channel Stasis topic via a subscription so that they return their values/control to the dialplan at the appropriate time. While going through this, the following changes were also made: * DISA, which can reset the CDR when a user successfully authenticates, now just uses the ResetCDR app to do this. This prevents having to duplicate the same Stasis synchronization logic in that application. * Answer no longer disables CDRs. It actually didn't work anyway - calling DISABLE on the channel's CDR doesn't stop the CDR from getting the Answer time - it just kills all CDRs on that channel, which isn't what the caller would intend. (closes issue ASTERISK-22884) (closes issue ASTERISK-22886) Review: https://reviewboard.asterisk.org/r/3057/ ........ Merged revisions 404294 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-27app_cdr and res_parking: Fix some resource leaks.Richard Mudgett
* app_cdr left the ResetCDR application registered. * res_parking leaked a ref to config global. (closes issue ASTERISK-22566) Reported by: Corey Farrell Patches: ASTERISK-22566-r2.patch (license #5909) patch uploaded by Corey Farrell ........ Merged revisions 400020 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-17Update Asterisk's CDRs for the new bridging frameworkMatthew Jordan
This patch is the initial push to update Asterisk's CDR engine for the new bridging framework. This patch guts the existing CDR engine and builds the new on top of messages coming across Stasis. As changes in channel state and bridge state are detected, CDRs are built and dispatched accordingly. This fundamentally changes CDRs in a few ways. (1) CDRs are now *very* reflective of the actual state of channels and bridges. This means CDRs track well with what an actual channel is doing - which is useful in transfer scenarios (which were previously difficult to pin down). It does, however, mean that CDRs cannot be 'fooled'. Previous behavior in Asterisk allowed for CDR applications, channels, and other properties to be spoofed in parts of the code - this no longer works. (2) CDRs have defined behavior in multi-party scenarios. This behavior will not be what everyone wants, but it is a defined behavior and as such, it is predictable. (3) The CDR manipulation functions and applications have been overhauled. Major changes have been made to ResetCDR and ForkCDR in particular. Many of the options for these two applications no longer made any sense with the new framework and the (slightly) more immutable nature of CDRs. There are a plethora of other changes. For a full description of CDR behavior, see the CDR specification on the Asterisk wiki. (closes issue ASTERISK-21196) Review: https://reviewboard.asterisk.org/r/2486/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-20ast_channel opaquification of pointers and integral typesTerry Wilson
Review: https://reviewboard.asterisk.org/r/1753/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14Merged revisions 328247 via svnmerge from Leif Madsen
https://origsvn.digium.com/svn/asterisk/branches/1.10 ................ r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines Merged revisions 328209 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines Introduce <support_level> tags in MODULEINFO. This change introduces MODULEINFO into many modules in Asterisk in order to show the community support level for those modules. This is used by changes committed to menuselect by Russell Bryant recently (r917 in menuselect). More information about the support level types and what they mean is available on the wiki at https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-21Const-ify the world (or at least a good part of it)Kevin P. Fleming
This patch adds 'const' tags to a number of Asterisk APIs where they are appropriate (where the API already demanded that the function argument not be modified, but the compiler was not informed of that fact). The list includes: - CLI command handlers - CLI command handler arguments - AGI command handlers - AGI command handler arguments - Dialplan application handler arguments - Speech engine API function arguments In addition, various file-scope and function-scope constant arrays got 'const' and/or 'static' qualifiers where they were missing. Review: https://reviewboard.asterisk.org/r/251/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-01Merge changes from team/group/appdocsxmlRussell Bryant
This commit introduces the first phase of an effort to manage documentation of the interfaces in Asterisk in an XML format. Currently, a new format is available for applications and dialplan functions. A good number of conversions to the new format are also included. For more information, see the following message to asterisk-dev: http://lists.digium.com/pipermail/asterisk-dev/2008-October/034968.html git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-09whitespace fixes only.Michiel van Baak
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26Use defined return values in load_module in more places.Jason Parker
(closes issue #11096) Patches: pbx_config.c.patch uploaded by moy (license 222) pbx_dundi.c.patch uploaded by moy (license 222) pbx_gtkconsole.c.patch uploaded by moy (license 222) pbx_loopback.c.patch uploaded by moy (license 222) pbx_realtime.c.patch uploaded by moy (license 222) pbx_spool.c.patch uploaded by moy (license 222) app_adsiprog.c.patch uploaded by moy (license 222) app_alarmreceiver.c.patch uploaded by moy (license 222) app_amd.c.patch uploaded by moy (license 222) app_authenticate.c.patch uploaded by moy (license 222) app_cdr.c.patch uploaded by moy (license 222) app_zapateller.c.patch uploaded by moy (license 222) app_zapbarge.c.patch uploaded by moy (license 222) app_zapras.c.patch uploaded by moy (license 222) app_zapscan.c.patch uploaded by moy (license 222) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-22shuffle a little bit the content of header files to reduce dependencies.Luigi Rizzo
In this commit: - move the ast_register/unregister_app functions to module.h to avoid the need to include pbx.h for the simpler apps; - move the ast_group structure to channel.h to remove the dependency of app.h on linkedlists.h Note, this is a long process that I am doing in small steps. The main difficulty is that now for each subsystem we have a single header (e.g. channel.h) included by the subsystem provider (usually one file, e.g. channel.c) and by its clients (dozens of them, e.g. we have some 70+ apps and 30+ functions). This requires the clients to include all the extra headers required by the provider (eg. lock.h, linkedlists.h, definitions of substructures...) even though many of the clients would be just happy with opaque struct declarations and function prototypes. The long term plan is to eventually rectify this structure so that the compilation can become faster, and also APIs are more stable. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16Start untangling header inclusion in a way that does not affectLuigi Rizzo
build times - tested, there is no measureable difference before and after this commit. In this change: use asterisk/compat.h to include a small set of system headers: inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h, stdlib.h, alloca.h, stdio.h Where available, the inclusion is conditional on HAVE_FOO_H as determined by autoconf. Normally, source files should not include any of the above system headers, and instead use either "asterisk.h" or "asterisk/compat.h" which does it better. For the time being I have left alone second-level directories (main/db1-ast, etc.). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-16Applications no longer need to call ast_module_user_add and ↵Joshua Colp
ast_module_user_remove. This is now taken care of in the pbx_exec function outside of the application. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-16It is no longer required for each module that deals with a channel to call ↵Joshua Colp
ast_module_user_hangup_all in it's unload function. The loader will automatically perform this action for it. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-10Merged revisions 60989 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r60989 | murf | 2007-04-09 12:32:07 -0600 (Mon, 09 Apr 2007) | 1 line This is a big improvement over the current CDR fixes. It may still need refinement, but this won't have as many folks bothered. This also adds the mods from 1.4/r.61136; ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31add author doxygen tag (issue #8241, kshumard)Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21merge new_loader_completion branch, including (at least):Kevin P. Fleming
- restructured build tree and makefiles to eliminate recursion problems - support for embedded modules - support for static builds - simpler cross-compilation support - simpler module/loader interface (no exported symbols) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07simplify autoconfig include mechanism (make tholo happy he can use lint ↵Kevin P. Fleming
again :-) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14This rather large commit changes the way modules are loaded. Luigi Rizzo
As partly documented in loader.c and include/asterisk/module.h, modules are now expected to return all of their methods and flags into a structure 'mod_data', and are normally loaded with RTLD_NOW | RTLD_LOCAL, so symbols are resolved immediately and conflicts should be less likely. Only in a small number of cases (res_*, typically) modules are loaded RTLD_GLOBAL, so they can export symbols. The core of the change is only the two files loader.c and include/asterisk/module.h, all the rest is simply adaptation of the existing modules to the new API, a rather mechanical (but believe me, time and finger-consuming!) process whose detail you can figure out by svn diff'ing any single module. Expect some minor compilation issue after this change, please report it on mantis http://bugs.digium.com/view.php?id=6968 so we collect all the feedback in one place. I am just sorry that this change missed SVN version number 20000! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-08since the module API is changing, it's a good time to const-ify the ↵Kevin P. Fleming
description() and key() return values git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06convert one more file...Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15remove the uses of the deprecated STANDARD_LOCAL_USERRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-30update doxygen docs to specify authorsRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29remove extraneous svn:executable propertiesKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-10clean up some application descriptions to use more gooder EnglishRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-06issue #5605Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6979 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-10-24Doxygen documentation update from oej (issue #5505)Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-10-19Massive cleanups to applications for LOCAL_USER handling and some other things.Russell Bryant
In general, LOCAL_USER_ADD/REMOVE should be the first/last thing called in an application. An exception is if there is some *fast* setup code that might halt the execution of the application, such as checking to see if an argument exists. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-10-18it's a good idea to unregister everything before calling ↵Russell Bryant
STANDARD_HANGUP_LOCALUSERS git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-09-14update MANY more files with proper copyright/license info (thanks Ian!)Kevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-06the last round of file version tagsKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-04-21use double-quotes instead of angle-brackets for non-system include files ↵Kevin P. Fleming
(bug #4058) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2003-10-22Fix compile warnings (bug #389)Mark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2003-09-29Change strdupa's to ast_strupda'sMark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2003-09-18Add closing bracketMartin Pycko
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2003-09-18Add NoCDR application; when called there won't be generated CDR record for ↵Martin Pycko
that call git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1528 65c4cc65-6c06-0410-ace0-fbb531ad65f3