Skip to content
Snippets Groups Projects
  1. Nov 20, 2017
  2. Nov 17, 2017
  3. Nov 03, 2017
  4. 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
  5. Oct 13, 2016
    • Richard Mudgett's avatar
      Audit ast_json_pack() calls for needed UTF-8 checks. · 9c49b963
      Richard Mudgett authored
      Added needed UTF-8 checks before constructing json objects in various
      files for strings obtained outside the system.  In this case string values
      from a channel driver's peer and not from the user setting channel
      variables.
      
      * aoc.c: Fixed type mismatch in s_to_json() for time and granularity json
      object construction.
      
      ASTERISK-26466
      Reported by: Richard Mudgett
      
      Change-Id: Iac2d867fa598daba5c5dbc619b5464625a7f2096
      9c49b963
    • Richard Mudgett's avatar
      aoc.c: Whitespace cleanup · 6fe5202c
      Richard Mudgett authored
      * In s_to_json() removed unnecessary ast_json_ref() to ast_json_null()
      when creating the type json object.  The ref is a noop.
      
      Change-Id: I2be8b836876fc2e34a27c161f8b1c53b58a3889a
      6fe5202c
  6. Aug 15, 2016
  7. Dec 16, 2015
    • Joshua Colp's avatar
      json: Audit ast_json_* usage for thread safety. · d17d9a92
      Joshua Colp authored
      The JSON library Asterisk uses, jansson, is not thread
      safe for us in a few ways. To help with this wrappers for JSON
      object reference count increasing and decreasing were added
      which use a global lock to ensure they don't clobber over
      each other. This does not extend to reference count manipulation
      within the jansson library itself. This means you can't safely
      use the object borrowing specifier (O) in ast_json_pack and
      you can't share JSON instances between objects.
      
      This change removes uses of the O specifier and replaces them
      with the o specifier and an explicit ast_json_ref. Some cases
      of instance sharing have also been removed.
      
      ASTERISK-25601 #close
      
      Change-Id: I06550d8b0cc1bfeb56cab580a4e608ae4f1ec7d1
      d17d9a92
  8. 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
  9. Mar 26, 2015
  10. Feb 19, 2015
  11. Jun 13, 2014
    • Matthew Jordan's avatar
      stasis: Reduce creation of channel snapshots to improve performance · 9cc1a8e8
      Matthew Jordan authored
      During some performance testing of Asterisk with AGI, ARI, and lots of Local
      channels, we noticed that there's quite a hit in performance during channel
      creation and releasing to the dialplan (ARI continue). After investigating
      the performance spike that occurs during channel creation, we discovered
      that we create a lot of channel snapshots that are technically unnecessary.
      This includes creating snapshots during:
       * AGI execution
       * Returning objects for ARI commands
       * During some Local channel operations
       * During some dialling operations
       * During variable setting
       * During some bridging operations
      And more.
      
      This patch does the following:
       - It removes a number of fields from channel snapshots. These fields were
         rarely used, were expensive to have on the snapshot, and hurt performance.
         This included formats, translation paths, Log Call ID, callgroup, pickup
         group, and all channel variables. As a result, AMI Status,
         "core show channel", "core show channelvar", and "pjsip show channel" were
         modified to either hit the live channel or not show certain pieces of data.
         While this is unfortunate, the performance gain from this patch is worth
         the loss in behaviour.
       - It adds a mechanism to publish a cached snapshot + blob. A large number of
         publications were changed to use this, including:
         - During Dial begin
         - During Variable assignment (if no AMI variables are emitted - if AMI
           variables are set, we have to make snapshots when a variable is changed)
         - During channel pickup
         - When a channel is put on hold/unhold
         - When a DTMF digit is begun/ended
         - When creating a bridge snapshot
         - When an AOC event is raised
         - During Local channel optimization/Local bridging
         - When endpoint snapshots are generated
         - All AGI events
         - All ARI responses that return a channel
         - Events in the AgentPool, MeetMe, and some in Queue
       - Additionally, some extraneous channel snapshots were being made that were
         unnecessary. These were removed.
       - The result of ast_hashtab_hash_string is now cached in stasis_cache. This
         reduces a large number of calls to ast_hashtab_hash_string, which reduced
         the amount of time spent in this function in gprof by around 50%.
      
      #ASTERISK-23811 #close
      Reported by: Matt Jordan
      
      Review: https://reviewboard.asterisk.org/r/3568/
      ........
      
      Merged revisions 416211 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@416216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      9cc1a8e8
  12. May 09, 2014
  13. Aug 01, 2013
  14. Jul 02, 2013
  15. Dec 11, 2012
  16. 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
  17. Jan 24, 2012
  18. Jan 09, 2012
    • Terry Wilson's avatar
      Replace direct access to channel name with accessor functions · 04da92c3
      Terry Wilson authored
      There are many benefits to making the ast_channel an opaque handle, from
      increasing maintainability to presenting ways to kill masquerades. This patch
      kicks things off by taking things a field at a time, renaming the field to
      '__do_not_use_${fieldname}' and then writing setters/getters and converting the
      existing code to using them. When all fields are done, we can move ast_channel
      to a C file from channel.h and lop off the '__do_not_use_'.
      
      This patch sets up main/channel_interal_api.c to be the only file that actually
      accesses the ast_channel's fields directly. The intent would be for any API
      functions in channel.c to use the accessor functions. No more monkeying around
      with channel internals. We should use our own APIs.
      
      The interesting changes in this patch are the addition of
      channel_internal_api.c, the moving of the AST_DATA stuff from channel.c to
      channel_internal_api.c (note: the AST_DATA stuff will have to be reworked to
      use accessor functions when ast_channel is really opaque), and some re-working
      of the way channel iterators/callbacks are handled so as to avoid creating fake
      ast_channels on the stack to pass in matching data by directly accessing fields
      (since "name" is a stringfield and the fake channel doesn't init the
      stringfields, you can't use the ast_channel_name_set() function). I went with
      ast_channel_name(chan) for a getter, and ast_channel_name_set(chan, name) for a
      setter.
      
      The majority of the grunt-work for this change was done by writing a semantic
      patch using Coccinelle ( http://coccinelle.lip6.fr/ ).
      
      Review: https://reviewboard.asterisk.org/r/1655/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      04da92c3
  19. Dec 20, 2010
  20. Jun 02, 2010
    • Richard Mudgett's avatar
      Generic Advice of Charge. · afd4454c
      Richard Mudgett authored
      Asterisk Generic AOC Representation
      - Generic AOC encode/decode routines.
        (Generic AOC must be encoded to be passed on the wire in the AST_CONTROL_AOC frame)
      - AST_CONTROL_AOC frame type to represent generic encoded AOC data
      - Manager events for AOC-S, AOC-D, and AOC-E messages
      
      Asterisk App Support
      - app_dial AOC-S pass-through support on call setup
      - app_queue AOC-S pass-through support on call setup
      
      AOC Unit Tests
      - AOC Unit Tests for encode/decode routines
      - AOC Unit Test for manager event representation.
      
      SIP AOC Support
      - Pass-through of generic AOC-D and AOC-E messages to snom phones via the
        snom AOC specification.
      - Creation of chan_sip page3 flags for the addition of the new
        'snom_aoc_enabled' sip.conf option.
      
      IAX AOC Support
      - Natively supports AOC pass-through through the use of the new
        AST_CONTROL_AOC frame type
      
      DAHDI AOC Support
      - ETSI PRI full AOC Pass-through support
      - 'aoc_enable' chan_dahdi.conf option for independently enabling
        pass-through of AOC-S, AOC-D, AOC-E.
      - 'aoce_delayhangup' option for retrieving AOC-E on disconnect.
      - DAHDI A() dial string option for requesting AOC services.
        example usage:
        ;requests AOC-S, AOC-D, and AOC-E on call setup
        exten=>1111,1,Dial(DAHDI/g1/1112/A(s,d,e))
      
      Review:	https://reviewboard.asterisk.org/r/552/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@267096 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      afd4454c
Loading