summaryrefslogtreecommitdiff
path: root/cdr/cdr_tds.c
AgeCommit message (Collapse)Author
2014-07-25Add module support level to ast_module_info structure. Print it in CLI ↵Mark Michelson
"module show" . ASTERISK-23919 #close Reported by Malcolm Davenport Review: https://reviewboard.asterisk.org/r/3802 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-27Prevent CDR backends from unregistering while billing data is in flightMatthew Jordan
This patch makes it so that CDR backends cannot be unregistered while active CDR records exist. This helps to prevent billing data from being lost during restarts and shutdowns. Review: https://reviewboard.asterisk.org/r/2880/ ........ Merged revisions 402081 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402082 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-08-21Fix misuses of asprintf throughout the code.Mark Michelson
This fixes three main issues * Change asprintf() uses to ast_asprintf() so that it pairs properly with ast_free() and no longer causes MALLOC_DEBUG to freak out. * When ast_asprintf() fails, set the pointer NULL if it will be referenced later. * Fix some memory leaks that were spotted while taking care of the first two points. (Closes issue ASTERISK-20135) reported by Richard Mudgett Review: https://reviewboard.asterisk.org/r/2071 ........ Merged revisions 371590 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371591 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371592 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371593 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
2010-07-20Add load priority order, such that preload becomes unnecessary in most casesTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-08Add High Resolution Times to CDRs for AsteriskBradley Latus
People expressed an interest in having access to the exact length of calls to a finer degree than seconds. See the CHANGES and UPGRADE.txt for usage also updated the sample configs to note the change. Patch by snuffy. (closes issue #16559) Reported by: cianmaher Tested by: cianmaher, snuffy Review: https://reviewboard.asterisk.org/r/461/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@269153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-08Merged revisions 269006 via svnmerge from Sean Bright
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r269006 | seanbright | 2010-06-08 11:28:49 -0400 (Tue, 08 Jun 2010) | 11 lines Reduce startup time for cdr_tds with large CDR tables. Since we are just checking for table existence, add a WHERE clause that will return no rows but will raise an error if the table doesn't exist. (closes issue #17380) Reported by: kkwong Patches: issue17380-01.patch uploaded by seanbright (license 71) Tested by: kkwong ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@269007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-26formatting tweaks and constificationRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@249058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-26Remove unnecessary includes, formatting tweakRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@249010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-15Convert a few places to use ast_calloc_with_stringfields where applicable.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@240368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-24Update sample cdr_tds configuration to try and eliminate some confusion.Sean Bright
Also change the preferred configuration option from 'hostname' (which was misleading because it didn't actually treat the value as a hostname) to 'connection' and added some verbage explaining that the user would need to refer to their freetds.conf file for those settings. 'hostname' was kept as a backwards compatible configuration parameter. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@202887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-29incorporates r159808 from branches/1.4:Kevin P. Fleming
------------------------------------------------------------------------ r159808 | kpfleming | 2008-11-29 10:58:29 -0600 (Sat, 29 Nov 2008) | 7 lines update dev-mode compiler flags to match the ones used by default on Ubuntu Intrepid, so all developers will see the same warnings and errors since this branch already had some printf format attributes, enable checking for them and tag functions that didn't have them format attributes in a consistent way ------------------------------------------------------------------------ in addition: move some format attributes from main/utils.c to the header files they belong in, and fix up references to the relevant functions based on new compiler warnings git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-19Fix checking for CONFIG_STATUS_FILEINVALID so that modules don't crash upon ↵Terry Wilson
trying to parse an invalid config git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-14If we detect that we are no longer connected, try to reconnect a few timesSean Bright
before giving up. This relies on the timeout settings in the freetds.conf file and, unfortunately, on a recent version of FreeTDS (0.82 or newer). I either need to change the current execs to be non-blocking (which I do not want to do) or we have to force people to run with the latest and greatest of FreeTDS. I'm on the fence... git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-13Use the ast_vasprintf macro instead of vasprintf directly.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137403 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-11Log the userfield CDR variable like the other CDR backends, assuming theSean Bright
column is actually there. If it's not, we still log everything else as before. (closes issue #13281) Reported by: falves11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-07Fix runtime symbol errorTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136406 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-07More from the resolve-shadow-warnings branch. This time the cdr/ directory.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-02Fix a bug I noticed while doing the previous mergeSean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127398 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-30Cast a few more strings to char *, so that we can compile cleanly againstSean Bright
FreeTDS 0.60. Update the docs to reflect that we can now compile and run against all modern releases of FreeTDS (0.60 through 0.82) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@126513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-29This was bogus, need to find a better way.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@126319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-29While we're at it, escape all the columns in our TDS queries as well. DoubleSean Bright
quotes seems to be more standard than square brackets (Sybase and SQL Server both support them). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@126312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-28Merge in changes from my cdr-tds-conversion branch. This changes the internalSean Bright
implementation from using the volatile libtds, to using the db-lib front end. The unintended side effect of this is that we support (at least) versions 0.62 through 0.82 of the FreeTDS distribution without any #ifdef ugliness. (closes issue #12844) Reported by: jcollie git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@126226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-17This solves a crash in the cdr_tds module on 'stop gracefully', for ↵Steve Murphy
situations where 'settings' is not set to a pointer git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-16Last commit for a bit, minor cleanups and move the lock initialization.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-16Convert to use stringfields. Still some more work to do on config load/reload.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-16Remove some unused variablesSean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123041 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-16Coding guidelines stuff only.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21remove another set of redundant #include "asterisk/options.h"Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19another bunch of include removals (errno.h and asterisk/logger.h)Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89425 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-11-07Merged revisions 89088 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r89088 | murf | 2007-11-07 14:40:28 -0700 (Wed, 07 Nov 2007) | 1 line In response to 10578, I just ran 1.4 thru valgrind; some of the config leakage I've already fixed, but it doesn't hurt to double check. I found and fixed leaks in res_jabber, cdr_tds, pbx_ael. Nothing major, tho. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16Don't reload a configuration file if nothing has changed.Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18Merge in ast_strftime branch, which changes timestamps to be accurate to the ↵Tilghman Lesher
microsecond, instead of only to the second git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14Merged revisions 69392 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r69392 | kpfleming | 2007-06-14 16:50:40 -0500 (Thu, 14 Jun 2007) | 2 lines use ast_localtime() in every place localtime_r() was being used ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69405 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14Add a massive set of changes for converting to use the ast_debug() macro.Russell Bryant
(issue #9957, patches from mvanbaak, caio1982, critch, and dimas) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06Issue 9869 - replace malloc and memset with ast_calloc, and other coding ↵Tilghman Lesher
guidelines changes git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-03bug #8076 check option_debug before printing to debug channel.Matt O'Gorman
patch provided in bugnote, with minor changes. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21Merged revisions 43410 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r43410 | tilghman | 2006-09-21 11:31:59 -0500 (Thu, 21 Sep 2006) | 10 lines Merged revisions 43409 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r43409 | tilghman | 2006-09-21 11:18:19 -0500 (Thu, 21 Sep 2006) | 2 lines TDS 0.64 updates ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20resolve compiler warnings from constificationRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31fix some breakage, MOG DID IT!!!Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31everything that loads a config that needs a config file to runMatt O'Gorman
now reports AST_MODULE_LOAD_DECLINE when loading if config file is not there, also fixed an error in res_config_pgsql where it had a non static function when it should. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41633 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-24Thanks to the fine work of Russell Bryant and Dancho Lazarov, we now have ↵Kevin P. Fleming
autoconf and menuselect tools for Asterisk! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-17more module loader related fixesKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20963 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-03-08allows the table field to be configurable forMatt O'Gorman
cdr_tds.conf. patch provided by bug 6629 with minor change. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-01Merged revisions 11503 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r11503 | tilghman | 2006-03-01 11:41:52 -0600 (Wed, 01 Mar 2006) | 2 lines Bug 6615 - Fix 64bit conversion errors by using a long int ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11504 65c4cc65-6c06-0410-ace0-fbb531ad65f3