Skip to content
Snippets Groups Projects
  1. 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
  2. Jun 24, 2015
    • Richard Mudgett's avatar
      Unit tests: Fix unit test description strings. · 9c6d72e3
      Richard Mudgett authored
      Analyzing the code shows that the unit test summary and description
      strings should not end with a new-line character.  Where these strings are
      used in the code a new-line is provided for output.
      
      Change-Id: I129284f5e7ca93d82532334076da4c462d3d9fba
      9c6d72e3
  3. 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
  4. Sep 23, 2014
    • Mark Michelson's avatar
      Make CDR and CEL unit tests less FRACKy. · a89964a5
      Mark Michelson authored
      Prior to this commit, CDR and CEL tests were expected to trigger
      FRACKs (i.e. assertions) due to the fact that the channels they
      create have no formats on them. Some code was independently added
      recently that attempts to prevent FRACKs from occurring by failing
      early when attempting to set up translation paths if one or both
      channels support no formats. Unfortunately, this attempt to be helpful
      made the CDR and CEL tests go from simply FRACKing to outright
      failing and in some cases, failing so badly as to crash Asterisk.
      
      This commit seeks to correct past mistakes by adding the ulaw format
      to channels created by the CDR and CEL unit tests. This makes setting
      up translation paths succeed, eliminates previously-seen FRACKs, and
      ultimately causes the unit tests to succeed again.
      
      Review: https://reviewboard.asterisk.org/r/4014
      ........
      
      Merged revisions 423783 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      a89964a5
  5. Mar 07, 2014
  6. Jan 28, 2014
  7. Dec 18, 2013
  8. Dec 17, 2013
  9. Dec 05, 2013
  10. Dec 03, 2013
  11. Sep 24, 2013
    • Matthew Jordan's avatar
      Fix a performance problem CDRs · e7d49d28
      Matthew Jordan authored
      There is a large performance price currently in the CDR engine. We currently
      perform two ao2_callback calls on a container that has an entry for every
      channel in the system. This is done to create matching pairs between channels
      in a bridge.
      
      As such, the portion of the CDR logic that this patch deals with is how we
      make pairings when a channel enters a mixing bridge. In general, when a
      channel enters such a bridge, we need to do two things:
       (1) Figure out if anyone in the bridge can be this channel's Party B.
       (2) Make pairings with every other channel in the bridge that is not already
           our Party B.
      
      This is a two step process. In the first step, we look through everyone in the
      bridge and see if they can be our Party B (single_state_process_bridge_enter).
      If they can - yay! We mark our CDR as having gotten a Party B. If not, we keep
      searching. If we don't find one, we wait until someone joins who can be our
      Party B.
      
      Step 2 is where we changed the logic
      (handle_bridge_pairings and bridge_candidate_process). Previously, we would
      first find candidates - those channels in the bridge with us - from the
      active_cdrs_by_channel container. Because a channel could be a candidate if it
      was Party B to an item in the container, the code implemented multiple
      ao2_container callbacks to get all the candidates. We also had to store them
      in another container with some other meta information. This was rather complex
      and costly, particularly if you have 300 Local channels (600 channels!) going
      at once.
      
      Luckily, none of it is needed: when a channel enters a bridge (which is when
      we're figuring all this stuff out), the bridge snapshot tells us the unique
      IDs of everyone already in the bridge. All we need to do is:
       For all channels in the bridge:
         If the channel is us or our Party B that we got in step 1, skip it
         Compare us and the candidate to figure out who is Party A (based on some
             specific rules)
         If we are Party A:
            Make a new CDR for us, append it to our chain, and set the candidate as
                Party B
         If they are Party A:
            If they don't have a Party B:
              Make a new CDR for them, append us to their chain, and us as Party B
            Otherwise:
              Copy us over as Party B on their existing CDR.
      
      This patch does that.
      
      Because we now use channel unique IDs to find the candidates during bridging,
      active_cdrs_by_channel now looks up things using uniqueid instead of channel
      name. This makes the more complex code simpler; it does, however, have the
      drawback that dialplan applications and functions will be slightly slower as
      they have to iterate through the container looking for the CDR by name.
      That's a small price to pay however as the bridging code will be called a lot
      more often.
      
      This patch also does two other minor changes:
       (1) It reduces the container size of the channels in a bridge snapshot to 1.
           In order to be predictable for multi-party bridges, the order of the
           channels in the container must be stable; that is, it must always devolve
           to a linked list.
       (2) CDRs and the multi-party test was updated to show the relationship between
           two dialed channels. You still want to know if they talked - previously,
           dialed channels were always ignored, which is wrong when they have
           managed to get a Party B.
      
      (closes issue ASTERISK-22488)
      Reported by: Richard Mudgett
      
      Review: https://reviewboard.asterisk.org/r/2861/
      ........
      
      Merged revisions 399666 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399667 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      e7d49d28
  12. Sep 13, 2013
    • Richard Mudgett's avatar
      Restore Dial, Queue, and FollowMe 'I' option support. · 2a371cd8
      Richard Mudgett authored
      The Dial, Queue, and FollowMe applications need to inhibit the bridging
      initial connected line exchange in order to support the 'I' option.
      
      * Replaced the pass_reference flag on ast_bridge_join() with a flags
      parameter to pass other flags defined by enum ast_bridge_join_flags.
      
      * Replaced the independent flag on ast_bridge_impart() with a flags
      parameter to pass other flags defined by enum ast_bridge_impart_flags.
      
      * Since the Dial, Queue, and FollowMe applications are now the only
      callers of ast_bridge_call() and ast_bridge_call_with_flags(), changed the
      calling contract to require the initial COLP exchange to already have been
      done by the caller.
      
      * Made all callers of ast_bridge_impart() check the return value.  It is
      important.  As a precaution, I also made the compiler complain now if it
      is not checked.
      
      * Did some cleanup in parking_tests.c as a result of checking the
      ast_bridge_impart() return value.
      
      An independent, but associated change is:
      * Reduce stack usage in ast_indicate_data() and add a dropping redundant
      connected line verbose message.
      
      (closes issue ASTERISK-22072)
      Reported by: Joshua Colp
      
      Review: https://reviewboard.asterisk.org/r/2845/
      ........
      
      Merged revisions 399136 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      2a371cd8
  13. Sep 08, 2013
  14. Aug 16, 2013
  15. Aug 02, 2013
  16. Jul 25, 2013
  17. Jul 17, 2013
  18. Jun 28, 2013
    • Matthew Jordan's avatar
      Handle an originated channel being sent into a non-empty bridge · ca61a055
      Matthew Jordan authored
      Originated channels are a bit odd - they are technically a dialed channel (thus
      the party B or peer) but, since there is no caller, they are treated as the
      party A. When entering into a bridge that already contains participants, the CDR
      engine - if the CDR record is in the Dial state - attempts to match the person
      entering the bridge with an existing participant. The idea is that if you dialed
      someone and the person you dialed is already in the bridge, you don't need a new
      CDR record, the existing CDR record describes the relationship.
      
      Unfortunately, for an originated channel, there is no Party B. If no one was in
      the bridge this didn't cause any issues; however, if participants were in the
      bridge the CDR engine would attempt to match a non-existant Party B on the
      channel's CDR record and explode.
      
      This patch fixes that, and a unit test has been added to cover this case.
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      ca61a055
  19. 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
Loading