Skip to content
Snippets Groups Projects
  1. May 05, 2015
  2. Apr 27, 2015
    • Corey Farrell's avatar
      Astobj2: Allow reference debugging to be enabled/disabled by config. · 5c1d07ba
      Corey Farrell authored
      * The REF_DEBUG compiler flag no longer has any effect on code that uses
        Astobj2.  It is used to determine if reference debugging is enabled by
        default.  Reference debugging can be enabled or disabled in asterisk.conf.
      * Caller information is provided in logger errors for ao2 bad magic numbers.
      * Optimizes AO2 by merging internal functions with the public counterpart.
        This was possible now that we no longer require a dual ABI.
      
      ASTERISK-24974 #close
      Reported by: Corey Farrell
      
      Change-Id: Icf3552721fe999365ba8a8cf00a965aa6b897cc1
      5c1d07ba
  3. Apr 24, 2015
    • Kevin Harwell's avatar
      app_confbridge: Default the template option to a compatible default profile. · 9f65ea48
      Kevin Harwell authored
      Confbridge dynamic profiles did not have a default profile unless you
      explicitly used Set(CONFBRIDGE(bridge,template)=default_bridge). If a
      template was not set prior to the bridge being created then some
      options were left with no default values set. This patch makes it so
      the default templates are set to the default bridge and user profiles.
      
      ASTERISK-24749 #close
      Reported by: philippebolduc
      
      Change-Id: I1bd6e94b38701ac2112d842db68de63d46f60e0a
      9f65ea48
  4. Apr 17, 2015
    • Mark Michelson's avatar
      Detect potential forwarding loops based on count. · aae45acb
      Mark Michelson authored
      A potential problem that can arise is the following:
      
      * Bob's phone is programmed to automatically forward to Carol.
      * Carol's phone is programmed to automatically forward to Bob.
      * Alice calls Bob.
      
      If left unchecked, this results in an endless loops of call forwards
      that would eventually result in some sort of fiery crash.
      
      Asterisk's method of solving this issue was to track which interfaces
      had been dialed. If a destination were dialed a second time, then
      the attempt to call that destination would fail since a loop was
      detected.
      
      The problem with this method is that call forwarding has evolved. Some
      SIP phones allow for a user to manually forward an incoming call to an
      ad-hoc destination. This can mean that:
      
      * There are legitimate use cases where a device may be dialed multiple
      times, or
      * There can be human error when forwarding calls.
      
      This change removes the old method of detecting forwarding loops in
      favor of keeping a count of the number of destinations a channel has
      dialed on a particular branch of a call. If the number exceeds the
      set number of max forwards, then the call fails. This approach has
      the following advantages over the old:
      
      * It is much simpler.
      * It can detect loops involving local channels.
      * It is user configurable.
      
      The only disadvantage it has is that in the case where there is a
      legitimate forwarding loop present, it takes longer to detect it.
      However, the forwarding loop is still properly detected and the
      call is cleaned up as it should be.
      
      Address review feedback on gerrit.
      
      * Correct "mfgium" to "Digium"
      * Decrement max forwards by one in the case where allocation of the
        max forwards datastore is required.
      * Remove irrelevant code change from pjsip_global_headers.c
      
      ASTERISK-24958 #close
      
      Change-Id: Ia7e4b7cd3bccfbd34d9a859838356931bba56c23
      aae45acb
  5. Apr 14, 2015
    • Corey Farrell's avatar
      Build System: Create Makefile macro MOD_ADD_SOURCE. · 62508d68
      Corey Farrell authored
      This new macro allows a single line to add all additional
      sources to a module.  This helps prevent modules from
      missing steps, and makes future changes easier since
      they can be made in a single place.
      
      ASTERISK-24960 #close
      Reported by: Corey Farrell
      
      Change-Id: I38f12d8b72c5e7bb37a879b2fb51761a2855eb4b
      62508d68
  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. Apr 09, 2015
  8. Apr 08, 2015
  9. Apr 01, 2015
  10. Mar 31, 2015
    • Ashley Sanders's avatar
      stasis: set a channel variable on websocket disconnect error · 06578ef4
      Ashley Sanders authored
      When an error occurs while writing to a web socket, the web socket is
      disconnected and the event is logged. A side-effect of this, however, is that
      any application on the other side waiting for a response from Stasis is left
      hanging indefinitely (as there is no mechanism presently available for
      notifying interested parties about web socket error states in Stasis).
      
      To remedy this scenario, this patch introduces a new channel variable:
      STASISSTATUS.
      
      The possible values for STASISSTATUS are:
      SUCCESS         - The channel has exited Stasis without any failures
      FAILED          - Something caused Stasis to croak. Some (not all) possible
                        reasons for this:
                          - The app registry is not instantiated;
                          - The app requested is not registered;
                          - The app requested is not active;
                          - Stasis couldn't send a start message
      
      ASTERISK-24802
      Reported By: Kevin Harwell
      Review: https://reviewboard.asterisk.org/r/4519/
      ........
      
      Merged revisions 433839 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433845 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      06578ef4
  11. Mar 30, 2015
  12. Mar 28, 2015
  13. Mar 26, 2015
  14. Mar 23, 2015
  15. Mar 17, 2015
  16. Mar 14, 2015
  17. Mar 13, 2015
  18. Mar 10, 2015
    • Matthew Jordan's avatar
      app_voicemail: Fix crash with IMAP backends when greetings aren't present · ab6e2c93
      Matthew Jordan authored
      When an IMAP backend is in use and greetings are set to be used, but aren't
      present for a user in their IMAP folder, Asterisk will crash. This occurs
      due to the mailstream being set to the 'greetings' folder and being left
      in that particular state, regardless of the success/failure of the attempt
      to access the folder the mailstream points to. Later access of the mailstream
      assumes that it points to the 'INBOX' (or some other folder), resulting in
      either a crash (if the greetings folder didn't exist and the mailstream is
      invalid) or an inability to read messages from the 'INBOX' folder.
      
      This patch restores the mailstream to its correct state after accessing the
      greetings. This fixes the crash, and sets the mailstream to the state that
      VoiceMailMain expects.
      
      Note that while ASTERISK-23390 also contained a patch for this issue, the
      patch on ASTERISK-24786 is the one being merged here.
      
      Review: https://reviewboard.asterisk.org/r/4459/
      
      ASTERISK-23390 #close
      Reported by: Ben Smithurst
      
      ASTERISK-24786 #close
      Reported by: Graham Barnett
      Tested by: Graham Barnett
      patches:
        app_voicemail.c.patch.SIGSEGV3rev2 uploaded by Graham Barnett (License 6685)
      ........
      
      Merged revisions 432695 from http://svn.asterisk.org/svn/asterisk/branches/11
      ........
      
      Merged revisions 432696 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      ab6e2c93
  19. Mar 05, 2015
  20. Feb 26, 2015
  21. Feb 21, 2015
    • Matthew Jordan's avatar
      apps/app_voicemail: Demote an ERROR message to a WARNING message · b3c1ad5d
      Matthew Jordan authored
      When using IMAP voicemail with FreePBX, you will often get ERROR messages
      complaining about not being able to find a mailbox. This is due to how FreePBX
      handles voicemail mailboxes. Unfortunately, app_voicemail has to consider this
      a configuration error, as in any other system it would be indicative of
      someone misconfiguring their system.
      
      Regardless, a misconfiguration is a WARNING, and not an ERROR. This patch
      demotes the message so that system administrators can hopefully reduce some
      of the noise in their log files.
      
      Note that in the original patch this was made into a NOTICE, but that's a
      too forgiving.
      
      ASTERISK-24790 #close
      Reported by: Graham Barnett
      patches:
        app_voicemail.c.patch_noise uploaded by Graham Barnett (License 6685)
      ........
      
      Merged revisions 432098 from http://svn.asterisk.org/svn/asterisk/branches/11
      ........
      
      Merged revisions 432099 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432100 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      b3c1ad5d
  22. Feb 20, 2015
  23. Feb 15, 2015
  24. Feb 11, 2015
    • Richard Mudgett's avatar
      HTTP: Stop accepting requests on final system shutdown. · e2d3215b
      Richard Mudgett authored
      There are three CLI commands to stop and restart Asterisk each.
      
      1) core stop/restart now - Hangup all calls and stop or restart Asterisk.
      New channels are prevented while the shutdown request is pending.
      
      2) core stop/restart gracefully - Stop or restart Asterisk when there are
      no calls remaining in the system.  New channels are prevented while the
      shutdown request is pending.
      
      3) core stop/restart when convenient - Stop or restart Asterisk when there
      are no calls in the system.  New calls are not prevented while the
      shutdown request is pending.
      
      ARI has made stopping/restarting Asterisk more problematic.  While a
      shutdown request is pending it is desirable to continue to process ARI
      HTTP requests for current calls.  To handle the current calls while a
      shutdown request is pending, a new committed to shutdown phase is needed
      so ARI applications can deal with the calls until the system is fully
      committed to shutdown.
      
      * Added a new shutdown committed phase so ARI applications can deal with
      calls until the final committed to shutdown phase is reached.
      
      * Made refuse new HTTP requests when the system has reached the final
      system shutdown phase.  Starting anything while the system is actively
      releasing resources and unloading modules is not a good thing.
      
      * Split the bridging framework shutdown to not cleanup the global bridging
      containers when shutting down in a hurry.  This is similar to how other
      modules prevent crashes on rapid system shutdown.
      
      * Moved ast_begin_shutdown(), ast_cancel_shutdown(), and
      ast_shutting_down().  You should not have to include channel.h just to
      access these system functions.
      
      ASTERISK-24752 #close
      Reported by: Matthew Jordan
      
      Review: https://reviewboard.asterisk.org/r/4399/
      ........
      
      Merged revisions 431692 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431694 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      e2d3215b
  25. Jan 30, 2015
    • Richard Mudgett's avatar
      app_agent_pool: Fix initial module load agent device state reporting. · 23bb5f6a
      Richard Mudgett authored
      When the app_agent_pool module initially loads there is a race condition
      between the thread loading agents.conf and the device state internal
      processing thread.  If the device state internal processing thread handles
      the agent creation state updates before the thread that loaded agents.conf
      registers the device state provider callback then the cached agent state
      is "Invalid".  When a consumer module like app_queue asks for the agent state
      it gets the cached "Invalid" state instead of the real state from the provider.
      
      * Moved loading the agents.conf configuration to the last thing setup by
      app_agent_pool in load_module().  Now the device state provider callback
      is registered before the config is loaded so the agent creation state
      updates are guaranteed to get the initial device state.
      
      * Removed some now redundant config cleanup on error in load_config().
      
      * Added lock protection when accessing the device state in
      agent_pvt_devstate_get() and eliminated the RAII_VAR() usage.
      
      ASTERISK-24737 #close
      Reported by: Steve Pitts
      
      Review: https://reviewboard.asterisk.org/r/4390/
      ........
      
      Merged revisions 431492 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      23bb5f6a
  26. Jan 27, 2015
  27. Jan 23, 2015
  28. Jan 22, 2015
  29. Jan 21, 2015
    • Matthew Jordan's avatar
      apps/app_dial: Don't publish DialEnd twice on unexpected GoSub/Macro values · 4740ef50
      Matthew Jordan authored
      The Dial application has some interesting options with the mid-call Macro (M)
      and GoSub (U) options. If the MACRO_RESULT/GOSUB_RESULT returns specific
      values, the Dial application will take some action upon the channels involved
      in the dial operation (such as hanging up a particular party, etc.) The Dial
      application ensures that a Stasis message is published in the event that
      MACRO_RESULT/GOSUB_RESULT returns a value that kills the dial operation, so
      that there is a corresponding DialEnd event published in AMI/ARI for the
      DialBegin event that preceeded it.
      
      A bug exists where that same DialEnd event will be published on Stasis even if
      the value returned in MACRO_RESULT/GOSUB_RESULT is not one that the Dial
      application cares about. This causes two DialEnd events to be published - one
      with the MACRO_RESULT/GOSUB_RESULT and another with "ANSWERED" - which is all
      sorts of wrong.
      
      This patch fixes the bug by ensuring that we only publish a DialEnd message to
      Stasis if the Dial application's mid-call Macro/GoSub returns something that
      Dial cares about.
      
      Review: https://reviewboard.asterisk.org/r/4336
      
      ASTERISK-24682 #close
      Reported by: Matt Jordan
      ........
      
      Merged revisions 430842 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      4740ef50
  30. Jan 20, 2015
  31. Jan 13, 2015
  32. Jan 12, 2015
Loading