Commit Graph

404 Commits

Author SHA1 Message Date
Nir Simionovich 4559cd0e28 This patch adds a beanstalk CDR backend.
Beanstalkd is a simple to use job queue. It provides a means to
create multiple job queues called "tubes". Each tube can store
multiple jobs, with varying priorities with the queue. Queue
processing is available via a simple TCP socket or via well defined
libraries, avaialble at
https://github.com/kr/beanstalkd/wiki/client-libraries

This module is based upon the beanstalk-client library, available
for download at: https://github.com/deepfryed/beanstalk-client

Change-Id: I5fe4089a34ab3b39230786d9bbfddafa56715f48
2017-10-20 10:08:05 -04:00
Tzafrir Cohen 97a75e3829 Add support for building RADIUS with radcli
Radcli is yet another RADIUS client library, generally compatible with
freeradius and radiusclient-ng.

This commit adds autoconf option for detecting it as well and changes
cdr_radius and cel_radius to use its header file in that case.

ASTERISK-26540 #close

Change-Id: I271f0715406334874865ffbce0b354b3a2ca148f
2016-11-14 19:40:03 +02:00
Corey Farrell a6e5bae3ef Remove ASTERISK_REGISTER_FILE.
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
2016-10-27 09:53:55 -04:00
Badalyan Vyacheslav 01d1d3763f cdr_radius,cel_radius: Fix old memleak in unload
- Call "rc_openlog" optional. If you do not call,
you will simply NULL instead of a name.

- On the one PID can be only one syslog channel.
And it can already be run in logger.c

- Calling rc_openlog we assigns a new name for
the channel syslog. This unexpected behavior for logger.c.

Most lesser evil, is to agree on a NULL name syslog
if the channel was not launched in logger.c.

It also solves the problem of memory leaks.

ASTERISK-26455 #close

Change-Id: Ic17c38de67583e971d78fe18807d1a9faf8f0afd
2016-10-25 11:45:37 +00:00
Rodrigo Ramírez Norambuena b156a291af cdr_adaptive_odbc: Fix DNSs mixed config quote quoted_identifiers
When haved more than once DNSs config and one of their dont set
quoted_identifiers and before this is with configurated with
quoted_identifiers resulting a truncate statement for a reference null
for quote character identifier.

This patch initializes quoted flag before build SQL Query

Example config for this bugfix case in cdr_adaptive_odbc.conf file

	[first]
	connection=asterisk-server1
	table=cdr
	quoted_identifiers="

	[second]
	connection=asterisk-server2
	table=cdr

	[third]
	connection=asterisk-server3
	table=cdr
	quoted_identifiers=`

Change-Id: Ibd95667b468e10d4a19a2b9d88b9934ec7207e1d
2016-08-05 23:20:26 -04:00
Richard Mudgett 40d19f2e55 logging,cdr,cel: Fix stringfield memory leak.
The stringfields refactor to allow adding stringfields to the end of a
structure (f6f4cf459f) exposed some
incomplete cleanup code by some stringfield users.

The most noticeable leaker is the logging system where there is a leak for
every log message generated.

ASTERISK-26078 #close
Reported by:  Etienne Lessard
Patches:
      jira_asterisk_26078_v13.patch (license #5621) patch uploaded
      by Richard Mudgett

Change-Id: If6a08b31336b492c3de6f9dfd07c447f8d5a8782
2016-06-01 14:09:36 -05:00
Rodrigo Ramírez Norambuena 0ec9fe5421 main/cli.c: Refactor function to print seconds formatted
Refactor and created function ast_cli_print_timestr_fromseconds to print
seconds formatted:  year(s) week(s) day(s) hour(s) second(s)

This function now is used in addons/cdr_mysql.c,cdr_pgsql.c, main/cli.c,
res_config_ldap.c, res_config_pgsql.c.

Change-Id: Ibeb8634102cd11d3f8623398b279cb731bcde36c
2016-03-07 03:42:18 -03:00
Rodrigo Ramírez Norambuena 2fb45c7801 cdr_pgsql.cl: REFACTOR Macro LENGTHEN_BUF
Remove repeated code on macro of assigned buffer to SQL vars.

Add table and connection name to log error message when is not possible
allocate memory.

Change-Id: I1fbf37d286a032d38fdda72a9f736356956c9ffe
2016-01-23 14:41:38 -03:00
Rodrigo Ramírez Norambuena 99aa7cb26e dr_adaptive_odbc.c, cel_odbc.c, cel_pgsql.c: REFACTOR Macro LENGTHEN_BUF
Remove repeated code on macro of assigned buffer to SQL vars

Change-Id: Icb19ad013124498e172ea1d0b29ccd0ed17deef0
2015-09-18 12:51:59 -03:00
Elazar Broad 293c9f6894 cdr/cdr_adaptive_odbc.c: Fix quoted identifier usage when inserting CDR records
Commit a24ce38 added support for the use of quoted indentifiers when inserting
CDR records into the database. However, the if statement logic responsible for
determining whether to use those identifiers is reversed, resulting in a
reference to the quoted identifier character buffer which will be null, hence
null terminating the SQL query, resulting in a truncated statement which
fails to execute.

ASTERISK-25263 #close
Reported by: Elazar Broad
Tested by: Elazar Broad

Change-Id: I40da47309b67cc1572207b1515dcc08ec9b1f644
2015-07-20 17:46:19 -05:00
Matt Jordan 2a6282f4d8 Merge "cdr/cdr_csv.c: Set file name for csv master to the module when (re)loaded." 2015-06-02 12:02:01 -05:00
Rodrigo Ramírez Norambuena 2cd40c2bd7 cdr/cdr_csv.c: Set file name for csv master to the module when (re)loaded.
Compute the location for the csv master file when the module is
loaded or reload.  Before it was calculated every time a log
entry was written.

Change-Id: I3ed9f6a8f965308099db70b71128f43d4d3f5585
2015-06-01 15:14:58 -05:00
Rodrigo Ramírez Norambuena 9c3c7797e5 cel, cdr: Assigned separator for column name and values.
Use a separator string between column names and values for SQL sentences
instead of evaluating the separator to use each time.

This change adds a space after the comma in constructing SQL sentences.
Before the SQL was created like "INSERT INTO cdr(calldate,clid,dst"
without spaces between column name and values.

The files applied this change are cdr/cdr_adaptive_odbc.c, cdr/cdr_pgsql.c,
cel/cel_odbc.c

ASTERISK-25109 #close
Reported By: Rodrigo Ramírez Norambuena <decipher.hk@gmail.com>

Change-Id: Ia5a1a161f5e26e1643703b30f8cc9cf0860cc7ea
2015-05-20 12:08:18 -04:00
Joshua Colp 2bbfcfc647 Merge "cdr_adaptive_odbc: Add ability to set character for quoted identifiers." 2015-05-14 05:28:16 -05:00
Joshua Colp 4505f5e676 Merge "cdr_pgsql, cel_pgsql: Store maximum buffer size to prevent reallocation" 2015-05-13 15:17:48 -05:00
Joshua Colp d5acf9f1ea Merge "cdr_pgsql: Use PQescapeStringConn for escaping names." 2015-05-13 04:35:55 -05:00
Rodrigo Ramírez Norambuena e6daafb8a6 cdr_pgsql, cel_pgsql: Store maximum buffer size to prevent reallocation
The code previously used a fixed size of 512 for the SQL
queries. Depending on the size this may require it to grow.

This change makes it so if the buffer size does grow the size
is stored and next time the buffer will be large enough.

Change-Id: I55385899f1c06dee47e4274c2d21538037b2d895
2015-05-12 05:11:39 -05:00
Rodrigo Ramírez Norambuena c61b146238 cdr_pgsql: Use PQescapeStringConn for escaping names.
Use function PQescapeStringConn for escaping the name
of the table and schema instead of doing it manually.

Change-Id: I6709165e2d00463e9c813d24f17830ad4910b599
2015-05-11 07:42:22 -05:00
Matt Jordan d679f1d9b5 Merge "cdr/cdr_csv.c: Refactor, function to write content of csv file." 2015-05-07 07:05:35 -05:00
Rodrigo Ramírez Norambuena a24ce38e5e cdr_adaptive_odbc: Add ability to set character for quoted identifiers.
Added the ability to set the character to quote identifiers. This
allows adding the character at the start and end of table and column
names. This setting is configurable for cdr_adaptive_odbc via the
quoted_identifiers in configuration file cdr_adaptive_odbc.conf.

ASTERISK-25006

Change-Id: I0b9a56b79ca13a727a803d88ed3b8643e37632b8
2015-05-05 04:38:33 -04:00
Rodrigo Ramírez Norambuena 39cf642d40 cdr: standardizes tab for options of AST_MODULE_INFO
Change-Id: I3c6de30b4859717873100092a7c06e206713a301
2015-05-05 00:06:57 -04:00
Rodrigo Ramírez Norambuena 8886b724ae cdr/cdr_csv.c: Add a new option to enable columns added in Asterisk 1.8
This patch adds a new option to cdr.conf, 'newcdrcolumns', that will handle CDR
columns added in Asterisk 1.8. The columns are:
 * peeraccount
 * linkedid
 * sequence
When enabled, the columns in the database entry will be populated with the data
from the CDR.

ASTERISK-24976 #close

Change-Id: I51a57063f4ae5e194a9d933a8df45dc8a4534f0b
2015-05-03 09:50:25 -05:00
Rodrigo Ramírez Norambuena 556653d937 cdr/cdr_csv.c: Refactor, function to write content of csv file.
Create a function for write content of CDR on csv files. Before used same
code for write two distinct files (account and master cdr) instead use a
function for thats.

Reduced to one lock when files are written.

Change-Id: Idce707f4c108083252e0aeb948f421d924953e65
2015-04-30 09:45:23 -04:00
Rodrigo Ramírez Norambuena d6a2d92353 cdr/cdr_csv.c: Add missing space after comma.
Change-Id: I3866a20019b1a3a2f10fe36640053929330b0fcb
2015-04-28 05:28:37 -04:00
Joshua Colp b2153f1f49 Merge "cdr/cdr_odbc.c: Added to record new columns add on CDR 1.8 Asterisk Version" 2015-04-28 06:55:30 -05:00
Rodrigo Ramírez Norambuena 358080e86e cdr/cdr_odbc.c: Added to record new columns add on CDR 1.8 Asterisk Version
Add new column to INSERT new columns added in cdr 1.8 version. The columns are:
 * peeraccount
 * linkedid
 * sequence
This feature is configurable in cdr_odbc.conf using a new configuration
option, 'newcdrcolumns'.

ASTERISK-24976 #close

Change-Id: Ibe0c7540a88305c6012786f438a0813ad8b19127
2015-04-27 09:38:15 -05:00
Rodrigo Ramírez Norambuena bff3064578 cdr/cdr_adaptive_odbc.c: Refactor concatenate columns name.
The concatenate for columns name to INSERT INTO is always the same. It is
possible to do it on one line.

ASTERISK-24980

Change-Id: Ib8bb53c42535378581d4ef729cc5ebbb22b067ac
2015-04-20 16:49:29 -05:00
Rodrigo Ramírez Norambuena 23a180cade cdr_pgsql: Fix CLI "cdr show pgsql status" command.
The command always showed the usage information.

* Fix the error in command validation for CLI_SHOWUSAGE.

ASTERISK-24959 #close
Reported by: Rodrigo Ramirez Norambuena

Change-Id: I584f0936bb01001336a468a55c1d05d79fe795d5
2015-04-14 10:56:32 -05:00
Matt Jordan 4a58261694 git migration: Refactor the ASTERISK_FILE_VERSION macro
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
2015-04-13 03:48:57 -04:00
Matthew Jordan 958a41a884 AMI: Add documentation for the missing Cdr/CEL events.
This patch adds AMI event documentation for the Cdr and CEL AMI events.

Note that while these events do share fields with each other and with other
channel related events, they do not contain all of the fields in a standard
channel snapshot, nor is the description of the fields identical. As such,
the patch opts for documentation for each field, for each event.

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

ASTERISK-24671 #close
Reported by: Dan Jenkins
........

Merged revisions 430862 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430863 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-01-21 13:27:55 +00:00
Mark Michelson dcf1ad14da Add module support level to ast_module_info structure. Print it in CLI "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
2014-07-25 16:47:17 +00:00
Matthew Jordan 03e9c598e5 cel_pgsql, cdr_pgsql, res_config_pgsql: Add PostgreSQL application_name support
This patch adds support for the PostgreSQL application_name connection setting.
When the appropriate PostgreSQL module's configuration is set with an
application name, the name will be passed to PostgreSQL on connection and
displayed in the database's pg_stat_activity view, as well as in CSV logs. This
aids in managing which applications/servers are connected to a PostgreSQL
database, as well as tracing the activity of those connections.

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

ASTERISK-23737 #close
Reported by: Gergely Domodi
patches:
  pgsql_application_name.patch uploaded by Gergely Domodi (License 6610)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418755 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-16 13:55:36 +00:00
Igor Goncharovskiy a1e0a5e4b0 We have faced situation when using CDR and CEL by sqlite3 modules. With system having high load (~100 concurrent calls created by sipp) we found many cdr and cel records missed. There is special finction in sqlite3, that make able to fix this situation - sqlite3_wait_timeout, that also can replace awful code cdr_sqlite3 ad cel_sqlite3 modules. Also this function can be used for aastdb and res_config_sqlite3 to avoid missed writes to sqlite db.
#ASTERISK-23766 #close
Reported by: Igor Goncharovsky

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

Merged revisions 416336 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 416337 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 416338 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@416339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-16 09:04:05 +00:00
Matthew Jordan fb5690ce4b Logger/CLI/etc.: Fix some aesthetic issues; reduce chatty verbose messages
This patch addresses some aesthetic issues in Asterisk. These are all just
minor tweaks to improve the look of the CLI when used in a variety of
settings. Specifically:
 * A number of chatty verbose messages were removed or demoted to DEBUG
   messages. Verbose messages with a verbosity level of 5 or higher were -
   if kept as verbose messages - demoted to level 4. Several messages
   that were emitted at verbose level 3 were demoted to 4, as announcement
   of dialplan applications being executed occur at level 3 (and so the
   effects of those applications should generally be less).
 * Some verbose messages that only appear when their respective 'debug'
   options are enabled were bumped up to always be displayed.
 * Prefix/timestamping of verbose messages were moved to the verboser
   handlers. This was done to prevent duplication of prefixes when the
   timestamp option (-T) is used with the CLI.
 * Verbose magic is removed from messages before being emitted to
   non-verboser handlers. This prevents the magic in multi-line verbose
   messages (such as SIP debug traces or the output of DumpChan) from
   being written to files.
 * _Slightly_ better support for the "light background" option (-W) was
   added. This includes using ast_term_quit in the output of XML
   documentation help, as well as changing the "Asterisk Ready" prompt to
   bright green on the default background (which stands a better chance of
   being displayed properly than bright white).

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@414798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-28 22:54:12 +00:00
Kinsey Moore abd3e4040b Allow Asterisk to compile under GCC 4.10
This resolves a large number of compiler warnings from GCC 4.10 which
cause the build to fail under dev mode. The vast majority are
signed/unsigned mismatches in printf-style format strings.
........

Merged revisions 413586 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 413587 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 413588 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-09 22:49:26 +00:00
Kevin Harwell ade5c8a2a4 cdr_radius, cel_radius: build agains libfreeradius-client
Asterisk's RADIUS module currently build against libradiusclient-ng, but this
project has been superseeded by libfreeradius-client. The API is 99% compatible
except that the header name has changed, the library name has changed, and
the configuration file location has changed.

(closes issue ASTERISK-22980)
Reported by: Jeremy Lainé
Patches:
     freeradius-client.patch uploaded by sharky (license 6561)
........

Merged revisions 406801 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 406802 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 406803 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-28 23:23:15 +00:00
Matthew Jordan 3713fa5c9f Prevent CDR backends from unregistering while billing data is in flight
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-10-27 20:04:17 +00:00
Richard Mudgett 2966ca288c cdr_adaptive_odbc: Also apply a filter when the CDR value is empty.
Extra CDR records are written if a filtered CDR value is empty because the
filter is not checked.

(closes issue ASTERISK-22272)
Reported by: Jordi Llull Chavarria
........

Merged revisions 401577 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 401579 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 401581 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@401582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-23 16:52:11 +00:00
Matthew Jordan 6258bbe7bd Update Asterisk's CDRs for the new bridging framework
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
2013-06-17 03:00:38 +00:00
Walter Doekes 6d57ecd48c Change a few warnings to debug and the inverse.
Remove the "RTP Read too short" warning for RTP keepalives. Remove the
the warning about the application delimiter switch from pipe to comma.
(You should've done this by now.) Make cdr_odbc report more when an
insert fails. Make chan_sip warn less when the peer wants SRTP (and we
don't) or sends a zero port to disable a media type.

Review: https://reviewboard.asterisk.org/r/2167
(closes issue ASTERISK-20538)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-17 14:24:52 +00:00
Andrew Latham 02bcd5bfb6 Doxygen Updates - Title update
Update and extend the configuration_file group and enable linking.  Update title that was left behind many years ago.

(issue ASTERISK-20259)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375005 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-14 21:46:45 +00:00
Andrew Latham 6f61cb50c5 Doxygen Updates - janitor work
Doxygen updates including mistakes, misspellings, missing parameters, updates for Doxygen style.  Some missing txt file links are removed but their content or essense will be included in some later updates.  A majority of the txt files were removed in the 1.6 era but never noted. The HR and EXTREF are simple changes that make the documentation more compatable with more versions of Doxygen.

Further updates coming.

(issue ASTERISK-20259)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-21 17:14:59 +00:00
Mark Michelson 6a539ace84 Fix misuses of asprintf throughout the code.
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
2012-08-21 21:01:11 +00:00
Kinsey Moore 9b16c8b0f6 Clean up and ensure proper usage of alloca()
This replaces all calls to alloca() with ast_alloca() which calls gcc's
__builtin_alloca() to avoid BSD semantics and removes all NULL checks
on memory allocated via ast_alloca() and ast_strdupa().

(closes issue ASTERISK-20125)
Review: https://reviewboard.asterisk.org/r/2032/
Patch-by: Walter Doekes (wdoekes)
........

Merged revisions 370642 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 370643 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-31 20:21:43 +00:00
Walter Doekes fc63e07135 Avoid cppcheck warnings; removing unused vars and a bit of cleanup.
Patch by: junky
Review: https://reviewboard.asterisk.org/r/1743/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-17 18:57:40 +00:00
Terry Wilson dd9405db05 Fix setting CDR variables in the hangup extension
A previous CDR fix for setting CDR variables during a bridge via
custom dialplan features broke setting CDR variables in the
hangup extension. This patch fixes the issue.

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

Merged revisions 358978 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 358989 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@360724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-28 19:39:24 +00:00
Terry Wilson 8b3704fbde Add detection for ODBC WCHAR fields
Without detecting these types, cel_odbc blows up when the character
set for the table is utf8. This also wraps cdr_adaptive_odbc's use of
those types in the HAVE_ODBC_WCHAR #ifdef seen in other parts of the
code.
........

Merged revisions 358435 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 358436 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-07 15:08:08 +00:00
Jonathan Rose 876215a688 Add additional character type types to supported data types for cdr_adaptive_odbc
The reporter was uable to use varchar utf8_unicode_ci with cdr_adaptive_odbc, so
this patch adds those along with some other character types to the list of types
cdr_adaptive_odbc will work using the varchar conditions. The problem wasn't really
UTF8 characters as much as it was a failure to respond to the exact type that was
declared/in use on that database.

(closes issue ASTERISK-19334)
Reported By: Igor Nikolaev
Patches:
	cdr_adaptive_odbc.patch uploaded by Igor Nikolaev (license 6236)
........

Merged revisions 357455 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 357458 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357460 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28 22:01:45 +00:00
Terry Wilson 57f42bd74f ast_channel opaquification of pointers and integral types
Review: https://reviewboard.asterisk.org/r/1753/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-20 23:43:27 +00:00
Jonathan Rose b08d91c3dc 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/
........

Merged revisions 354263 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 354270 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-07 15:29:14 +00:00