Skip to content
Snippets Groups Projects
  1. 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
  2. Apr 09, 2015
    • Matthew Jordan's avatar
      clang compiler warnings: Fix autological comparisons · ea009872
      Matthew Jordan authored
      This fixes autological comparison warnings in the following:
       * chan_skinny: letohl may return a signed or unsigned value, depending on the
         macro chosen
       * func_curl: Provide a specific cast to CURLoption to prevent mismatch
       * cel: Fix enum comparisons where the enum can never be negative
       * enum: Fix comparison of return result of dn_expand, which returns a signed
         int value
       * event: Fix enum comparisons where the enum can never be negative
       * indications: tone_data.freq1 and freq2 are unsigned, and hence can never be
         negative
       * presencestate: Use the actual enum value for INVALID state
       * security_events: Fix enum comparisons where the enum can never be negative
       * udptl: Don't bother to check if the return value from encode_length is less
         than 0, as it returns an unsigned int
       * translate: Since the parameters are unsigned int, don't bother checking
         to see if they are negative. The cast to unsigned int would already blow
         past the matrix bounds.
       * res_pjsip_exten_state: Use a temporary value to cache the return of
         ast_hint_presence_state
       * res_stasis_playback: Fix enum comparisons where the enum can never be
         negative
       * res_stasis_recording: Add an enum value for the case where the recording
         operation is in error; fix enum comparisons
       * resource_bridges: Use enum value as opposed to -1
       * resource_channels: Use enum value as opposed to -1
      
      Review: https://reviewboard.asterisk.org/r/4533
      ASTERISK-24917
      Reported by: dkdegroot
      patches:
        rb4533.patch submitted by dkdegroot (License 6600)
      ........
      
      Merged revisions 434469 from http://svn.asterisk.org/svn/asterisk/branches/11
      ........
      
      Merged revisions 434470 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      ea009872
  3. Mar 06, 2015
  4. Jan 26, 2015
    • David M. Lee's avatar
      Various fixes for OS X · 965777cc
      David M. Lee authored
      This patch addresses compilation errors on OS X. It's been a while, so
      there's quite a few things.
      
       * Fixed __attribute__ decls in route.h to be portable.
       * Fixed htonll and ntohll to work when they are defined as macros.
       * Replaced sem_t usage with our ast_sem wrapper.
       * Added ast_sem_timedwait to our ast_sem wrapper.
       * Fixed some GCC 4.9 warnings using sig*set() functions.
       * Fixed some format strings for portability.
       * Fixed compilation issues with res_timing_kqueue (although tests still fail
         on OS X).
       * Fixed menuconfig /sbin/launchd detection, which disables res_timing_kqueue
         on OS X).
      
      ASTERISK-24539 #close
      Reported by: George Joseph
      
      ASTERISK-24544 #close
      Reported by: George Joseph
      
      Review: https://reviewboard.asterisk.org/r/4327/
      ........
      
      Merged revisions 431092 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      965777cc
  5. Nov 04, 2014
  6. Nov 02, 2014
  7. Sep 26, 2014
  8. Sep 11, 2014
    • Mark Michelson's avatar
      Remove undocumented default behavior of ast_play_and_record_full acceptdtmf. · c212a71f
      Mark Michelson authored
      ast_play_and_record_full() has a parameter called "acceptdtmf" that is a
      string of acceptable DTMF digits that may be pressed by a caller to end
      and accept the recording.
      
      ARI uses this function in order to perform recording, and it provides
      options for what is passed as acceptdtmf to ast_play_and_record_full().
      By default, ARI passes an empty string, with the intention that no DTMF
      can be used to end the recording.
      
      The problem is that ast_play_and_record_full() attempts to be "helpful"
      by setting "#" as the acceptdtmf if an empty string or NULL pointer
      has been passed in. With ARI, this results in unexpected behavior
      occurring if you have attempted to intercept "#" yourself in order
      to perform some other manipulation of the live recording.
      
      This change removes the "helpful" behavior by no longer accepting
      "#" as a default acceptdtmf if none is specified by the caller of
      ast_play_and_record_full(). This makes the ARI scenario work as
      expected.
      
      The other callers of ast_play_and_record_full() are app_voicemail
      and app_minivm, and in both cases, they pass an explicit "#" to
      ast_play_and_record_full() as acceptdtmf, so they are unaffected
      by this change.
      ........
      
      Merged revisions 422964 from http://svn.asterisk.org/svn/asterisk/branches/12
      ........
      
      Merged revisions 422965 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@422967 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      c212a71f
  9. Aug 21, 2014
    • Matthew Jordan's avatar
      ARI: Fix implicit answer when playback is initiated on unanswered channel · f3a525e9
      Matthew Jordan authored
      When issuing a POST /channels/{channel_id}/play on a channel that is not
      yet answered, ARI is supposed to:
      * Queue up an AST_CONTROL_PROGRESS on the channel
      * Start up the playback of the media
      
      Instead, we sneak an answer on the channel right before starting playing media.
      
      This is due to ARI's usage of control_streamfile. This function implicitly
      answers the channel (and doesn't give ARI the option to stop it). The answering
      of the channel here is probably unnecessary:
      * app_voicemail, by far the biggest consumer of this function, always answers
        the channels anyway
      * control stream file (in res_agi) and ControlPlayback probably shouldn't be
        implicitly answering the channel. Answering should not be tied directly to
        playing back media.
      
      As it turns out, the answering of the channel here is pretty old:
      356042    twilson       if (ast_channel_state(chan) != AST_STATE_UP) {
        3087      anthm               res = ast_answer(chan);
      180259   tilghman       }
      
      (As in, ancient?)
      
      Note that others ran into this problem and commented about it on various
      mailing lists.
      
      Review: https://reviewboard.asterisk.org/r/3907/
      
      ASTERISK-24229 #close
      Reported by: Matt Jordan
      ........
      
      Merged revisions 421695 from http://svn.asterisk.org/svn/asterisk/branches/12
      ........
      
      Merged revisions 421696 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@421699 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      f3a525e9
  10. Aug 15, 2014
  11. Aug 14, 2014
  12. Aug 06, 2014
  13. Jul 20, 2014
  14. Jun 20, 2014
  15. May 22, 2014
    • Matthew Jordan's avatar
      res_corosync: Update module to work with Stasis (and compile) · 9cee08f5
      Matthew Jordan authored
      This patch fixes res_corosync such that it works with Asterisk 12. This
      restores the functionality that was present in previous versions of
      Asterisk, and ensures compatibility with those versions by restoring the
      binary message format needed to pass information from/to them.
      
      The following changes were made in the core to support this:
       * The event system has been partially restored. All event definition and
         event types in this patch were pulled from Asterisk 11. Previously, we had
         hoped that this information would live in res_corosync; however, the
         approach in this patch seems to be better for a few reasons:
         (1) Theoretically, ast_events can be used by any module as a binary
             representation of a Stasis message. Given the structure of an ast_event
             object, that information has to live in the core to be used universally.
             For example, defining the payload of a device state ast_event in
             res_corosync could result in an incompatible device state representation
             in another module.
         (2) Much of this representation already lived in the core, and was not
             easily extensible.
         (3) The code already existed. :-)
       * Stasis message types now have a message formatter that converts their
         payload to an ast_event object.
       * Stasis message forwarders now handle forwarding to themselves. Previously
         this would result in an infinite recursive call. Now, this simply creates a
         new forwarding object with no forwards set up (as it is the thing it is
         forwarding to). This is advantageous for res_corosync, as returning NULL
         would also imply an unrecoverable error. Returning a subscription in this
         case allows for easier handling of message types that are published directly
         to an aggregate topic that has forwarders.
      
      Review: https://reviewboard.asterisk.org/r/3486/
      
      ASTERISK-22912 #close
      ASTERISK-22372 #close
      ........
      
      Merged revisions 414330 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@414331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      9cee08f5
  16. May 09, 2014
  17. Apr 17, 2014
  18. Mar 14, 2014
  19. Mar 07, 2014
    • Richard Mudgett's avatar
      stasis cache: Enhance to keep track of an item from different entities. · 4ad1245c
      Richard Mudgett authored
      A stasis cache entry now contains more than a single message/snapshot.  It
      contains messages/snapshots for the local entity as well as any remote
      entities that post to the cached item.  In addition callbacks can be
      supplied when the cache is created to compute and post the aggregate
      message/snapshot representing all entities stored in the cache entry.
      
      * All stasis messages now have an eid to indicate what entity posted it.
      
      * The stasis cache enhancements allow device state to cache and aggregate
      the device states from local and remote entities in a single operation.
      The cached aggregate device state is available immediately after it is
      posted to the stasis bus.  This improves performance by eliminating a
      cache dump and associated ao2 container traversals to calculate the
      aggregate state.
      
      (closes issue ASTERISK-23204)
      Reported by: Mark Michelson
      
      Review: https://reviewboard.asterisk.org/r/3281/
      ........
      
      Merged revisions 410184 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      4ad1245c
  20. Dec 19, 2013
    • Richard Mudgett's avatar
      Voicemail: Remove mailbox identifier format (box@context) assumptions in the system. · e4803bbd
      Richard Mudgett authored
      This change is in preparation for external MWI support.
      
      Removed code from the system for normal mailbox handling that appends
      @default to the mailbox identifier if it does not have a context.  The
      only exception is the legacy hasvoicemail users.conf option.  The legacy
      option will only work for app_voicemail mailboxes.  The system cannot make
      any assumptions about the format of the mailbox identifer used by
      app_voicemail.
      
      chan_sip and chan_dahdi/sig_pri had the most changes because they both
      tried to interpret the mailbox identifier.  chan_sip just stored and
      compared the two components.  chan_dahdi actually used the box
      information.
      
      The ISDN MWI support configuration options had to be reworked because
      chan_dahdi was parsing the box@context format to get the box number.  As a
      result the mwi_vm_boxes chan_dahdi.conf option was added and is documented
      in the chan_dahdi.conf.sample file.
      
      Review: https://reviewboard.asterisk.org/r/3072/
      ........
      
      Merged revisions 404348 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      e4803bbd
  21. Dec 13, 2013
  22. Dec 11, 2013
  23. Nov 01, 2013
  24. Oct 24, 2013
  25. Aug 29, 2013
  26. Aug 22, 2013
    • Mark Michelson's avatar
      Massively clean up app_queue. · 00baddb9
      Mark Michelson authored
      This essentially makes app_queue usable again. From reviewboard:
      
      * Reporting of transfers and call completion is done by creating stasis 
        subscriptions and listening for specific events in order to determine
        when the call is finished (either via a transfer or hangup).
      * Dial end messages have been added where they were previously missing.
      * Queue stats are properly being updated again once calls have finished.
      * AgentComplete stasis messages and AMI events are now occurring again.
      * Mixmonitor starting has been factored into its own function and uses the
        Mixmonitor API now instead of using ast_pbx_run()
      
      In addition to the changes in app_queue, there are several supplementary changes as well:
      
      * Queue logging now differentiates between attended and blind transfers. A
        note about this is in the CHANGES file.
      * Local channel optimization events now report more information. This
        includes which of the two local channels involved is the destination of
        the optimization, the channel that is replacing the destination local channel,
        and an identifier so that begin and end events can be matched to each other.
        The end events are now sent whether the optimization was successful or not and
        includes an indicator of whether the optimization was successful.
      * Changes were made to features and bridging_basic so that additional flags may
        be set on a bridge. This is necessary because the queue requires that its
        bridge only allows move-swap local channel optimizations into the bridge.
      
      (closes issue ASTERISK-21517)
      Reported by Matt Jordan
      
      (closes issue ASTERISK-21943)
      Reported by Matt Jordan
      
      Review: https://reviewboard.asterisk.org/r/2694
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      00baddb9
  27. Aug 06, 2013
    • David M. Lee's avatar
      ARI: Add recording controls · c7908487
      David M. Lee authored
      This patch implements the controls from ARI recordings. The controls
      are:
      
       * DELETE /recordings/live/{recordingName} - stop recording and
         discard it
       * POST /recordings/live/{recordingName}/stop - stop recording
       * POST /recordings/live/{recordingName}/pause - pause recording
       * POST /recordings/live/{recordingName}/unpause - resume recording
       * POST /recordings/live/{recordingName}/mute - mute recording (record
         silence to the file)
       * POST /recordings/live/{recordingName}/unmute - unmute recording.
      
      Since this underlying functionality did not already exist, is was
      added to app.c by a set of control frames, similar to how playback
      control works. The pause/mute control frames are toggles, even though
      the ARI controls are idempotent, to be consistent with the playback
      control frames.
      
      (closes issue ASTERISK-22181)
      Review: https://reviewboard.asterisk.org/r/2697/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      c7908487
  28. Aug 01, 2013
    • David M. Lee's avatar
      Split caching out from the stasis_caching_topic. · e1b959cc
      David M. Lee authored
      In working with res_stasis, I discovered a significant limitation to
      the current structure of stasis_caching_topics: you cannot subscribe
      to cache updates for a single channel/bridge/endpoint/etc.
      
      To address this, this patch splits the cache away from the
      stasis_caching_topic, making it a first class object. The stasis_cache
      object is shared amongst individual stasis_caching_topics that are
      created per channel/endpoint/etc. These are still forwarded to global
      whatever_all_cached topics, so their use from most of the code does
      not change.
      
      In making these changes, I noticed that we frequently used a similar
      pattern for bridges, endpoints and channels:
      
           single_topic  ---------------->  all_topic
                 ^
                 |
           single_topic_cached  ----+---->  all_topic_cached
                                    |
                                    +---->  cache
      
      This pattern was extracted as the 'Stasis Caching Pattern', defined in
      stasis_caching_pattern.h. This avoids a lot of duplicate code between
      the different domain objects.
      
      Since the cache is now disassociated from its upstream caching topics,
      this also necessitated a change to how the 'guaranteed' flag worked
      for retrieving from a cache. The code for handling the caching
      guarantee was extracted into a 'stasis_topic_wait' function, which
      works for any stasis_topic.
      
      (closes issue ASTERISK-22002)
      Review: https://reviewboard.asterisk.org/r/2672/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      e1b959cc
  29. Jul 03, 2013
  30. Jun 14, 2013
    • Mark Michelson's avatar
      Fix regression in MWI stasis handling. · 67e35c7b
      Mark Michelson authored
      In revision 389733, mwi state allocation was placed into its
      own function instead of performing the allocation in-line when
      required. The issue was that in ast_publish_mwi_state_full(),
      the local variable "uniqueid" was no longer being set, but it was
      still being used as the topic for MWI. This meant that all MWI
      publications ended up being published to the "" (empty string)
      mailbox topic. Thus MWI subscriptions for specific mailboxes were
      never notified of mailbox state changes.
      
      This change fixes the issue by removing the local uniqueid variable
      from ast_publish_mwi_state_full() and instead referencing the
      mwi_state->uniqueid field since it has been properly set.
      
      (closes issue ASTERISK-21913)
      Reported by Malcolm Davenport
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391921 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      67e35c7b
  31. Jun 09, 2013
  32. May 30, 2013
    • David M. Lee's avatar
      Missed a line from a bad merge in r390122 · 721a1faf
      David M. Lee authored
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      721a1faf
    • 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
  33. May 24, 2013
  34. May 23, 2013
  35. May 22, 2013
  36. May 17, 2013
    • David M. Lee's avatar
      Fix shutdown assertions in stasis-core · b97c71bb
      David M. Lee authored
      In r388005, macros were introduced to consistently define message
      types. This added an assert if a message type was used either before
      it was initialized or after it had been cleaned up. It turns out that
      this assertion fires during shutdown.
      
      This actually exposed a hidden shutdown ordering problem. Since
      unsubscribing is asynchronous, it's possible that the message types
      used by the subscription could be freed before the final message of
      the subscription was processed.
      
      This patch adds stasis_subscription_join(), which blocks until the
      last message has been processed by the subscription. Since joining was
      most commonly done right after an unsubscribe, a
      stasis_unsubscribe_and_join() convenience function was also added.
      
      Similar functions were also added to the stasis_caching_topic and
      stasis_message_router, since they wrap subscriptions and have similar
      problems.
      
      Other code in trunk was refactored to join() where appropriate, or at
      least verify that the subscription was complete before being
      destroyed.
      
      Review: https://reviewboard.asterisk.org/r/2540
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389011 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      b97c71bb
  37. May 15, 2013
  38. Mar 28, 2013
Loading