Commit Graph

294 Commits

Author SHA1 Message Date
Kevin P. Fleming 9a7efae8fd remove the PBX_ODBC logic from the configure script, and add GENERIC_ODCB 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
2009-01-15 20:18:53 +00:00
Tilghman Lesher b584784f85 When querying for the structure of the CDR table, remove the schema, if it
exists.
(Closes issue #14058)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 18:09:58 +00:00
Tilghman Lesher c8223fc957 Merge ast_str_opaque branch (discontinue usage of ast_str internals)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-13 08:36:35 +00:00
Kevin P. Fleming 887e28d7aa incorporates r159808 from branches/1.4:
------------------------------------------------------------------------
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-29 17:57:39 +00:00
Terry Wilson 3a4177f52e Reloading the config and having no changes still initialized some settings 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-21 17:08:16 +00:00
Terry Wilson 4f8242904a Begin on a crusade to end trailing whitespace!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@158072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-20 17:48:58 +00:00
Terry Wilson d66a8cd264 Fix checking for CONFIG_STATUS_FILEINVALID so that modules don't crash upon trying to parse an invalid config
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-19 19:25:14 +00:00
Tilghman Lesher 03b1a5a384 Allow setting static values in CDRs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-14 22:36:30 +00:00
Kevin P. Fleming 448562af93 improve configure script to remember the previous value of each dependency 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-11-04 15:07:54 +00:00
Sean Bright ceee55ea63 Keep up with shadow warnings. One day I'll actually enable this in the Makefile.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@147457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-08 12:15:06 +00:00
Michiel van Baak 4560279c69 All ODBC parts can now use either unixodbc or iodbc.
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-10-06 23:14:33 +00:00
Sean Bright e189fb406f Build under dev-mode
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-12 00:49:31 +00:00
Tilghman Lesher 3a67cc8016 Add usegmtime, as per the recent -users list discussion, and also add my
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-11 21:45:07 +00:00
Sean Bright a8a0ecb509 Move some duplicated code into a separate function.
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-09-03 13:48:12 +00:00
Tilghman Lesher b95a4f4680 Oops
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-27 23:23:56 +00:00
Tilghman Lesher 8be98abf79 Memory leak
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-24 16:26:48 +00:00
Tilghman Lesher a88af95df4 Eliminate open coding of ast_str
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-24 16:23:15 +00:00
Sean Bright 2fbd22bbc2 Fix memory leak in cdr_sqlite3_custom.
(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-14 18:47:28 +00:00
Sean Bright 297ebf779f If we detect that we are no longer connected, try to reconnect a few times
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-14 15:03:03 +00:00
Sean Bright c2faa7bfda Use the ast_vasprintf macro instead of vasprintf directly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137403 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-13 14:22:47 +00:00
Sean Bright 9c7099faae Log the userfield CDR variable like the other CDR backends, assuming the
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-11 14:25:15 +00:00
Tilghman Lesher 8397209316 Fix runtime symbol error
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136406 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-07 15:10:53 +00:00
Sean Bright 778b3d88a7 More from the resolve-shadow-warnings branch. This time the cdr/ directory.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-07 00:52:23 +00:00
Brett Bryant 86e5bb8b7d Fix magic Revision keywords in hashtab.c and change cdr_radius.c to use
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-18 17:55:41 +00:00
Sean Bright 097ac98034 Fix a bug I noticed while doing the previous merge
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127398 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-02 14:30:09 +00:00
Sean Bright dd0c0f3d38 Cast a few more strings to char *, so that we can compile cleanly against
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-30 11:57:42 +00:00
Sean Bright a61f8794e3 This was bogus, need to find a better way.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@126319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-29 13:20:01 +00:00
Sean Bright e41a7c3d51 While we're at it, escape all the columns in our TDS queries as well. Double
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-29 13:11:55 +00:00
Sean Bright 044a7b945f Quote column names when inserting CDRs into postgres to avoid conflicts
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-29 12:06:46 +00:00
Sean Bright 19830f3359 Merge in changes from my cdr-tds-conversion branch. This changes the internal
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-28 21:28:16 +00:00
Steve Murphy c23e5fea96 This solves a crash in the cdr_tds module on 'stop gracefully', for 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-17 20:00:36 +00:00
Sean Bright f0b9647b09 Last commit for a bit, minor cleanups and move the lock initialization.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-16 17:33:10 +00:00
Sean Bright 4ee3510f10 Convert to use stringfields. Still some more work to do on config load/reload.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-16 17:14:11 +00:00
Sean Bright 852c514e25 Remove some unused variables
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123041 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-16 16:29:18 +00:00
Sean Bright 8b1ed7aa5b Coding guidelines stuff only.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-16 15:25:03 +00:00
Jeff Peeler ef3b214728 Goodbye Zaptel, hello DAHDI. Removes Zaptel driver support with DAHDI. 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-06-12 17:27:55 +00:00
Tilghman Lesher 1207e9207e Don't unload config on reload, when config has not changed.
(Closes issue #12652)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-15 17:58:22 +00:00
Tilghman Lesher 0c08b7727d Ensure that "calldate" is acceptable for a column name.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-10 14:19:41 +00:00
Sean Bright 87973ccea2 Minor logging cleanups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-20 14:52:07 +00:00
Tilghman Lesher 369ccdef5e Oops, buffer wasn't long enough for query
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-15 20:51:08 +00:00
Tilghman Lesher 7c26320110 If any field is not null, but has no default, then it must be set or the insert will fail.
(Closes issue #12285)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-11 23:26:56 +00:00
Tilghman Lesher ded5ec5b5d Merged revisions 113874 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r113874 | tilghman | 2008-04-09 13:57:33 -0500 (Wed, 09 Apr 2008) | 4 lines

If the [csv] section does not exist in cdr.conf, then an unload/load sequence
is needed to correct the problem.  Track whether the load succeeded with a
variable, so we can fix this with a simple reload event, instead.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@113875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-09 19:00:40 +00:00
Jason Parker 1958abd90e Merged revisions 110779 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r110779 | qwell | 2008-03-25 17:51:17 -0500 (Tue, 25 Mar 2008) | 6 lines

Make file access in cdr_custom similar to cdr_csv.

Fixes issue #12268.

Patch borrowed from r82344

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-25 22:51:55 +00:00
Terry Wilson b02bc230af Go through and fix a bunch of places where character strings were being interpreted as format strings. Most of these changes are solely to make compiling with -Wsecurity and -Wformat=2 happy, and were not
actual problems, per se.  I also added format attributes to any printf wrapper functions I found that didn't have them.  -Wsecurity and -Wmissing-format-attribute added to --enable-dev-mode.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 15:43:34 +00:00
Tilghman Lesher cafd900dc8 Convert prepare_and_execute to direct_execute for speed
(closes issue #11935)
 Reported by: falves11
 Patches: 
       20080208__bug11935.diff.txt uploaded by Corydon76 (license 14)
 Tested by: falves11, Corydon76


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 21:10:45 +00:00
Tilghman Lesher 408228bfb8 Whitespace changes only
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 16:28:03 +00:00
Tilghman Lesher fbb78d988d Convert to use ast_str
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-29 23:53:42 +00:00
Tilghman Lesher f274f7bcaa Permit additional CDR columns to be saved in Postgres. Note that these
changes are backward-compatible, so no changes to UPGRADE.txt are
necessary.
(closes issue #9279)
 Reported by: rottenroddy
 Patches: 
       20080125__bug9279.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104101 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-25 23:04:20 +00:00
Tilghman Lesher ac3c95e370 Change the way the new filter feature works, by allowing it to be a column NOT
logged into the database.  This will allow more granularity of a decision
evaluated in the dialplan, then takes effect when posting the CDR.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-17 00:13:32 +00:00
Tilghman Lesher 799246dae3 Add the "filter" keyword
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-15 23:52:11 +00:00