summaryrefslogtreecommitdiff
path: root/cdr
AgeCommit message (Collapse)Author
2009-05-26Use a properly allocated channel for substitution in cdr_sqlite3_custom.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-26Use a properly allocated channel for substitution in cdr_manager.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-23Fix errors in cdr_custom that cause reference errors when non-CDR variableSean Bright
substitution is done. cdr_custom was creating a ast_channel struct directly and passing it into the core for variable substition. This was fine as long as the format string contained only calls to the CDR() function. Doing something like ${EPOCH} on the other hand tried to lock the channel, which would fail and throw an error because the passed channel hadn't been allocated as an ao2 object. So now we create the dummy channel with ast_channel_alloc, and everything works as expected. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196520 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
2009-05-18Remove some unused code.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-18Const-ify a string, fix a log message, and use the correct signature for theSean Bright
load_module function. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-18Allow cdr_custom to write to multiple files instead of just one.Sean Bright
Up to now, cdr_custom would only accept a single filename/format from cdr_custom.conf. This change allows you to specify multiple filename & format directives. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-29Merge str_substitution branch.Tilghman Lesher
This branch adds additional methods to dialplan functions, whereby the result buffers are now dynamic buffers, which can be expanded to the size of any result. No longer are variable substitutions limited to 4095 bytes of data. In addition, the common case of needing buffers much smaller than that will enable substitution to only take up the amount of memory actually needed. The existing variable substitution routines are still available, but users of those API calls should transition to using the dynamic-buffer APIs. Reviewboard: http://reviewboard.digium.com/r/174/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-03Merged revisions 186229 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r186229 | russell | 2009-04-02 20:57:44 -0500 (Thu, 02 Apr 2009) | 21 lines Fix a memory leak in cdr_radius. I came across this while doing some testing of my ast_channel_ao2 branch. After running a test overnight that generated over 5 million calls, Asterisk had taken up about 1 GB of my system memory. So, I re-ran the test with MALLOC_DEBUG turned on. However, it showed no leaks in Asterisk during the test, even though Asterisk was still consuming it somehow. Instead, I turned to valgrind, which when run with --leak-check=full, told me exactly where the leak came from, which was from allocations inside the radiusclient-ng library. This explains why MALLOC_DEBUG did not report it. After a bit of analysis, I found that we were leaking a little bit of memory every time a CDR record was passed to cdr_radius. I don't actually have a radius server set up to receive CDR records. However, I always have my development systems compile and install all modules. In addition to making sure there are not build errors across modules, always loading modules helps find bugs like this, too, so it is strongly recommend for all developers. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-02Backport 1.6.0 fix to trunk (failsafe if db is not loaded)Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@179361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-27If config file is blank, don't load module.Tilghman Lesher
(Closes issue #14563) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@179161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-15remove the PBX_ODBC logic from the configure script, and add GENERIC_ODCB ↵Kevin P. Fleming
logic that includes copying the relevant LIB and INCLUDE data from either UnixODBC or iODBC, based on which was found; if both were found, prefer UnixODBC this stops modules from being linked against both sets of libraries on systems that have both installed git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15When querying for the structure of the CDR table, remove the schema, if itTilghman Lesher
exists. (Closes issue #14058) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-13Merge ast_str_opaque branch (discontinue usage of ast_str internals)Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163991 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-21Reloading the config and having no changes still initialized some settings ↵Terry Wilson
to 0. Initialize settings after doing all of the cfg checks. (closes issue #13942) Reported by: davidw Patches: cdr_diff.txt uploaded by otherwiseguy (license 396) Tested by: davidw git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@158374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-20Begin on a crusade to end trailing whitespace!Terry Wilson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@158072 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-11-14Allow setting static values in CDRsTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-04improve configure script to remember the previous value of each dependency ↵Kevin P. Fleming
in build_tools/menuselect-deps, so that (once it has been written) menuselect can use this information to warn the user when a previously met dependency is no longer met along the way, change tags used in configure script, menuselect-deps and code for various dependencies to be consistently named git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@154151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-08Keep up with shadow warnings. One day I'll actually enable this in the ↵Sean Bright
Makefile. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@147457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-06All ODBC parts can now use either unixodbc or iodbc.Michiel van Baak
This allows for the ODBC parts to work on OpenBSD as well. 99.99% of the work is done by seanbright (bow, bow) and I actually did nothing but test and yell at him that it still didn't work :) Thanks for helping out ! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@146925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-12Build under dev-modeSean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-11Add usegmtime, as per the recent -users list discussion, and also add myTilghman Lesher
explanation to the file, since that additional text helps people understand the concept. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-03Move some duplicated code into a separate function.Sean Bright
Also try to do some wacky stuff in the commit message, like: a newline \n a bell \a a tab \t a format specification %p That is all. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-27OopsTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-24Memory leakTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-24Eliminate open coding of ast_strTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-14Fix memory leak in cdr_sqlite3_custom.Sean Bright
(closes issue #13304) Reported by: eliel Patches: sqlite.patch uploaded by eliel (license 64) (Slightly modified by me) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137933 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-18Fix magic Revision keywords in hashtab.c and change cdr_radius.c to use Brett Bryant
the same keyword as the other files (patch by eliel). (closes issue #13104) Reported by: eliel Patches: revision.patch uploaded by eliel (license 64) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@132050 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-29Quote column names when inserting CDRs into postgres to avoid conflictsSean Bright
with reserved words. (closes issue #12947) Reported by: panolex git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@126274 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
2008-06-12Goodbye Zaptel, hello DAHDI. Removes Zaptel driver support with DAHDI. ↵Jeff Peeler
Configuration file and dialplan backwards compatability has been put in place where appropiate. Release announcement to follow. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-15Don't unload config on reload, when config has not changed.Tilghman Lesher
(Closes issue #12652) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-10Ensure that "calldate" is acceptable for a column name.Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-20Minor logging cleanupsSean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114314 65c4cc65-6c06-0410-ace0-fbb531ad65f3