Skip to content
Snippets Groups Projects
  1. Oct 04, 2018
    • Richard Mudgett's avatar
      func_periodic_hook.c: Cleanup module resources on failure. · c6c3a636
      Richard Mudgett authored
      * Make load_module() cleanup if it failed to setup the module.
      
      * Make unload_module() always return 0.  It is silly to fail unloading if
      the hook function we try to unregister was not even registered.
      
      Change-Id: I280fc6e8ba2a7ee2588ca01d870eebaf74b4ffe6
      c6c3a636
  2. Jan 24, 2018
    • Corey Farrell's avatar
      Remove redundant module checks and references. · 527cf5a5
      Corey Farrell authored
      This removes references that are no longer needed due to automatic
      references created by module dependencies.
      
      In addition this removes most calls to ast_module_check as they were
      checking modules which are listed as dependencies.
      
      Change-Id: I332a6e8383d4c72c8e89d988a184ab8320c4872e
      527cf5a5
  3. Dec 29, 2017
    • Corey Farrell's avatar
      datastore: Add automatic module references. · 0fe7df64
      Corey Farrell authored
      Add a reference to the calling module when it is active to protect
      access to datastore->info.  Remove module references done by
      func_periodic_hook as the datastore now handles it.
      
      ASTERISK-25128 #close
      
      Change-Id: I8357a3711e77591d0d1dd8ab4211a7eedd782c89
      0fe7df64
  4. Nov 02, 2017
    • Corey Farrell's avatar
      Prevent unload of modules which implement an Optional API. · 79f111e1
      Corey Farrell authored
      Once an Optional API module is loaded it should stay loaded.  Unloading
      an optional API module runs the risk of a crash if something else is
      using it.  This patch causes all optional API providers to tell the
      module loader not to unload except at shutdown.
      
      ASTERISK-27389
      
      Change-Id: Ia07786fe655681aec49cc8d3d96e06483b11f5e6
      79f111e1
  5. Feb 10, 2017
    • Sean Bright's avatar
      manager: Restore Originate failure behavior from Asterisk 11 · 09107730
      Sean Bright authored
      In Asterisk 11, if the 'Originate' AMI command failed to connect the provided
      Channel while in extension mode, a 'failed' extension would be looked up and
      run. This was, I believe, unintentionally removed in 51b6c496. This patch
      restores that behavior.
      
      This also adds an enum for the various 'synchronous' modes in an attempt to
      make them meaningful.
      
      ASTERISK-26115 #close
      Reported by: Nasir Iqbal
      
      Change-Id: I8afbd06725e99610e02adb529137d4800c05345d
      09107730
  6. 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
  7. May 14, 2015
    • Corey Farrell's avatar
      Fix potential crash after unload of func_periodic_hook or test_message. · 0a46d43b
      Corey Farrell authored
      These modules save a pointer to the context they create on load, and
      use that pointer to destroy the context at unload.  It is not safe
      to save this pointer, it is replaced during load of pbx_config,
      pbx_lua or pbx_ael.
      
      This change causes the modules to pass NULL to ast_context_destroy,
      a safer way to perform the unregistration since it does not use
      a pointer that could become invalid.
      
      ASTERISK-25085 #close
      Reported by: Corey Farrell
      
      Change-Id: I6a00ec8e38046058f97dc703e1adcde9bf517835
      0a46d43b
  8. May 13, 2015
  9. 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
  10. Jul 25, 2014
  11. Apr 23, 2014
  12. Apr 15, 2014
  13. Apr 12, 2014
  14. Apr 08, 2014
  15. Apr 05, 2014
    • Russell Bryant's avatar
      func_periodic_hook: New function for periodic hooks. · ea290b2c
      Russell Bryant authored
      This commit introduces a new dialplan function, PERIODIC_HOOK().
      It allows you run to a dialplan hook on a channel periodically.  The
      original use case that inspired this was the ability to play a beep
      periodically into a call being recorded.  The implementation is much
      more generic though and could be used for many other things.
      
      The implementation makes heavy use of existing Asterisk components.
      It uses a combination of Local channels and ChanSpy() to run some
      custom dialplan and inject any audio it generates into an active call.
      
      The other important bit of the implementation is how it figures out
      when to trigger the beep playback.  This implementation uses the
      audiohook API, even though it's not actually touching the audio in any
      way.  It's a convenient way to get a callback and check if it's time
      to kick off another beep.  It would be nice if this was timer event
      based instead of polling based, but unfortunately I don't see a way to
      do it that won't interfere with other things.
      
      Review: https://reviewboard.asterisk.org/r/3362/
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@411768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      ea290b2c
Loading