Skip to content
Snippets Groups Projects
  1. 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
  2. Dec 06, 2017
    • Richard Mudgett's avatar
      CDR: Fix deadlock setting some CDR values. · 3078b7ad
      Richard Mudgett authored
      Setting channel variables with the AMI Originate action caused a deadlock
      when you set CDR(amaflags) or CDR(accountcode).  This path has the channel
      locked when the CDR function is called.  The CDR function then
      synchronously passes the job to a stasis thread.  The stasis handling
      function then attempts to lock the channel.  Deadlock results.
      
      * Avoid deadlock by making the CDR function handle setting amaflags and
      accountcode directly on the channel rather than passing it off to the CDR
      processing code under a stasis thread to do it.
      
      * Made the CHANNEL function and the CDR function process amaflags the same
      way.
      
      * Fixed referencing the wrong message type in cdr_prop_write().
      
      ASTERISK-27460
      
      Change-Id: I5eacb47586bc0b8f8ff76a19bd92d1dc38b75e8f
      3078b7ad
  3. Sep 07, 2017
  4. May 05, 2017
    • Joshua Colp's avatar
      func_cdr: Allow empty value for CDR dialplan function. · 4146facf
      Joshua Colp authored
      A regression was introduced in 12 where passing an empty value
      to the CDR dialplan function was not longer allowed. This
      change returns to the behavior of 11 where it is permitted.
      
      ASTERISK-26173
      
      Change-Id: I3f148203b54ec088007e29e30005a5de122e51c5
      4146facf
  5. 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
  6. 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
  7. Jul 27, 2016
    • David M. Lee's avatar
      Portably sscanf tv_usec · feb1a434
      David M. Lee authored
      In a timeval, tv_usec is defined as a suseconds_t, which could be
      different underlying types on different platforms. Instead of trying to
      scanf directly into the timeval, scanf into a long int, then copy that
      into the timeval.
      
      Change-Id: I29f22d049d3f7746b6c0cc23fbf4293bdaa5eb95
      feb1a434
  8. Jan 20, 2016
    • Matt Jordan's avatar
      funcs/func_cdr: Correctly report high precision values for duration and billsec · 3b9cba42
      Matt Jordan authored
      When CDRs were refactored, func_cdr's ability to report high precision values
      for duration and billsec (the 'f' option) was broken. This was due to func_cdr
      incorrectly interpreting the duration/billsec values provided by the CDR engine
      in milliseconds, as opposed to seconds. Since the CDR engine only provides
      duration and billsec in seconds, and does not expose either attribute with
      sufficient precision to merely pass back the underlying value, this patch fixes
      the bug by re-calculating duration and billsec with microsecond precision based
      on the start/answer/end times on the CDR.
      
      ASTERISK-25179 #close
      
      Change-Id: I8bc63822b496537a5bf80baf6102c06206bee841
      3b9cba42
  9. Jul 20, 2015
    • Rusty Newton's avatar
      Documentation: A couple of trivial fixes in sip.conf.sample and func_cdr.c · d0219644
      Rusty Newton authored
       * In sip.conf.sample fix sentence where we said that WS or WSS are supported
         transports for use in an outbound register definition. They are not
         supported in that case.
       * In func_cdr.c made it clear that the Disable option for CDR_PROP can be used
         to enable CDR on a channel.
      
      ASTERISK-24867 #close
      Reported by: Rusty Newton
      
      ASTERISK-24853 #close
      Reported by: PSDK
      
      Change-Id: I3d698bc6302b9d00a0a995b5c4ad9a42d69b48ca
      d0219644
  10. 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
  11. Mar 23, 2015
  12. Oct 28, 2014
  13. Aug 06, 2014
  14. Mar 27, 2014
  15. Feb 07, 2014
  16. Feb 04, 2014
  17. Jan 12, 2014
  18. Dec 19, 2013
    • Matthew Jordan's avatar
      app_cdr,app_forkcdr,func_cdr: Synchronize with engine when manipulating state · 7e9febbf
      Matthew Jordan authored
      When doing the rework of the CDR engine that pushed all of the logic into cdr.c
      and made it respond to changes in channel state over Stasis, we knew that
      accessing the CDR engine from the dialplan would be "slightly"
      non-deterministic. Dialplan threads would be accessing CDRs while Stasis
      threads would be updating the state of said CDRs - whereas in the past,
      everything happened on the dialplan threads. Tests have shown that "slightly"
      is in reality "very".
      
      This patch synchronizes things by making the dialplan applications/functions
      that manipulate CDRs do so over Stasis. ForkCDR, NoCDR, ResetCDR, CDR, and
      CDR_PROP now all use Stasis to send their requests over to the CDR engine,
      and synchronize on the channel Stasis topic via a subscription so that they
      return their values/control to the dialplan at the appropriate time.
      
      While going through this, the following changes were also made:
       * DISA, which can reset the CDR when a user successfully authenticates, now
         just uses the ResetCDR app to do this. This prevents having to duplicate
         the same Stasis synchronization logic in that application.
       * Answer no longer disables CDRs. It actually didn't work anyway - calling
         DISABLE on the channel's CDR doesn't stop the CDR from getting the Answer
         time - it just kills all CDRs on that channel, which isn't what the caller
         would intend.
      
      (closes issue ASTERISK-22884)
      (closes issue ASTERISK-22886)
      
      Review: https://reviewboard.asterisk.org/r/3057/
      ........
      
      Merged revisions 404294 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      7e9febbf
  19. Sep 30, 2013
  20. Aug 28, 2013
  21. Jun 19, 2013
    • Matthew Jordan's avatar
      Handle variable substitution in dummy variables · 68103abb
      Matthew Jordan authored
      When func_cdr is used for variable substitution, there is no channel name
      and hence no run-time information available for CDR variable substitution.
      In that case, the correct thing to do is to use the CDR object on the channel
      passed to the function. This patch checks to see if the channel passed in
      has a name - if not, it uses ast_cdr_format_var instead of ast_cdr_get_var.
      
      This allows CDR backends to continue to use variable substitution in order to
      resolve ast_cdr object properties.
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392214 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      68103abb
  22. Jun 17, 2013
    • David M. Lee's avatar
      Fix build warnings related to printf/scanf of tv_usec. · 4aa47d68
      David M. Lee authored
      The type of tv_usec is suseconds_t. On Linux, this is usually a long int, but
      the specification is actually pretty lax on what it might actually be. And,
      sadly, there's no printf/scanf width specifier for suseconds_t. So it could
      bit an int or a long, but there's not a great way to tell which it is.
      
      This patch fixes scanf by reading into a long temporary variable that's then
      stored into the tv_usec. It fixes printf by casting the tv_usec to a long
      first.
      
      This patch also adds some missing width specifiers for some debug statements,
      which would cause ".000001" to be displayed at ".1".
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      4aa47d68
    • Matthew Jordan's avatar
      Update Asterisk's CDRs for the new bridging framework · 6258bbe7
      Matthew Jordan authored
      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
      6258bbe7
  23. May 10, 2012
  24. Feb 20, 2012
  25. Feb 09, 2012
  26. Dec 16, 2011
  27. Jul 14, 2011
  28. Jun 08, 2010
  29. Jan 06, 2010
  30. Nov 05, 2009
  31. Nov 03, 2009
  32. Jun 26, 2009
    • Russell Bryant's avatar
      Merge the new Channel Event Logging (CEL) subsystem. · 0264eef1
      Russell Bryant authored
      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
      0264eef1
  33. Jun 15, 2009
  34. Nov 01, 2008
  35. Oct 06, 2008
  36. Jun 12, 2008
    • Steve Murphy's avatar
      Merged revisions 122046 via svnmerge from · 1cebe01d
      Steve Murphy authored
      https://origsvn.digium.com/svn/asterisk/branches/1.4
      
      ........
      r122046 | murf | 2008-06-12 07:47:34 -0600 (Thu, 12 Jun 2008) | 37 lines
      
      (closes issue #10668)
      Reported by: arkadia
      Tested by: murf, arkadia
      
      Options added to forkCDR() app and the CDR() func to
      remove some roadblocks for CDR applications.
      
      The "show application ForkCDR" output was upgraded
      to more fully explain the inner workings of forkCDR.
      
      The A option was added to forkCDR to force the
      CDR system to NOT change the disposition on the
      original CDR, after the fork. This involves
      ast_cdr_answer, _busy, _failed, and so on.
      
      The T option was added to forkCDR to force 
      obedience of the cdr LOCKED flag in the
      ast_cdr_end, all the disposition changing
      funcs (ast_cdr_answer, etc), and in the
      ast_cdr_setvar func.
      
      The CHANGES file was updated to explain ALL
      the new options added to satisfy this bug report
      (and some requests made verbally and via 
      email, irc, etc, over the past months/year)
      
      The 's' option was added to the CDR() func,
      to force it to skip LOCKED cdr's in the
      chain.
      
      Again, the new options should be totally transparent
      to existing apps! Current behavior of CDR,
      forkCDR, and the rest of the CDR system should
      not change one little bit. Until you add the
      new options, at least!
      
      
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      1cebe01d
  37. Feb 14, 2008
Loading