Skip to content
Snippets Groups Projects
  1. Nov 09, 2023
  2. Oct 03, 2023
  3. Jul 11, 2022
  4. Nov 29, 2021
  5. Oct 14, 2019
    • Christoph Moench-Tegeder's avatar
      cdr_pgsql cel_pgsql res_config_pgsql: compatibility with PostgreSQL 12 · 52ade184
      Christoph Moench-Tegeder authored
      PostgreSQL 12 finally removed column adsrc from table pg_catalog.pg_attrdef
      (column default values), which has been deprecated since version 8.0.
      Since then, the official/correct/supported way to retrieve the column
      default value from the catalog is function pg_catalog.pg_get_expr().
      
      This change breaks compatibility with pre-8.0 PostgreSQL servers,
      but has reached end-of-support more than a decade ago.
      cdr_pgsql and res_config_pgsql still have support for pre-7.3
      servers, but cleaning that up is perhaps a topic for a major release,
      not this bugfix.
      
      ASTERISK-28571
      
      Change-Id: I834cb3addf1937e19e87ede140bdd16cea531ebe
      52ade184
  6. 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
  7. 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
  8. Mar 07, 2018
  9. Mar 06, 2018
  10. Jan 16, 2018
    • Richard Mudgett's avatar
      cel_odbc.c: Fix menuslect module description display. · 6fbe315f
      Richard Mudgett authored
      Asterisk's makefile for menuselect has a very simple source file parsing
      script that looks for AST_MODULE_INFO lines to extract the quoted string
      as a module description.  If it does not find a quoted string it uses the
      whole line as the description.
      
      Change-Id: I80f13a63818e4e28d683639a94a4dfaea405c1d5
      6fbe315f
  11. Dec 22, 2017
  12. Nov 16, 2017
  13. 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
  14. May 09, 2017
    • George Joseph's avatar
      cel_odbc: Fix timestamp processing for microseconds · 1a1c8623
      George Joseph authored
      When a column is of type timestamp, the fraction part of the event
      field's seconds was frequently parsed incorrectly especially if
      there were leading zeros.  For instance "2017-05-23 23:55:03.023"
      would be parsed into an int as "23" then when the timestamp was
      formatted again to be inserted into the database column it'd be
      "2017-05-23 23:55:03.23" which is now 230 milliseconds instead of
      23 milliseconds.  "03.000001" would be transformed to "03.1", etc.
      
      * If the event field is 'eventtime' and the db column is timestamp,
        then existing processing has already correctly formatted the
        timestamp so now we simply use it rather than parsing it and
        re-printing it. This is the most common use case anyway.
      
      * If the event field is other than 'eventtime' and the db column
        is timestamp, we now parse the seconds, including the fractional
        part into a double rather than 2 ints.  This preserves the
        magnitude and precision of the fractional part.  When we print
        it, we now print it as a "%09.6lf" which correctly represents the
        input.
      
      To be honest, why we parse the string timestamp into components,
      test the components, then print the components back into a string
      timestamp is beyond me.  We should use parse it, test it, then if
      it passes, use the original string representation in the database
      call.  Maybe someone thought that some implementations wouldn't
      take a partial timestamp string like "2017-05-06" and decided to
      always produce a full timestamp string even if an abbreviated one
      was supplied.  Anyway, I'm leaving it as it is.
      
      ASTERISK-25032 #close
      Reported-by: Etienne Lessard
      
      Change-Id: Id407e6221f79a5c1120e1a70bc7e893bbcaf1938
      1a1c8623
  15. 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
  16. Mar 30, 2017
  17. Mar 29, 2017
    • Josh Roberson's avatar
      cel_pgsql.c: Fix buffer overflow calling libpq · f66edcb8
      Josh Roberson authored
      PQEscapeStringConn() expects the buffer passed in to be an
      adequitely sized buffer to write out the escaped SQL value string
      into.  It is possible, for large values (such as large values to
      Dial with a lot of devices) to have more than our 512+1 byte
      allocation and thus cause libpq to create a buffer overrun.
      
      glibc will nicely ABRT asterisk for you, citing a stack smash.
      
      Let's only allocate it to be as large as needed:
      If we have a value, then (strlen(value) * 2) + 1 (as recommended
      by libpq), and if we have none, just one byte to hold our null
      will do.
      
      ASTERISK-26896 #close
      
      Change-Id: If611c734292618ed68dde17816d09dd16667dea2
      f66edcb8
  18. 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
  19. 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
  20. 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
  21. Oct 10, 2016
  22. 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
  23. Jan 06, 2016
    • Aaron An's avatar
      cel/cel_radius: Fix wrong pointer. · 084563e1
      Aaron An authored
      The macro ADD_VENDOR_CODE defined in the cel_radius.c should use the parameter
      y not the address of y.
      
      I capture the radius UDP packet via tcpdump, and the AV pairs are not correct,
      then i review the source code and compare it with cdr/cdr_radius.c. Fix it and
       it works.
      
      ASTERISK-25647 #close
      Reported by: Aaron An
      Tested by: Aaron An
      
      Change-Id: I72889bccd8fde120d47aa659edc0e7e6d4d019f0
      084563e1
  24. Sep 18, 2015
  25. 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
  26. May 13, 2015
  27. May 12, 2015
  28. May 05, 2015
    • Rodrigo Ramírez Norambuena's avatar
      cel_pgsql: Add support for setting schema · cb79b8ab
      Rodrigo Ramírez Norambuena authored
      Add feature to set optional schema parameter on configuration file via
      'schema' setting.
      
      Fix query to get columns from table while considering schema. If in
      the database there exists two tables with same name in distinct schemas
      it will return an error when inserting record.
      
      ASTERISK-24967 #close
      
      Change-Id: I691fd2cbc277fcba10e615f5884f8de5d8152f2c
      cb79b8ab
  29. Apr 15, 2015
  30. 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
  31. Apr 08, 2015
  32. Mar 28, 2015
  33. Jan 21, 2015
  34. Nov 15, 2014
  35. Sep 26, 2014
  36. Jul 25, 2014
  37. Jul 16, 2014
  38. Jun 16, 2014
Loading