Skip to content
Snippets Groups Projects
  1. Jan 09, 2020
    • Corey Farrell's avatar
      app_record: Do not hang up if beep audio is missing · 2f8b20b9
      Corey Farrell authored
      Additionally alter the warning to mention that it was "beep" which could
      not be streamed to give admins a better clue about what the warning
      means.
      
      ASTERISK-28682
      
      Change-Id: If5aed21226a173117ed17589f44826dd1ba6576e
      2f8b20b9
  2. Dec 22, 2017
  3. Nov 15, 2017
    • George Joseph's avatar
      app_record: Don't set RECORD_STATUS chan var until file is closed · f5127073
      George Joseph authored
      We've been calling pbx_builtin_setvar_helper to set the
      RECORD_STATUS variable before actually closing the recorded file.
      If a client is watching VarSet events and tries to do something with
      the file when a RECORD_STATUS event is seen, they might attempt to
      do so while the file it's still open.
      
      We now delay calling pbx_builtin_setvar_helper until after we close
      the file.
      
      ASTERISK-27423
      
      Change-Id: I7fe9de99953e46b4bafa2b38cf151fe8f6488254
      f5127073
  4. Aug 25, 2017
    • Sean Bright's avatar
      app_record: Resolve some absolute vs. relative filename bugs · 43670e47
      Sean Bright authored
      If the Record() application is called with a relative filename that
      includes directories, we were not properly creating the intermediate
      directories and Record() would fail.
      
      Secondarily, updated the documentation for RECORDED_FILE to mention
      that it does not include a filename extension.
      
      Finally, rewrote the '%d' functionality to be a bit more straight
      forward and less noisy.
      
      ASTERISK-16777 #close
      Reported by: klaus3000
      
      Change-Id: Ibc2640cba3a8c7f17d97b02f76b7608b1e7ffde2
      43670e47
  5. Feb 14, 2017
    • Sean Bright's avatar
      app_record: Add option to prevent silence from being truncated · 662c9e69
      Sean Bright authored
      When using Record() with the silence detection feature, the stream is
      written out to the given file. However, if only 'silence' is detected,
      this file is then truncated to the first second of the recording.
      
      This patch adds the 'u' option to Record() to override that behavior.
      
      ASTERISK-18286 #close
      Reported by: var
      Patches:
      	app_record-1.8.7.1.diff (license #6184) patch uploaded by var
      
      Change-Id: Ia1cd163483235efe2db05e52f39054288553b957
      662c9e69
  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. Sep 21, 2015
  8. 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
  9. Dec 01, 2014
  10. Jul 20, 2014
  11. Dec 05, 2013
  12. Nov 07, 2012
    • Mark Michelson's avatar
      Multiple revisions 375993-375994 · f2bb9afe
      Mark Michelson authored
      ........
        r375993 | mmichelson | 2012-11-07 11:01:13 -0600 (Wed, 07 Nov 2012) | 30 lines
        
        Fix misuses of timeouts throughout the code.
        
        Prior to this change, a common method for determining if a timeout
        was reached was to call a function such as ast_waitfor_n() and inspect
        the out parameter that told how many milliseconds were left, then use
        that as the input to ast_waitfor_n() on the next go-around.
        
        The problem with this is that in some cases, submillisecond timeouts
        can occur, resulting in the out parameter not decreasing any. When this
        happens thousands of times, the result is that the timeout takes much
        longer than intended to be reached. As an example, I had a situation where
        a 3 second timeout took multiple days to finally end since most wakeups
        from ast_waitfor_n() were under a millisecond.
        
        This patch seeks to fix this pattern throughout the code. Now we log the
        time when an operation began and find the difference in wall clock time
        between now and when the event started. This means that sub-millisecond timeouts
        now cannot play havoc when trying to determine if something has timed out.
        
        Part of this fix also includes changing the function ast_waitfor() so that it
        is possible for it to return less than zero when a negative timeout is given
        to it. This makes it actually possible to detect errors in ast_waitfor() when
        there is no timeout.
        
        (closes issue ASTERISK-20414)
        reported by David M. Lee
        
        Review: https://reviewboard.asterisk.org/r/2135/
      ........
        r375994 | mmichelson | 2012-11-07 11:08:44 -0600 (Wed, 07 Nov 2012) | 3 lines
        
        Remove some debugging that accidentally made it in the last commit.
      ........
      
      Merged revisions 375993-375994 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      ........
      
      Merged revisions 375995 from http://svn.asterisk.org/svn/asterisk/branches/10
      ........
      
      Merged revisions 376014 from http://svn.asterisk.org/svn/asterisk/branches/11
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376015 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      f2bb9afe
  13. May 18, 2012
    • Matthew Jordan's avatar
      Fix a variety of memory leaks · 7b513206
      Matthew Jordan authored
      This patch addresses a number of memory leaks in a variety of modules that were
      found by a static analysis tool.  A brief summary of the changes:
      
      * app_minivm:       free ast_str objects on off nominal paths
      * app_page:         free the ast_dial object if the requested channel technology
                          cannot be appended to the dialing structure
      * app_queue:        if a penalty rule failed to match any existing rule list
                          names, the created rule would not be inserted and its memory
                          would be leaked
      * app_read:         dispose of the created silence detector in the presence of
                          off nominal circumstances
      * app_voicemail:    dispose of an allocated unique ID field for MWI event
                          un-subscribe requests in off nominal paths; dispose of
                          configuration objects when using the secret.conf option
      * chan_dahdi:       dispose of the allocated frame produced by ast_dsp_process
      * chan_iax2:        properly unref peer in CLI command "iax2 unregister"
      * chan_sip:         dispose of the allocated frame produced by sip_rtp_read's
                          call of ast_dsp_process; free memory in parse unit tests
      * func_dialgroup:   properly deref ao2 object grhead in nominal path of
                          dialgroup_read
      * func_odbc:        free resultset in off nominal paths of odbc_read
      * cli:              free match_list in off nominal paths of CLI match completion
      * config:           free comment_buffer/list_buffer when configuration file load
                          is unchanged; free the same buffers any time they were
                          created and config files were processed
      * data:             free XML nodes in various places
      * enum:             free context buffer in off nominal paths
      * features:         free ast_call_feature in off nominal paths of applicationmap
                          config processing
      * netsock2:         users of ast_sockaddr_resolve pass in an ast_sockaddr struct
                          that is allocated by the method.  Failures in
                          ast_sockaddr_resolve could result in the users of the method
                          not knowing whether or not the buffer was allocated.  The
                          method will now not allocate the ast_sockaddr struct if it
                          will return failure.
      * pbx:              cleanup hash table traversals in off nominal paths; free
                          ignore pattern buffer if it already exists for the specified
                          context
      * xmldoc:           cleanup various nodes when we no longer need them
      * main/editline:    various cleanup of pointers not being freed before being
                          assigned to other memory, cleanup along off nominal paths
      * menuselect/mxml:  cleanup of value buffer for an attribute when that attribute
                          did not specify a value
      * res_calendar*:    responses are allocated via the various *_request method
                          returns and should not be allocated in the various
                          write_event methods; ensure attendee buffer is freed if no
                          data exists in the parsed node; ensure that calendar objects
                          are de-ref'd appropriately
      * res_jabber:       free buffer in off nominal path
      * res_musiconhold:  close the DIR* object in off nominal paths
      * res_rtp_asterisk: if we run out of ports, close the rtp socket object and free
                          the rtp object
      * res_srtp:         if we fail to create the session in libsrtp, destroy the
                          temporary ast_srtp object
      
      (issue ASTERISK-19665)
      Reported by: Matt Jordan
      
      Review: https://reviewboard.asterisk.org/r/1922
      ........
      
      Merged revisions 366880 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      ........
      
      Merged revisions 366881 from http://svn.asterisk.org/svn/asterisk/branches/10
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      7b513206
  14. Feb 24, 2012
  15. Feb 20, 2012
  16. Jan 24, 2012
  17. Jan 09, 2012
    • Terry Wilson's avatar
      Replace direct access to channel name with accessor functions · 04da92c3
      Terry Wilson authored
      There are many benefits to making the ast_channel an opaque handle, from
      increasing maintainability to presenting ways to kill masquerades. This patch
      kicks things off by taking things a field at a time, renaming the field to
      '__do_not_use_${fieldname}' and then writing setters/getters and converting the
      existing code to using them. When all fields are done, we can move ast_channel
      to a C file from channel.h and lop off the '__do_not_use_'.
      
      This patch sets up main/channel_interal_api.c to be the only file that actually
      accesses the ast_channel's fields directly. The intent would be for any API
      functions in channel.c to use the accessor functions. No more monkeying around
      with channel internals. We should use our own APIs.
      
      The interesting changes in this patch are the addition of
      channel_internal_api.c, the moving of the AST_DATA stuff from channel.c to
      channel_internal_api.c (note: the AST_DATA stuff will have to be reworked to
      use accessor functions when ast_channel is really opaque), and some re-working
      of the way channel iterators/callbacks are handled so as to avoid creating fake
      ast_channels on the stack to pass in matching data by directly accessing fields
      (since "name" is a stringfield and the fake channel doesn't init the
      stringfields, you can't use the ast_channel_name_set() function). I went with
      ast_channel_name(chan) for a getter, and ast_channel_name_set(chan, name) for a
      setter.
      
      The majority of the grunt-work for this change was done by writing a semantic
      patch using Coccinelle ( http://coccinelle.lip6.fr/ ).
      
      Review: https://reviewboard.asterisk.org/r/1655/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      04da92c3
  18. Jul 14, 2011
  19. Feb 03, 2011
  20. Mar 10, 2010
    • Leif Madsen's avatar
      Be less ambiguous in Record() app docs. · 08fa8a6e
      Leif Madsen authored
      For some reason the documentation for the 'k' application in trunk
      and 1.6.2 is different than 1.6.0 and 1.6.1, so I'm setting them all
      to match. The wording in 1.6.2 and trunk was ambiguous, so you could
      interpret the wording the mean that recording would continue upon hangup
      indefinitely, or you could interpret it to mean that the recorded
      data would not be discarded upon hangup. This change makes it clear
      we mean the latter, and not the former.
      
      Came from a discussion in #asterisk on IRC.
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@251680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      08fa8a6e
  21. Dec 02, 2009
  22. Nov 04, 2009
  23. Aug 10, 2009
  24. May 21, 2009
    • Kevin P. Fleming's avatar
      Const-ify the world (or at least a good part of it) · e6b2e9a7
      Kevin P. Fleming authored
      This patch adds 'const' tags to a number of Asterisk APIs where they are appropriate (where the API already demanded that the function argument not be modified, but the compiler was not informed of that fact). The list includes:
      
      - CLI command handlers
      - CLI command handler arguments
      - AGI command handlers
      - AGI command handler arguments
      - Dialplan application handler arguments
      - Speech engine API function arguments
      
      In addition, various file-scope and function-scope constant arrays got 'const' and/or 'static' qualifiers where they were missing.
      
      Review: https://reviewboard.asterisk.org/r/251/
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      e6b2e9a7
  25. Feb 13, 2009
  26. Dec 19, 2008
  27. Dec 17, 2008
  28. Dec 16, 2008
  29. Nov 02, 2008
  30. Nov 01, 2008
  31. Aug 10, 2008
  32. Mar 05, 2008
  33. Nov 22, 2007
    • Luigi Rizzo's avatar
      shuffle a little bit the content of header files to reduce dependencies. · 51391e6b
      Luigi Rizzo authored
      In this commit:
      - move the ast_register/unregister_app functions to module.h
        to avoid the need to include pbx.h for the simpler apps;
      - move the ast_group structure to channel.h to remove the
        dependency of app.h on linkedlists.h
      
      Note, this is a long process that I am doing in small steps.
      
      The main difficulty is that now for each subsystem we
      have a single header (e.g. channel.h) included by the subsystem
      provider (usually one file, e.g. channel.c) and by its clients
      (dozens of them, e.g. we have some 70+ apps and 30+ functions).
      
      This requires the clients to include all the extra headers
      required by the provider (eg. lock.h, linkedlists.h, definitions
      of substructures...) even though many of the clients would be
      just happy with opaque struct declarations and function prototypes.
      
      The long term plan is to eventually rectify this structure
      so that the compilation can become faster, and also APIs
      are more stable.
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      51391e6b
    • Luigi Rizzo's avatar
      remove redundant headers · b1fe2d85
      Luigi Rizzo authored
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89518 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      b1fe2d85
  34. Nov 21, 2007
  35. Nov 19, 2007
  36. Nov 16, 2007
    • Luigi Rizzo's avatar
      Start untangling header inclusion in a way that does not affect · fdb7f7ba
      Luigi Rizzo authored
      build times - tested, there is no measureable difference before and
      after this commit.
      
      In this change:
      
      use asterisk/compat.h to include a small set of system headers:
      inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h,
      stdlib.h, alloca.h, stdio.h
      
      Where available, the inclusion is conditional on HAVE_FOO_H as determined
      by autoconf.
      
      Normally, source files should not include any of the above system headers,
      and instead use either "asterisk.h" or "asterisk/compat.h" which does it
      better. 
      
      For the time being I have left alone second-level directories
      (main/db1-ast, etc.).
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      fdb7f7ba
  37. Oct 29, 2007
  38. Jul 31, 2007
Loading