Skip to content
Snippets Groups Projects
  1. Feb 07, 2019
    • Joshua Colp's avatar
      res_odbc: Add basic query logging. · 54a912b2
      Joshua Colp authored
      When Asterisk is connected and used with a database the response
      time of the database can cause problems in Asterisk if it is long.
      Normally the only way to see this problem would be to retrieve a
      backtrace from Asterisk and examine where things are blocked, or
      examine the database to see if there is any indication of a
      problem.
      
      This change adds some basic query logging to make it easier to
      investigate such a problem. When logging is enabled res_odbc will
      now keep track of the number of queries executed, as well as the
      query that has taken the longest time to execute. There is also
      an option which will cause a WARNING message to be output if a
      query takes longer than a configurable amount of time to execute.
      
      This makes it easier and clearer for users that their database may
      be experiencing a problem that could impact Asterisk.
      
      ASTERISK-28277
      
      Change-Id: I173cf4928b10754478a6a8c27dfa96ede0f058a6
      54a912b2
  2. Jul 18, 2018
  3. Mar 14, 2018
    • Corey Farrell's avatar
      loader: Convert reload_classes to built-in modules. · 572a508e
      Corey Farrell authored
      * acl (named_acl.c)
      * cdr
      * cel
      * ccss
      * dnsmgr
      * dsp
      * enum
      * extconfig (config.c)
      * features
      * http
      * indications
      * logger
      * manager
      * plc
      * sounds
      * udptl
      
      These modules are now loaded at appropriate time by the module loader.
      Unlike loadable modules these use AST_MODULE_LOAD_FAILURE on error so
      the module loader will abort startup on failure of these modules.
      
      Some of these modules are still initialized or shutdown from outside the
      module loader.  logger.c is initialized very early and shutdown very
      late, manager.c is initialized by the module loader but is shutdown by
      the Asterisk core (too much uses it without holding references).
      
      Change-Id: I371a9a45064f20026c492623ea8062d02a1ab97f
      572a508e
  4. Mar 07, 2018
  5. Mar 06, 2018
  6. Jan 10, 2018
    • Sean Bright's avatar
      cdr_syslog: Deprecate unmaintained module · 9e2fcb82
      Sean Bright authored
      There has been an open issue against cdr_syslog (ASTERISK~14441) about
      a race condition for 7.5 years that has never been addressed. Because
      this module is effectively unmaintained and currently broken, there is
      no sense in keeping it around.
      
      If logging CDRs to syslog is a desirable feature, it would probably be
      better to write the logs directly to the syslog server via socket
      instead of using the facilities provided by openlog/syslog/closelog.
      Doing so would address the race condition referenced in the associated
      issue.
      
      Change-Id: Ic77b94cd97f355a9cf5b1d3f3444964a6e0ba5dc
      9e2fcb82
  7. Dec 22, 2017
  8. Oct 20, 2017
  9. Sep 09, 2017
  10. May 25, 2017
    • Martin Tomec's avatar
      Sqlite3: make busy_timeout configurable. · 44c5a144
      Martin Tomec authored
      Enables runtime configuration of busy_timeout for sqlite databases.
      Default timeout remains 1000ms.
      
      ASTERISK-27014 #close
      
      Change-Id: I8921a3aac3c335843be4cb17d2dd0a5c157a36da
      44c5a144
  11. Apr 12, 2017
    • George Joseph's avatar
      modules: change module LOAD_FAILUREs to LOAD_DECLINES · 747beb1e
      George Joseph authored
      In all non-pbx modules, AST_MODULE_LOAD_FAILURE has been changed
      to AST_MODULE_LOAD_DECLINE.  This prevents asterisk from exiting
      if a module can't be loaded.  If the user wishes to retain the
      FAILURE behavior for a specific module, they can use the "require"
      or "preload-require" keyword in modules.conf.
      
      A new API was added to logger: ast_is_logger_initialized().  This
      allows asterisk.c/check_init() to print to the error log once the
      logger subsystem is ready instead of just to stdout.  If something
      does fail before the logger is initialized, we now print to stderr
      instead of stdout.
      
      Change-Id: I5f4b50623d9b5a6cb7c5624a8c5c1274c13b2b25
      747beb1e
  12. Mar 30, 2017
  13. Nov 14, 2016
    • Tzafrir Cohen's avatar
      Add support for building RADIUS with radcli · 97a75e38
      Tzafrir Cohen authored
      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
      97a75e38
  14. Oct 27, 2016
    • Corey Farrell's avatar
      Remove ASTERISK_REGISTER_FILE. · a6e5bae3
      Corey Farrell authored
      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
      a6e5bae3
  15. Oct 25, 2016
    • Badalyan Vyacheslav's avatar
      cdr_radius,cel_radius: Fix old memleak in unload · 01d1d376
      Badalyan Vyacheslav authored
      - 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
      01d1d376
  16. Aug 06, 2016
    • Rodrigo Ramírez Norambuena's avatar
      cdr_adaptive_odbc: Fix DNSs mixed config quote quoted_identifiers · b156a291
      Rodrigo Ramírez Norambuena authored
      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
      b156a291
  17. Jun 01, 2016
    • Richard Mudgett's avatar
      logging,cdr,cel: Fix stringfield memory leak. · 40d19f2e
      Richard Mudgett authored
      The stringfields refactor to allow adding stringfields to the end of a
      structure (f6f4cf45) 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
      40d19f2e
  18. Mar 07, 2016
    • Rodrigo Ramírez Norambuena's avatar
      main/cli.c: Refactor function to print seconds formatted · 0ec9fe54
      Rodrigo Ramírez Norambuena authored
      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
      0ec9fe54
  19. Jan 23, 2016
  20. Sep 18, 2015
  21. Jul 20, 2015
    • Elazar Broad's avatar
      cdr/cdr_adaptive_odbc.c: Fix quoted identifier usage when inserting CDR records · 293c9f68
      Elazar Broad authored
      Commit a24ce38e 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
      293c9f68
  22. Jun 01, 2015
  23. May 20, 2015
    • Rodrigo Ramírez Norambuena's avatar
      cel, cdr: Assigned separator for column name and values. · 9c3c7797
      Rodrigo Ramírez Norambuena authored
      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
      9c3c7797
  24. May 12, 2015
  25. May 11, 2015
  26. May 05, 2015
  27. May 03, 2015
  28. Apr 30, 2015
  29. Apr 28, 2015
  30. Apr 27, 2015
  31. Apr 20, 2015
  32. Apr 14, 2015
  33. Apr 13, 2015
    • Matt Jordan's avatar
      git migration: Refactor the ASTERISK_FILE_VERSION macro · 4a582616
      Matt Jordan authored
      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
      4a582616
  34. Jan 21, 2015
  35. Jul 25, 2014
  36. Jul 16, 2014
  37. Jun 16, 2014
  38. May 28, 2014
    • Matthew Jordan's avatar
      Logger/CLI/etc.: Fix some aesthetic issues; reduce chatty verbose messages · fb5690ce
      Matthew Jordan authored
      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
      fb5690ce
  39. May 09, 2014
Loading