Skip to content
Snippets Groups Projects
  1. May 04, 2015
  2. 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
  3. Dec 04, 2014
  4. Aug 06, 2014
  5. Jun 19, 2014
  6. Dec 13, 2013
  7. Oct 23, 2013
  8. Jun 17, 2013
    • 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
  9. May 30, 2013
    • David M. Lee's avatar
      Avoid unnecessary cleanups during immediate shutdown · d81c8467
      David M. Lee authored
      This patch addresses issues during immediate shutdowns, where modules
      are not unloaded, but Asterisk atexit handlers are run.
      
      In the typical case, this usually isn't a big deal. But the
      introduction of the Stasis message bus makes it much more likely for
      asynchronous activity to be happening off in some thread during
      shutdown.
      
      During an immediate shutdown, Asterisk skips unloading modules. But
      while it is processing the atexit handlers, there is a window of time
      where some of the core message types have been cleaned up, but the
      message bus is still running. Specifically, it's still running
      module subscriptions that might be using the core message types. If a
      message is received by that subscription in that window, it will
      attempt to use a message type that has been cleaned up.
      
      To solve this problem, this patch introduces ast_register_cleanup().
      This function operates identically to ast_register_atexit(), except
      that cleanup calls are not invoked on an immediate shutdown. All of
      the core message type and topic cleanup was moved from atexit handlers
      to cleanup handlers.
      
      This ensures that core type and topic cleanup only happens if the
      modules that used them are first unloaded.
      
      This patch also changes the ast_assert() when accessing a cleaned up
      or uninitialized message type to an error log message. Message type
      functions are actually NULL safe across the board, so the assert was a
      bit heavy handed. Especially for anyone with DO_CRASH enabled.
      
      Review: https://reviewboard.asterisk.org/r/2562/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      d81c8467
  10. May 15, 2013
  11. Mar 30, 2013
  12. Jan 09, 2013
  13. Nov 21, 2012
  14. Jul 30, 2012
  15. Jun 15, 2012
    • Kevin P. Fleming's avatar
      Multiple revisions 369001-369002 · 166b4e2b
      Kevin P. Fleming authored
      ........
        r369001 | kpfleming | 2012-06-15 10:56:08 -0500 (Fri, 15 Jun 2012) | 11 lines
        
        Add support-level indications to many more source files.
        
        Since we now have tools that scan through the source tree looking for files
        with specific support levels, we need to ensure that every file that is
        a component of a 'core' or 'extended' module (or the main Asterisk binary)
        is explicitly marked with its support level. This patch adds support-level
        indications to many more source files in tree, but avoids adding them to
        third-party libraries that are included in the tree and to source files
        that don't end up involved in Asterisk itself.
      ........
        r369002 | kpfleming | 2012-06-15 10:57:14 -0500 (Fri, 15 Jun 2012) | 3 lines
        
        Add a script to enable finding source files without support-levels defined.
      ........
      
      Merged revisions 369001-369002 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      ........
      
      Merged revisions 369005 from http://svn.asterisk.org/svn/asterisk/branches/10
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      166b4e2b
  16. Jan 25, 2012
    • Kevin P. Fleming's avatar
      Remove "asterisk/version.h" in favor of "asterisk/ast_version.h". · 9ee8a744
      Kevin P. Fleming authored
      A long time ago, in a land far far away, we added "asterisk/ast_version.h",
      which provides the ast_get_version() and ast_get_version_num() functions. These
      were added so that modules that needed the version information for the Asterisk
      instance they were loaded in could actually get it (as opposed the version that
      they were compiled against). We changed everything in the tree to use the
      new mechanism (although later main/test.c was added using the old method).
      However, the old mechanism was never removed, and as a result, new code is
      still trying to use it.
      
      This commit removes asterisk/version.h and replaces it with a header that
      will generate a compile-time error if you try to use it (the error message
      tells you which header you should use instead). It also removes the Makefile
      and build_tools bits that generated the file, and it updates main/test.c to
      use the 'proper' method of getting the Asterisk version information.
      
      This is an API change and thus is being committed for trunk only, but it's
      a fairly minor one and definitely improves the situation for out-of-tree
      modules.
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      9ee8a744
  17. Aug 22, 2011
  18. Jul 09, 2010
  19. Mar 23, 2010
  20. Mar 20, 2010
  21. Mar 17, 2010
  22. Mar 03, 2010
  23. Feb 26, 2010
  24. Feb 17, 2010
  25. Feb 09, 2010
    • Russell Bryant's avatar
      Various updates to the unit test API. · bbed34f7
      Russell Bryant authored
      1) It occurred to me that the difference in usage between the error ast_str and
      the ast_test_update_status() usage has turned out to be a bit ambiguous in
      practice.  In a lot of cases, the same message was being sent to both.
      In other cases, it was only sent to one or the other.  My opinion now is that
      in every case, I think it makes sense to do both; we should output it to the
      CLI as well as save it off for logging purposes.
      
      This change results in most of the changes in this diff, since it required
      changes to all existing unit tests.  It also allowed for some simplifications
      of unit test API implementation code.
      
      2) Update ast_test_status_update() to include the file, function, and line
      number for the code providing the update.
      
      3) There are some formatting tweaks here and there.  Hopefully they aren't too
      distracting for code review purposes.  Reviewboard's diff viewer seems to do a
      pretty good job of pointing out when something is a whitespace change.
      
      4) I moved the md5_test and sha1_test into the test_utils module.  It seemed
      like a better approach since these tests are so tiny.
      
      5) I changed the number of nodes used in heap_test_2 from 1 million to
      100 thousand.  The only reason for this was to reduce the time it took
      for this test to run.
      
      6) Remove an unused function prototype that was at the bottom of utils.h.
      
      7) Simplify test_insert() using the LIST_INSERT_SORTALPHA() macro.  The one
      minor difference in behavior is that it no longer checks for a test registered
      with the same name.
      
      8) Expand the code in test_alloc() to provide specific error messages for each
      failure case, to clearly inform developers if they forget to set the name,
      summary, description, etc.
      
      9) Tweak the output of the "test show registered" CLI command.  I swapped the
      name and category to have the category first.  It seemed more natural since
      that is the sort key.
      
      10) Don't output the status ast_str in the "test show results" CLI command.
      This is going to tend to be pretty verbose, so just leave that for the
      detailed test logs (test generate results).
      
      Review: https://reviewboard.asterisk.org/r/493/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      bbed34f7
  26. Feb 07, 2010
  27. Feb 04, 2010
  28. Jan 26, 2010
    • David Vossel's avatar
      modify 'test show registered' cli output format · adfa169e
      David Vossel authored
      In order to improve readability, the output from 'test show
      registered' has been modified to truncate fields to fit within
      the format output if they are over a certain length.
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@243242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      adfa169e
    • David Vossel's avatar
      RFC compliant uri and display-name encode/decode · d16b89be
      David Vossel authored
      1.  URI Encoding
      This patch changes ast_uri_encode()'s behavior when doreserved is enabled.
      Previously when doreserved was enabled only a small set of reserved
      characters were encoded.  This set was comprised primarily of the reserved
      characters defined in RFC3261 section 25.1, but contained other characters as
      well.  Rather than only escaping the reserved set, doreserved now escapes
      all characters not within the unreserved set as defined by RFC 3261 and
      RFC 2396.  Also, the 'doreserved' variable has been renamed to 'do_special_char'
      in attempts to avoid confusion.
      
      When doreserve is not enabled, the previous logic of only encoding the
      characters <= 0X1F and > 0X7f remains, except for the '%' character, which
      must always be encoded as it signifies a HEX escaped character during the decode
      process.
      
      2. URI Decoding: Break up URI before decode.
      In chan_sip.c ast_uri_decode is called on the entire URI instead of it's
      individual parts after it is parsed.  This is not good as ast_uri_decode
      can introduce special characters back into the URI which can mess up parsing.
      This patch resolves this by not decoding a URI until parsing is completely
      done.  There are many instances where we check to see if pedantic checking
      is enabled before we decode a URI.  In these cases a new macro,
      SIP_PEDANTIC_DECODE, is used on the individual parsed segments of the URI
      rather than constantly putting if (pedantic) { decode() } checks everywhere
      in the code.  In the areas where ast_uri_decode is not dependent upon
      pedantic checking this macro is not used, but decoding is still moved to
      each individual part of the URI.  The only behavior that should change from
      this patch is the time at which decoding occurs.
      
      Since I had to look over every place URI parsing occurs to create this
      patch, I found several places where we use duplicate code for parsing.
      To consolidate the code, those areas have updated to use the parse_uri()
      function where possible.
      
      3. SIP display-name decoding according to RFC3261 section 25.
      To properly decode the display-name portion of a FROM header, chan_sip's
      get_calleridname() function required a complete re-write.  More information
      about this change can be found in the comments at the beginning of this function.
      
      4. Unit Tests.
      Unit tests for ast_uri_encode, ast_uri_decode, and get_calleridname() have been
      written.  This involved the addition of the test_utils.c file for testing the
      utils api.
      
      (closes issue #16299)
      Reported by: wdoekes
      Patches:
            astsvn-16299-get_calleridname.diff uploaded by wdoekes (license 717)
            get_calleridname_rewrite.diff uploaded by dvossel (license 671)
      Tested by: wdoekes, dvossel, Nick_Lewis
      
      Review: https://reviewboard.asterisk.org/r/469/
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@243200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      d16b89be
  29. Jan 22, 2010
  30. Jan 21, 2010
Loading