Skip to content
Snippets Groups Projects
  1. Dec 19, 2017
    • Corey Farrell's avatar
      app_voicemail: Fix memory management issues. · dc04d1ec
      Corey Farrell authored
      * mwi_sub_event_cb: mwist leaked on separate_mailbox failure.
      * add_email_attachment: A reference to sox_gain_tmpdir was used
        after the storage was out of scope.
      
      Change-Id: I6282c542ff7b82fa091177a912d11234a8b00a30
      dc04d1ec
  2. Dec 18, 2017
  3. Dec 15, 2017
    • Corey Farrell's avatar
      aco: Minimize use of regex. · bf2d3593
      Corey Farrell authored
      Remove nearly all use of regex from ACO users.  Still remaining:
      * app_confbridge has a legitamate use of option name regex.
      * ast_sorcery_object_fields_register is implemented with regex, all
        callers use simple prefix based regex.  I haven't decided the best
        way to fix this in both 13/15 and master.
      
      Change-Id: Ib5ed478218d8a661ace4d2eaaea98b59a897974b
      bf2d3593
  4. Dec 13, 2017
    • pchero's avatar
      Add new AMI action for app_voicemail · daa3a300
      pchero authored
      Currently, to figure out specified voicemail's status, there's only one
      way to do it, which is use a VoicemailUserEntry AMI message.
      But it consumed it too much resource(it check everything).
      So, added new AMI action.
      
      ASTERISK-27470
      
      Change-Id: Ie4eba1424a142e5fbd1d9fb1821a3fc1a1e238b7
      daa3a300
  5. Dec 12, 2017
    • Ivan Poddubny's avatar
      app_queue: Fix extension state subscriptions removed on dialplan reload · c7f94e57
      Ivan Poddubny authored
      The approach with having a single global subscription to all extension
      state changes has one issue: dynamically created hints don't have any
      watchers and are therefore garbage collected on the first dialplan
      reload.
      
      This change creates a state subscription for every queue member with a
      hint as state_interface, thus increasing the count of watches for
      hints, so they are not destroyed prematurely anymore.
      
      There are 2 side effects:
      1. The state change callback in app_queue is not executed when
         there are no members referring to the extension.
      2. The callback is called multiple times for the same hint if it's
         associated with more than one queue member.
      
      Reported by: Steven T. Wheeler
      
      ASTERISK-18411 #close
      
      Change-Id: I4956af2136ea2a7f110ac9272eae5f6e676d8f89
      c7f94e57
  6. Dec 08, 2017
    • Sean Bright's avatar
      utils: Add convenience function for setting fd flags · 2ffe52a1
      Sean Bright authored
      There are many places in the code base where we ignore the return value
      of fcntl() when getting/setting file descriptior flags. This patch
      introduces a convenience function that allows setting or clearing file
      descriptor flags and will also log an error on failure for later
      analysis.
      
      Change-Id: I8b81901e1b1bd537ca632567cdb408931c6eded7
      2ffe52a1
  7. Dec 04, 2017
    • Sungtae Kim's avatar
      Add new object for VoicemailUserEntry · 0611fe58
      Sungtae Kim authored
      Currently, when the app_voicemail sending VoicemailUserEntry AMI event, there's
      no OldMessageCount info for default.
      To check the OldMessageCount info, it required IMAP_STORAGE define, but this is
      not correct.
      Added OldMessageCount item as a default.
      
      ASTERISK-27456
      
      Change-Id: I5c71521c2d1daf8b7b161e31c34d28cca6aea4c7
      0611fe58
  8. Nov 20, 2017
  9. Nov 19, 2017
  10. 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
  11. Nov 06, 2017
    • Richard Mudgett's avatar
      Fix ast_(v)asprintf() malloc failure usage conditions. · ee08f10d
      Richard Mudgett authored
      When (v)asprintf() fails, the state of the allocated buffer is undefined.
      The library had better not leave an allocated buffer as a result or no one
      will know to free it.  The most likely way it can return failure is for an
      allocation failure.  If the printf conversion fails then you actually have
      a threading problem which is much worse because another thread modified
      the parameter values.
      
      * Made __ast_asprintf()/__ast_vasprintf() set the returned buffer to NULL
      on failure.  That is much more useful than either an uninitialized pointer
      or a pointer that has already been freed.  Many uses won't have to check
      for failure to ensure that the buffer won't be double freed or prevent an
      attempt to free an uninitialized pointer.
      
      * stasis.c: Fixed memory leak in multi_object_blob_to_ami() allocated by
      ast_asprintf().
      
      * ari/resource_bridges.c:ari_bridges_play_helper(): Remove assignment to
      the wrong thing which is now not needed even if assigning to the right
      thing.
      
      Change-Id: Ib5252fb8850ecf0f78ed0ee2ca0796bda7e91c23
      ee08f10d
  12. Nov 02, 2017
  13. Oct 30, 2017
    • Corey Farrell's avatar
      Modules: Fix issues with CLI completion. · e82b921c
      Corey Farrell authored
      * Stop using ast_module_helper to check if a module is loaded, use
        ast_module_check instead (app_confbridge and app_meetme).
      * Stop ast_module_helper from listing reload classes when needsreload
        was not requested.
      
      ASTERISK-27378
      
      Change-Id: Iaed8c1e4fcbeb242921dbac7929a0fe75ff4b239
      e82b921c
  14. Oct 29, 2017
  15. Oct 26, 2017
  16. Oct 23, 2017
  17. Oct 18, 2017
    • Corey Farrell's avatar
      app_macro deprecation. · 955a891a
      Corey Farrell authored
      * Mark the module deprecated.
      * Disable the module by default.
      * Produce a warning the first time a macro is used.
      * Note deprecation related options in app_dial and app_queue.
      
      ASTERISK-27350
      
      Change-Id: I560ea043bacdbc5534a17d97854273d52c2f1bdc
      955a891a
  18. Oct 11, 2017
  19. Oct 10, 2017
    • Sean Bright's avatar
      app_originate: Set ORIGINATE_STATUS correctly on failure · 3ad7d2f3
      Sean Bright authored
      We were ignoring the return value from ast_pbx_outgoing_exten() and
      ast_pbx_outgoing_app() which could fail before setting the reason code.
      This resulted in failures being reported as success.
      
      ASTERISK-25266 #close
      Reported by: Allen Ford
      
      Change-Id: Idf16237b7e41b527d2c69c865829128686beeb3b
      3ad7d2f3
  20. Sep 28, 2017
    • Richard Mudgett's avatar
      app_queue.c: Fix announcements when announce-to-first-user not enabled. · b2dbfe23
      Richard Mudgett authored
      The previous patch for ASTERISK-27216 made it so you wouldn't get any
      position or periodic announcements unless you had announce-to-first-user
      enabled.  The announce-to-first-user feature was added by ASTERISK_21782
      as a result of the patch which introduced the redundant announcements that
      ASTERISK-27216 removes.
      
      * By noting that the makeannouncement variable is used to suppresses the
      first user announcement, we set its initial value to the
      announce-to-first-user enable setting.
      
      ASTERISK-27216
      
      Change-Id: Ieaeb7dbea8ae7073086b775fbafe0625b000b10a
      b2dbfe23
  21. Sep 25, 2017
    • George Joseph's avatar
      build: A few gcc 7 error fixes · 4275ca16
      George Joseph authored
      Change-Id: I7b5300fbf1af7d88d47129db13ad6dbdc9b553ec
      4275ca16
    • StefanEng86's avatar
      app_queue: Only do announcement logic between ringing cycles · c3c73b35
      StefanEng86 authored
      This patch reverts the change by patch 2263 from old reviewboard.
      Note that reverting that 2263-patch still preserves the behaviour that
      the commit log of the 2263-patch claimed to add. The reason for this is:
      
      The function wait_for_answer is only called from try_calling which
      in turn is only called from the main for loop in queue_exec, and
      earlier in that loop we already check the things that's removed by
      this patch. There's no need to check those things twice each loop
      iteration, and I think the proper place to check it is before each
      ringing cycle. By checking it in wait_for_answer, you allow the issue
      explained in the jira - that the head caller hears announcements while
      the agents' sip phones are actively ringing.
      
      Reported-by: Stefan Engström
      Tested-by: Stefan Engström
      ASTERISK-27216 #close
      
      Change-Id: Ic4290dc75256f9743900c6762ee1bb915f672db0
      c3c73b35
  22. Sep 23, 2017
    • Sean Bright's avatar
      app_stream_echo: Don't echo declined streams · 0fad11f2
      Sean Bright authored
      Discovered while experimenting with Cyber Mega Phone 2K Ultimate Dynamic
      Edition after accepting the audio request but declining the video one.
      
      Change-Id: Iaa86d41fccfbc1b559a30ccf740d78a3b5f8a98c
      0fad11f2
  23. Sep 19, 2017
    • Joshua Colp's avatar
      app_confbridge: Only create a channel that records audio. · 6fd3db51
      Joshua Colp authored
      This change makes it so that the conference recorder channel
      that is created only contains audio formats and an audio stream.
      This is because the underlying application used by ConfBridge to
      record, MixMonitor, only allows recording audio.
      
      Having additional streams (and in particular a video stream) can
      result in clients needlessly renegotiating to add a video stream
      that will never receive video.
      
      Change-Id: I89d38aedc9205eca7741d5435e73e73bb9de97a0
      6fd3db51
  24. Sep 06, 2017
    • Sean Bright's avatar
      app_waitforsilence: Cleanup & don't treat missing frames as 'noise' · 2b3f903e
      Sean Bright authored
      * WaitForSilence completes successfully if it receives no media in the
        specified timeout, but when acting as WaitForNoise that logic needs
        to be reversed.
      
      * Use standard argument parsing macros and add some error checking for
        invalid values.
      
      * The documentation indicated that the first argument to both
        WaitForSilence and WaitForNoise was required when it was not. Update
        the documentation to reflect that.
      
      * Wrap up some behavior in structs to avoid boolean checks all over the
        place.
      
      ASTERISK-24066 #close
      Reported by: M vd S
      
      Change-Id: I01d40adc5b63342bb5018a1bea2081a0aa191ef9
      2b3f903e
  25. Sep 01, 2017
  26. Aug 30, 2017
    • Corey Farrell's avatar
      AST-2017-006: Fix app_minivm application MinivmNotify command injection · 1bf3dfff
      Corey Farrell authored
      An admin can configure app_minivm with an externnotify program to be run
      when a voicemail is received.  The app_minivm application MinivmNotify
      uses ast_safe_system() for this purpose which is vulnerable to command
      injection since the Caller-ID name and number values given to externnotify
      can come from an external untrusted source.
      
      * Add ast_safe_execvp() function.  This gives modules the ability to run
      external commands with greater safety compared to ast_safe_system().
      Specifically when some parameters are filled by untrusted sources the new
      function does not allow malicious input to break argument encoding.  This
      may be of particular concern where CALLERID(name) or CALLERID(num) may be
      used as a parameter to a script run by ast_safe_system() which could
      potentially allow arbitrary command execution.
      
      * Changed app_minivm.c:run_externnotify() to use the new ast_safe_execvp()
      instead of ast_safe_system() to avoid command injection.
      
      * Document code injection potential from untrusted data sources for other
      shell commands that are under user control.
      
      ASTERISK-27103
      
      Change-Id: I7552472247a84cde24e1358aaf64af160107aef1
      1bf3dfff
  27. Aug 29, 2017
  28. Aug 25, 2017
    • Sean Bright's avatar
      voicemail: Fix various abuses of mkstemp · da13cdb9
      Sean Bright authored
      mkstemp() returns a unique filename, but appending an extension to that
      filename does not guarantee uniqueness. Instead, use mkdtemp() and we
      can put whatever extension we want on the files that we create inside
      the directory.
      
      In the case of app_minivm, we also now properly clean up any temporary
      files that we create.
      
      ASTERISK-20858 #close
      Reported by: Walter Doekes
      
      Change-Id: I30ad04f0e115f0b11693ff678ba5184d8b938e43
      da13cdb9
    • 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
  29. Aug 24, 2017
  30. Aug 22, 2017
  31. Aug 02, 2017
  32. Aug 01, 2017
    • Corey Farrell's avatar
      Fix compiler warnings on Fedora 26 / GCC 7. · 58d03211
      Corey Farrell authored
      GCC 7 has added capability to produce warnings, this fixes most of those
      warnings.  The specific warnings are disabled in a few places:
      
      * app_voicemail.c: truncation of paths more than 4096 chars in many places.
      * chan_mgcp.c: callid truncated to 80 chars.
      * cdr.c: two userfields are combined to cdr copy, fix would break ABI.
      * tcptls.c: ignore use of deprecated method SSLv3_client_method().
      
      ASTERISK-27156 #close
      
      Change-Id: I65f280e7d3cfad279d16f41823a4d6fddcbc4c88
      58d03211
    • Sean Bright's avatar
      app_queue: Add announce-position-only-up option · 3f984882
      Sean Bright authored
      Setting this option will cause the Queue application to only announce
      the caller's position if it has improved since the last time that we
      announced it.
      
      Change-Id: I173a124121422209485b043e2bf784f54242fce6
      3f984882
Loading