Skip to content
Snippets Groups Projects
  1. Nov 26, 2018
    • George Joseph's avatar
      test_cel: Plug a few ref leaks · f4924d40
      George Joseph authored
      These are only a few of the leaks.  The large number of macros
      and return paths in this file would make a weeks worth of work
      to plug them all.
      
      Change-Id: Ie2369fa944023d44767871c5c30974cb077ffb56
      f4924d40
    • George Joseph's avatar
      bridges: Remove reliance on stasis caching · 3667c5e1
      George Joseph authored
      * The bridging core no longer uses the stasis cache for bridge
        snapshots.  The latest bridge snapshot is now stored on the
        ast_bridge structure itself.
      
      * The following APIs are no longer available since the stasis cache
        is no longer used:
          ast_bridge_topic_cached()
          ast_bridge_topic_all_cached()
      
      * A topic pool is now used for individual bridge topics.
      
      * The ast_bridge_cache() function was removed since there's no
        longer a separate container of snapshots.
      
      * A new function "ast_bridges()" was created to retrieve the
        container of all bridges.  Users formerly calling
        ast_bridge_cache() can use the new function to iterate over
        bridges and retrieve the latest snapshot directly from the
        bridge.
      
      * The ast_bridge_snapshot_get_latest() function was renamed to
        ast_bridge_get_snapshot_by_uniqueid().
      
      * A new function "ast_bridge_get_snapshot()" was created to retrieve
        the bridge snapshot directly from the bridge structure.
      
      * The ast_bridge_topic_all() function now returns a normal topic
        not a cached one so you can't use stasis cache functions on it
        either.
      
      * The ast_bridge_snapshot_type() stasis message now has the
        ast_bridge_snapshot_update structure as it's data.  It contains
        the last snapshot and the new one.
      
      * cdr, cel, manager and ari have been updated to use the new
        arrangement.
      
      Change-Id: I7049b80efa88676ce5c4666f818fa18ad1985369
      3667c5e1
    • Joshua Colp's avatar
      stasis: Segment channel snapshot to reduce creation cost. · 50ac85cb
      Joshua Colp authored
      When a channel snapshot was created it used to be done
      from scratch, copying all data (many strings). This incurs
      a cost when doing so.
      
      This change segments the channel snapshot into different
      components which can be reused if unchanged from the
      previous snapshot creation, reducing the cost. In normal
      cases this results in some pointers being copied with
      reference count being bumped, some integers being set,
      and a string or two copied. The other benefit is that it
      is now possible to determine if a channel snapshot update
      is redundant and thus stop it before a message is published
      to stasis.
      
      The specific segments in the channel snapshot were split up
      based on whether they are changed together, how often they
      are changed, and their general grouping. In practice only
      1 (or 0) of the segments actually get changed in normal
      operation.
      
      Invalidation is done by setting a flag on the channel when
      the segment source is changed, forcing creation of a new
      segment when the channel snapshot is created.
      
      ASTERISK-28119
      
      Change-Id: I5d7ef3df963a88ac47bc187d73c5225c315f8423
      50ac85cb
    • Joshua Colp's avatar
      stasis: Use an implementation specific channel snapshot cache. · d0ccbb33
      Joshua Colp authored
      Channels no longer use the Stasis cache for channel snapshots. Instead
      they are stored in a hash table in stasis_channels which reduces the
      number of Stasis messages created and allows better storage.
      
      As a result the following APIs are no longer available since the stasis
      cache is no longer used:
      ast_channel_topic_cached()
      ast_channel_topic_all_cached()
      
      The ast_channel_cache_all() and ast_channel_cache_by_name() functions
      now return an ao2_container of ast_channel_snapshots rather than
      a container of stasis_messages therefore you can't (and don't need
      to) call stasis_cache functions on it.
      
      The ast_channel_topic_all() function now returns a normal topic not
      a cached one so you can't use stasis cache functions on it either.
      
      The ast_channel_snapshot_type() stasis message now has the
      ast_channel_snapshot_update structure as it's data. It contains the
      last snapshot and the new one.
      
      ast_channel_snapshot_get_latest() still returns the latest snapshot.
      
      The latest snapshot is now stored on the channel itself to eliminate
      cache hits when Stasis messages that have the snapshot as a payload
      are created.
      
      ASTERISK-28102
      
      Change-Id: I9334febff60a82d7c39703e49059fa3a68825786
      d0ccbb33
  2. Nov 21, 2018
  3. 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
  4. Jun 09, 2016
    • Joshua Colp's avatar
      cel: Ensure only one dial status per channel exists. · d338343d
      Joshua Colp authored
      CEL wrongly assumed that a channel would only have a single dial
      event on it. This is incorrect. Particularly in a queue each
      call attempt to a member will result in a dial event, adding
      a new dial status in CEL without removing the old one. This
      would cause the container to grow with only one dial status
      being removed when the channel went away. The other dial status
      entries would remain leaking memory.
      
      This change fixes the memory leak by ensuring that only one dial
      status will only ever exist for each channel.
      
      The behavior during the scenario where multiple events are received
      has also been improved. For failure cases the first failure will
      be the dial status. If an answer dial status is received, though,
      it will take priority and the dial status for the channel will be
      answer.
      
      Memory usage has also been decreased by storing the minimal
      amount of information and the code has been cleaned up slightly.
      
      ASTERISK-25262 #close
      
      Change-Id: I5944eb923db17b6a0faa7317ff6abc9307c009fe
      d338343d
  5. 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
  6. 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
  7. Dec 03, 2014
  8. Nov 14, 2014
    • Matthew Jordan's avatar
      tests/test_cel: Unlock bridge on off nominal paths · 32685449
      Matthew Jordan authored
      If the test fails due to memory allocation errors, we may as well attempt to
      unlock the bridge on the way out.
      ........
      
      Merged revisions 427927 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      32685449
    • Mark Michelson's avatar
      Fix race condition that could result in ARI transfer messages not being sent. · 2d9471ab
      Mark Michelson authored
      From reviewboard:
      
      "During blind transfer testing, it was noticed that tests were failing
      occasionally because the ARI blind transfer event was not being sent.
      After investigating, I detected a race condition in the blind transfer
      code. When blind transferring a single channel, the actual transfer
      operation (i.e. removing the transferee from the bridge and directing
      them to the proper dialplan location) is queued onto the transferee
      bridge channel. After queuing the transfer operation, the blind transfer
      Stasis message is published. At the time of publication, snapshots of
      the channels and bridge involved are created. The ARI subscriber to the
      blind transfer Stasis message then attempts to determine if the bridge
      or any of the involved channels are subscribed to by ARI applications.
      If so, then the blind transfer message is sent to the applications. The
      way that the ARI blind transfer message handler works is to first see
      if the transferer channel is subscribed to. If not, then iterate over
      all the channel IDs in the bridge snapshot and determine if any of
      those are subscribed to. In the test we were running, the lone
      transferee channel was subscribed to, so an ARI event should have been
      sent to our application. Occasionally, though, the bridge snapshot did
      not have any channels IDs on it at all. Why?
      
      The problem is that since the blind transfer operation is handled by a
      separate thread, it is possible that the transfer will have completed and
      the channels removed from the bridge before we publish the blind transfer
      Stasis message. Since the blind transfer has completed, the bridge on
      which the transfer occurred no longer has any channels on it, so the
      resulting bridge snapshot has no channels on it. Through investigation of
      the code, I found that attended transfers can have this issue too for the
      case where a transferee is transferred to an application."
      
      The fix employed here is to decouple the creation of snapshots for the transfer
      messages from the publication of the transfer messages. This way, snapshots
      can be created to reflect what they are at the time of the transfer operation.
      
      Review: https://reviewboard.asterisk.org/r/4135
      ........
      
      Merged revisions 427848 from http://svn.asterisk.org/svn/asterisk/branches/12
      ........
      
      Merged revisions 427870 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427873 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      2d9471ab
  9. Oct 17, 2014
  10. 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
  11. Aug 20, 2014
  12. Aug 14, 2014
  13. Aug 08, 2014
  14. Aug 07, 2014
  15. Jul 20, 2014
  16. Jul 07, 2014
    • Kinsey Moore's avatar
      CEL: Fix incorrect/missing extra field information · edcaa540
      Kinsey Moore authored
      This corrects two issues with the extra field information in Asterisk
      12+ in channel event logs.
      
      It is possible to inject custom values into the dialstatus provided by
      ast_channel_dial_type() Stasis messages that fall outside the
      enumeration allowed for the DIALSTATUS channel variable. CEL now
      filters for the allowed values and ignores other values.
      
      The "hangupsource" extra field key is always blank if the far end
      channel is a chan_pjsip channel. This is because the hangupsource is
      never set for the pjsip channel driver. This change sets the
      hangupsource whenever a hangup is queued for chan_pjsip channels.
      
      This corrects an issue with the pjsip channel driver where the
      hangupcause information was not being set properly.
      
      Review: https://reviewboard.asterisk.org/r/3690/
      ........
      
      Merged revisions 418071 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418084 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      edcaa540
  17. Jun 27, 2014
  18. May 23, 2014
  19. Apr 11, 2014
  20. Mar 07, 2014
  21. Jan 28, 2014
  22. Dec 20, 2013
  23. Dec 18, 2013
  24. Dec 17, 2013
  25. Dec 05, 2013
  26. Dec 03, 2013
  27. Oct 03, 2013
  28. Oct 02, 2013
  29. Sep 27, 2013
  30. 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
  31. Aug 22, 2013
  32. Aug 17, 2013
Loading