Commit Graph

352 Commits

Author SHA1 Message Date
Jason Parker
b69a22540f Disable extended and deprecated modules by default.
Users can still enable any of these using menuselect if they so choose.

(closes issue AST-873)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8-digiumphones@363374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-24 20:57:26 +00:00
Jonathan Rose
ff07b89e63 Fix column duplication bug in module reload for cdr_pgsql.
Prior to this patch, attempts to reload cdr_pgsql.so would cause the column list to keep
its current data and then add a second copy during the reload. This would cause attempts
to log the CDR to the database to fail. This patch also cleans up some unnecessary null
checks for ast_free and deals with a few potential locking problems.

(closes issue ASTERISK-19216)
Reported by: Jacek Konieczny
Review: https://reviewboard.asterisk.org/r/1711/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@354263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-07 15:04:38 +00:00
Richard Mudgett
f2e1640435 Fix deadlock when using dummy channels.
Dummy channels created by ast_dummy_channel_alloc() should be destoyed by
ast_channel_unref().  Using ast_channel_release() needlessly grabs the
channel container lock and can cause a deadlock as a result.

* Analyzed use of ast_dummy_channel_alloc() and made use
ast_channel_unref() when done with the dummy channel.  (Primary reason for
the reported deadlock.)

* Made app_dial.c:dial_exec_full() not call ast_call() holding any channel
locks.  Chan_local could not perform deadlock avoidance correctly.
(Potential deadlock exposed by this issue.  Secondary reason for the
reported deadlock since the held lock was part of the deadlock chain.)

* Fixed some uses of ast_dummy_channel_alloc() not checking the returned
channel pointer for failure.

* Fixed some potential chan=NULL pointer usage in func_odbc.c.  Protected
by testing the bogus_chan value.

* Fixed needlessly clearing a 1024 char auto array when setting the first
char to zero is enough in manager.c:action_getvar().

(closes issue ASTERISK-18613)
Reported by: Thomas Arimont
Patches:
      jira_asterisk_18613_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: Thomas Arimont


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@337973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-26 19:30:39 +00:00
Tilghman Lesher
441e8b7426 Duration and billsec are swapped in high resolution time.
Closes ASTERISK-18024
Patches:
	20110726__ASTERISK-18024.diff by Tilghman Lesher (License 5003)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@329613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-27 04:23:46 +00:00
Leif Madsen
fc0ea9d188 Revert changes to defaultenabled state for modules in Asterisk 1.8
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@328446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-15 20:41:12 +00:00
Leif Madsen
d4938a111e 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/branches/1.8@328209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14 20:13:06 +00:00
Richard Mudgett
6b10de8830 Asterisk crash when unloading cdr_radius/cel_radius.
The rc_openlog() API call is passed a string that is used by openlog() to
format log messages.  The openlog() does not copy the string it just keeps
a pointer to it.  When the module is unloaded, the string is gone from
memory.  Depending upon module load order and if the other module then has
an error, a crash happens.

* Pass rc_openlog() a strdup'd string with the understanding that there
will be a small memory leak if the cdr_radius/cel_radius modules are
unloaded.

* Call rc_destroy() to free the rc handle memory when the module is
unloaded.

JIRA AST-483
JIRA SWP-3062


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321926 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-03 22:09:36 +00:00
Russell Bryant
448ceb5291 Don't lose cdr_syslog config on a reload.
(closes issue #18679)
Reported by: enegaard
Patches:
      issue18679_seanbright.patch uploaded by seanbright (license 71)
Tested by: enegaard


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@317480 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-05 23:00:55 +00:00
Russell Bryant
1ccfa50ba8 Fix more "set but unused" warnings.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@317474 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-05 22:36:33 +00:00
Paul Belanger
f49a8e575e Merged revisions 300574 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r300574 | pabelanger | 2011-01-05 11:28:07 -0500 (Wed, 05 Jan 2011) | 6 lines
  
  Change deprecated message to LOG_WARNING
  
  Also removed latter part of message
  
  Discussed on #asterisk-dev
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@300575 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-05 16:29:19 +00:00
Tilghman Lesher
8d1bcaeb50 Merged revisions 299130 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r299130 | tilghman | 2010-12-20 11:41:24 -0600 (Mon, 20 Dec 2010) | 11 lines
  
  If a call was not answered, then the billsec was calculated unusually large.
  
  Also, due to a copy and paste error, a request for the answer field would have
  given the start value, instead.
  
  (closes issue #18460)
   Reported by: joscas
   Patches: 
         20101215__issue18460.diff.txt uploaded by tilghman (license 14)
   Tested by: joscas
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@299131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-20 17:47:10 +00:00
Tilghman Lesher
fbae293b44 Merged revisions 298393 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r298393 | tilghman | 2010-12-15 18:29:10 -0600 (Wed, 15 Dec 2010) | 15 lines
  
  Merged revisions 298392 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r298392 | tilghman | 2010-12-15 18:28:04 -0600 (Wed, 15 Dec 2010) | 8 lines
    
    Unregister before shutting down the connection, to avoid a race.
    
    (closes issue #18481)
     Reported by: pabelanger
     Patches: 
           20101215__issue18481.diff.txt uploaded by tilghman (license 14)
     Tested by: pabelanger
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@298394 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-16 00:30:04 +00:00
Tilghman Lesher
388afd2b80 Add missing option to set calls to be logged in GMT/UTC.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@291038 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-09 23:25:37 +00:00
Tilghman Lesher
2eb6c7395d Merged revisions 288637 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r288637 | tilghman | 2010-09-23 22:36:01 -0500 (Thu, 23 Sep 2010) | 9 lines
  
  Merged revisions 288636 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r288636 | tilghman | 2010-09-23 22:20:24 -0500 (Thu, 23 Sep 2010) | 2 lines
    
    Solaris compatibility fixes
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@288638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-24 03:39:29 +00:00
Tilghman Lesher
43a8a2dcad Merged revisions 288267 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r288267 | tilghman | 2010-09-22 10:11:09 -0500 (Wed, 22 Sep 2010) | 23 lines
  
  Merged revisions 288265-288266 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r288265 | tilghman | 2010-09-22 09:48:04 -0500 (Wed, 22 Sep 2010) | 9 lines
    
    Allow the encoding to be set, in case local charset does not agree with database.
    
    (closes issue #16940)
     Reported by: jamicque
     Patches: 
           20100827__issue16940.diff.txt uploaded by tilghman (license 14)
           20100921__issue16940__1.6.2.diff.txt uploaded by tilghman (license 14)
     Tested by: jamicque
  ........
    r288266 | tilghman | 2010-09-22 10:04:52 -0500 (Wed, 22 Sep 2010) | 5 lines
    
    Document addition of encoding parameter.
    
    (issue #16940)
    Reported by: jamicque
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@288268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-22 15:14:02 +00:00
Tilghman Lesher
37e25116a1 Merged revisions 283318 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r283318 | tilghman | 2010-08-23 16:32:14 -0500 (Mon, 23 Aug 2010) | 2 lines
  
  CDR drivers depend upon res_odbc, not directly on the ODBC libraries
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@283319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-23 21:33:47 +00:00
Tilghman Lesher
927130f81f Don't re-register CDR module on reload.
(closes issue #17304)
 Reported by: jnemeth
 Patches: 
       20100507__issue17304.diff.txt uploaded by tilghman (license 14)
 Tested by: jnemeth


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@279410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-25 18:21:27 +00:00
Tilghman Lesher
b4e18d5660 Add load priority order, such that preload becomes unnecessary in most cases
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-20 19:35:02 +00:00
Leif Madsen
0c7357c94e cdr_pgsql does not detect when a table is found.
This change adds an ERROR message to let you know when a failure exists to
get the columns from the pgsql database, which typically means that the
table does not exist.

(closes issue #17478)
Reported by: kobaz
Patches:
      cdr_pgsql.patch uploaded by kobaz (license 834)
Tested by: kobaz, russell, lmadsen

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@275626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-12 15:37:01 +00:00
Olle Johansson
28cbe2f75e Make it possible to disable individual cdr files per accountcode in cdr_csv
Review: https://reviewboard.asterisk.org/r/678/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@274866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-09 11:06:19 +00:00
Bradley Latus
4405813297 Add High Resolution Times to CDRs for Asterisk
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-08 23:48:17 +00:00
Sean Bright
285ef284ef Merged revisions 269006 via svnmerge from
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-06-08 15:39:52 +00:00
Tilghman Lesher
012979b835 Ensure that we can have commas within cdr values.
(closes issue #17001)
 Reported by: snuffy
 Patches: 
       20100412__issue17001.diff.txt uploaded by tilghman (license 14)
 Tested by: snuffy


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@257065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-13 16:33:21 +00:00
Russell Bryant
3da9f8ed19 Resolve more compiler warnings on FreeBSD.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@253540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-20 12:03:07 +00:00
Sean Bright
9a3d1b76e3 Fix building CDR and CEL SQLite3 modules.
They added a sqlite3_log() function which was conflicting with our function
names.

(closes issue #17017)
Reported by: alephlg


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@252314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-14 17:43:46 +00:00
Russell Bryant
a297f2d04e formatting tweaks and constification
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@249058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-26 08:45:11 +00:00
Russell Bryant
1f2f5fadcc trivial formatting tweak (working on reducing diff against trunk for cdr-q)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@249013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-26 08:08:38 +00:00
Russell Bryant
2abbaa5b6d remove include
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@249012 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-26 08:07:27 +00:00
Russell Bryant
022e262d71 constification, remove include
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@249011 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-26 08:07:09 +00:00
Russell Bryant
ab9741edbb Remove unnecessary includes, formatting tweak
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@249010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-26 08:05:36 +00:00
Russell Bryant
5e9c39468b constification and remove unnecessary include
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@249009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-26 08:04:07 +00:00
Sean Bright
e612d87695 Convert a few places to use ast_calloc_with_stringfields where applicable.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@240368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-15 18:21:50 +00:00
Tilghman Lesher
98a07b127f When the field is blank, don't warn about the field being unable to be coerced, just skip the column.
(closes http://lists.digium.com/pipermail/asterisk-dev/2009-December/041362.html)
Reported by Nic Colledge on the -dev list, fixed by me.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@236847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-30 17:53:29 +00:00
Matthew Nicholson
c7358b39b7 Don't close the sqlite database when reloading. Only close the database when unloading.
(closes issue #15953)
Reported by: frawd
Patches:
      sqlite3_rev220097.diff uploaded by frawd (license 610)
Tested by: frawd


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@223136 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-09 17:14:38 +00:00
Olle Johansson
fff998bf41 Use extref for doxygen references to external libraries (in this case PostgreSQL)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222614 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-07 18:55:25 +00:00
Tilghman Lesher
2d60b75594 Change schema query to involve the use of an optional schema parameter.
This change is done in such a way as to allow the driver to continue to
function with older databases which don't have these features.
(closes issue #16000)
 Reported by: jamicque
 Patches: 
       20091002__issue16000.diff.txt uploaded by tilghman (license 14)
       20091002__issue16000__1.6.1.diff.txt uploaded by tilghman (license 14)
 Tested by: jamicque


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222309 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-06 19:31:39 +00:00
Tilghman Lesher
642bec4d6f AST-2009-005
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-10 19:20:57 +00:00
Sean Bright
a4284a507b Add a new module, cdr_syslog, which allows writing CDRs to syslog.
The original patch for this was written by Brett Bryant, and I split it out into
it's own module.

(closes issue #12876)
Reported by: bbryant
Patches:
      06162008_cdr_custom_syslog.diff uploaded by bbryant (license 36)
      05212009_cdr_syslog.patch uploaded by seanbright (license 71)
Tested by: seanbright

Review: https://reviewboard.asterisk.org/r/297/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-26 22:08:05 +00:00
Russell Bryant
0264eef115 Merge the new Channel Event Logging (CEL) subsystem.
CEL is the new system for logging channel events.  This was inspired after
facing many problems trying to represent what is possible to happen to a call
in Asterisk using CDR records.  For more information on CEL, see the built in
HTML or PDF documentation generated from the files in doc/tex/.

Many thanks to Steve Murphy (murf) and Brian Degenhardt (bmd) for their hard
work developing this code.  Also, thanks to Matt Nicholson (mnicholson) and
Sean Bright (seanbright) for their assistance in the final push to get this
code ready for Asterisk trunk.

Review: https://reviewboard.asterisk.org/r/239/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-26 15:28:53 +00:00
Sean Bright
1fa4796b19 Update sample cdr_tds configuration to try and eliminate some confusion.
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
2009-06-24 13:47:55 +00:00
Sean Bright
8d3fb80928 Fix lock usage in cdr_sqlite3_custom to avoid potential crashes during reload.
Pointed out by Russell while working on the CEL branch.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@202417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-22 16:09:50 +00:00
Russell Bryant
356c0e2f8c Note a bug in cdr_sqlite3_custom so I don't forget about it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@202301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-21 16:36:55 +00:00
Russell Bryant
eccfeaf9b4 Fix possibility of crashiness during reload in custom fields handling.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@202262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-21 16:11:48 +00:00
Russell Bryant
32fdcc00b2 Standardize return values of load_config() so reload() doesn't report an error on success.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@202258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-21 16:00:23 +00:00
Russell Bryant
f57752d380 Leave a note about some unsafe code in cdr_manager
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@202223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-20 20:56:13 +00:00
Russell Bryant
b390327dd7 Remove unnecessary usleep() from a couple of module unload callbacks.
In passing, also tweak cdr_unregister() to hold the list lock a bit less time.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@202109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-20 14:09:40 +00:00
Kevin P. Fleming
82fb56886e More 'static' qualifiers on module global variables.
The 'pglobal' tool is quite handy indeed :-)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-15 17:34:30 +00:00
Sean Bright
9a83ed9d93 Use a properly allocated channel for substitution in cdr_sqlite3_custom.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-26 13:56:30 +00:00
Sean Bright
b543887664 Use a properly allocated channel for substitution in cdr_manager.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-26 12:14:14 +00:00
Sean Bright
1d28f5acd4 Fix errors in cdr_custom that cause reference errors when non-CDR variable
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-23 15:16:59 +00:00