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 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
  3. 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
  4. Oct 26, 2017
  5. 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
  6. Aug 24, 2017
  7. 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
  8. Jul 21, 2017
    • Richard Mudgett's avatar
      app_voicemail.c: Allow mailbox entry on authentication retry prompt. · 92293075
      Richard Mudgett authored
      The following testsuite voicemail tests were failing to re-enter the
      mailbox after the first login attempt.
      
      tests/apps/voicemail/authenticate_invalid_mailbox
      tests/apps/voicemail/authenticate_invalid_password
      
      The tests were noting the start of the vm-incorrect-mailbox prompt and
      immediately sending the mailbox for the next login attempt.  Since the
      invalid message playback had to complete before the digits were
      recognized, the test passed for the wrong reason and added approximately
      20 seconds to the test times.
      
      * Allow the vm-incorrect-mailbox prompt to get interrupted by the mailbox
      digits like the initial vm-login prompt so the tests are able to enter the
      intended mailbox.
      
      Change-Id: I1dc53fe917bfe03a4587b2c4cd24c94696a69df8
      92293075
  9. Jul 05, 2017
    • Sean Bright's avatar
      core: Remove 'Data Retrieval API' · 325eeced
      Sean Bright authored
      This API was not actively maintained, was not added to new modules
      (such as res_pjsip), and there exist better alternatives to acquire the
      same information, such as the ARI.
      
      Change-Id: I4b2185a83aeb74798b4ad43ff8f89f971096aa83
      325eeced
  10. Jul 01, 2017
    • Sean Bright's avatar
      app_voicemail: Cleanup ODBC connection handling · 950b39a4
      Sean Bright authored
      The primary focus of this patch is adding a missing call to
      ast_odbc_release_obj(), but is also a general cleanup of the ODBC
      related code in app_voicemail.
      
      ASTERISK-27093 #close
      
      Change-Id: I8e285142eaeb3146b4287a928276b70db76c902b
      950b39a4
  11. Jun 22, 2017
    • Alexei Gradinari's avatar
      app_voicemail: IMAP connection control · 0cef7b9d
      Alexei Gradinari authored
      A new global option "imap_poll_logout" was added to specify whether need to
      disconnect from the IMAP server after polling of mailboxes.
      
      ASTERISK-27068 #close
      
      Closing IMAP connection after loading mailbox from voicemail.conf
      
      ASTERISK-24052 #close
      
      Change-Id: Ib7558ba04516240a32b65f42e9be64372a0ae12a
      0cef7b9d
  12. Jun 16, 2017
  13. Jun 14, 2017
  14. Apr 25, 2017
    • Sean Bright's avatar
      cleanup: Fix fread() and fwrite() error handling · f5b67871
      Sean Bright authored
      Cleaned up some of the incorrect uses of fread() and fwrite(), mostly in
      the format modules. Neither of these functions will ever return a value
      less than 0, which we were checking for in some cases.
      
      I've introduced a fair amount of duplication in the format modules, but
      I plan to change how format modules work internally in a subsequent
      patch set, so this is simply a stop-gap.
      
      Change-Id: I8ca1cd47c20b2c0b72088bd13b9046f6977aa872
      f5b67871
  15. Apr 12, 2017
    • George Joseph's avatar
      modules: change module LOAD_FAILUREs to LOAD_DECLINES · 747beb1e
      George Joseph authored
      In all non-pbx modules, AST_MODULE_LOAD_FAILURE has been changed
      to AST_MODULE_LOAD_DECLINE.  This prevents asterisk from exiting
      if a module can't be loaded.  If the user wishes to retain the
      FAILURE behavior for a specific module, they can use the "require"
      or "preload-require" keyword in modules.conf.
      
      A new API was added to logger: ast_is_logger_initialized().  This
      allows asterisk.c/check_init() to print to the error log once the
      logger subsystem is ready instead of just to stdout.  If something
      does fail before the logger is initialized, we now print to stderr
      instead of stdout.
      
      Change-Id: I5f4b50623d9b5a6cb7c5624a8c5c1274c13b2b25
      747beb1e
  16. Mar 08, 2017
  17. Feb 20, 2017
  18. Feb 14, 2017
    • Sean Bright's avatar
      app_voicemail: Allow 'Comedian Mail' branding to be overriden · 275f469a
      Sean Bright authored
      Original patch by John Covert, slight modifications by me.
      
      ASTERISK-17428 #close
      Reported by: John Covert
      Patches:
      	app_voicemail.c.patch (license #5512) patch uploaded by
              John Covert
      
      Change-Id: Ic3361b0782e5a5397a19ab18eb8550923a9bd6a6
      275f469a
    • rrittgarn's avatar
      app_voicemail: VoiceMailPlayMsg did not play database stored messages · 2b245b12
      rrittgarn authored
      When attempting to use VoiceMailPlayMsg with a realtime data backend
      the message is located, but never retrieved. This patch adds the
      required RETRIEVE and DISPOSE calls that will fetch the message from
      the database (and IMAP storage as well for that matter).
      
      Also, removed extraneous make_file call.
      
      ASTERISK-26723 #close
      
      Change-Id: I1e122dd53c0f3d7faa10f3c2b7e7e76a47d51b8c
      2b245b12
  19. Feb 13, 2017
    • Sean Bright's avatar
      cli: Fix various CLI documentation and completion issues · 3f943737
      Sean Bright authored
      * app_minivm: Use built-in completion facilities to complete optional
      arguments.
      
      * app_voicemail: Use built-in completion facilities to complete
      optional arguments.
      
      * app_confbridge: Add missing colons after 'Usage' text.
      
      * chan_alsa: Use built-in completion facilities to complete optional
      arguments.
      
      * chan_sip: Use built-in completion facilities to complete optional
      arguments. Add completions for 'load' for 'sip show user', 'sip show
      peer', and 'sip qualify peer.'
      
      * chan_skinny: Correct and extend completions for 'skinny reset' and
      'skinny show line.'
      
      * func_odbc: Correct completions for 'odbc read' and 'odbc write'
      
      * main/astmm: Use built-in completion facilities to complete arguments
      for 'memory' commands.
      
      * main/bridge: Correct completions for 'bridge kick.'
      
      * main/ccss: Use built-in completion facilities to complete arguments
      for 'cc cancel' command.
      
      * main/cli: Add 'all' completion for 'channel request hangup.' Correct
      completions for 'core set debug channel.' Correct completions for 'core
      show calls.'
      
      * main/pbx_app: Remove redundant completions for 'core show
      applications.'
      
      * main/pbx_hangup_handler: Remove unused completions for 'core show
      hanguphandlers all.'
      
      * res_sorcery_memory_cache: Add completion for 'reload' argument of
      'sorcery memory cache stale' and properly implement.
      
      Change-Id: Iee58c7392f6fec34ad9d596109117af87697bbca
      3f943737
  20. Jan 21, 2017
    • Tzafrir Cohen's avatar
      tests: use datadir for sound files · dbb9c814
      Tzafrir Cohen authored
      Some (voicemail-related) tests API symlinks beep.gsm and other files
      from ast_config_AST_VAR_DIR. It should use ast_config_AST_DATA_DIR.
      
      ASTERISK-26740 #close
      
      Change-Id: Id49c56fb9e16df64b1a2b829693ca7601252df89
      dbb9c814
  21. 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
  22. Oct 26, 2016
  23. Aug 05, 2016
    • Alexei Gradinari's avatar
      app_voicemail: Add taskprocessor alert level options. · 9042ad40
      Alexei Gradinari authored
      On heavy loaded system with IMAP or DB storage,
      'app_voicemail' taskprocessor queue could reach 500 scheduled tasks.
      It could happen when the IMAP or DB server dies or is unreachable.
      It could happen on startup when there are many (thousands)
      realtime endpoints configured with unsolicited mwi.
      If the taskprocessor queue reaches the high water level
      then the alert is triggered and pjsip stops processing new requests
      until the queue reaches the low water level to clear the alert.
      
      This patch adds 2 new 'general' configuration options
      to tune taskprocessor alert levels:
      'tps_queue_high' - Taskprocessor high water alert trigger level.
      'tps_queue_low' - Taskprocessor low water clear alert level
      
      ASTERISK-26229 #close
      
      Change-Id: I766294fbffedf64053c0d9ac0bedd3109f043ee8
      9042ad40
  24. Jul 18, 2016
    • Corey Farrell's avatar
      Unit tests: Use AST_TEST_DEFINE in conditional code only. · cf1188a1
      Corey Farrell authored
      If AST_TEST_DEFINE is not conditional to TEST_FRAMEWORK it produces dead
      code.  This places all existing unit tests into a conditional block if
      they weren't already.
      
      ASTERISK-26211 #close
      
      Change-Id: I8ef83ee11cbc991b07b7a37ecb41433e8c734686
      cf1188a1
  25. Jun 20, 2016
  26. Jun 07, 2016
    • Örn Arnarson's avatar
      apps/app_voicemail.c and main/say.c: Add support for Icelandic language · 60caebc7
      Örn Arnarson authored
      Icelandic has some weird grammar rules when dealing with dates and
      numbers. There are different genders used depending on which number
      you're dealing with, and only a handful of numbers do change depending
      on the gender. There is also an implied gender in several cases.
      
      This patch was originally written for asterisk 1.6, and has been in use
      for several years without crashes. I cleaned it up a bit and rewrote
      what was necessary for Asterisk 13.
      
      The functions were copied from other similar languages and modified
      where appropriate. If i recall correctly, the German and Danish
      functions were used as a base.
      
      ASTERISK-26087
      Reported by: Örn Arnarson
      Tested by: Örn Arnarson
      
      Change-Id: Ib7d8bd7b0fede5767921ed821315b5b508c0e665
      60caebc7
  27. May 26, 2016
    • Alexei Gradinari's avatar
      app_voicemail: fix bugs, imap mm_status log change to debug · b3142e99
      Alexei Gradinari authored
      Fixed some bugs:
      - create dirpath when save downloading message from IMAP storage.
      - create IMAP folder if not exists when saving to IMAP storage
      - check if file successfully opened before write to it
      - some IMAP checks
      - remove non-standard flag 'Unseen'
      etc
      
      Change to debug IMAP mm_status log instead of verbose.
      
      Remove unused X-Asterisk-VM-Caller-channel message header
      for security reason. The clients should not know name of peer/endpoint.
      
      ASTERISK-26045 #close
      
      Change-Id: I7f83d88b69b36934e2539c114b9fb612deed971b
      b3142e99
  28. May 03, 2016
    • Andrew Nagy's avatar
      app_voicemail: always copy dynamic struct to avoid race condition · 080c6216
      Andrew Nagy authored
      Voicemail email addresses can be corrupt or voicemail
      emails can end up being sent to the wrong email address if asterisk is
      reading voicemail.conf during a reload and processing an email at the
      same time. This patch always copies the struct that would otherwise only
      be copied once.
      
      ASTERISK-24463 #close
      Reported by: John Campbell
      Tested by: Etienne Lessard
      Tested by: Andrew Nagy
      Change-Id: I3a0643813116da84e2617291903d0d489b7425fb
      080c6216
  29. Apr 12, 2016
    • Joshua Colp's avatar
      app_voicemail: Fix test_voicemail_notify_endl test. · 5a0534dc
      Joshua Colp authored
      The test_voicemail_notify_endl test checks the end-of-line
      characters of an email message to confirm that they are consistent.
      The test wrongfully assumed that reading from the email message
      into a buffer will always result in more than 1 character being
      read. This is incorrect. If only 1 character was read the test
      would go outside of the buffer and access other memory causing
      a crash.
      
      The test now checks to ensure that 2 or more characters are read
      in ensuring the test stays within the buffer.
      
      ASTERISK-25874 #close
      
      Change-Id: Ic2c89cea6e90f2c0bc2d8138306ebbffd4f8b710
      5a0534dc
    • Alexei Gradinari's avatar
      app_voicemail/IMAP: function 'save_to_folder' creates wrong folder · c00c298a
      Alexei Gradinari authored
      If try to move message to Cust1 (number 5)
      the function 'save_to_folder' tries to create Greeting folder instead of Cust1.
      
      This patch fixed it by setting GREETINGS_FOLDER = -1
      
      ASTERISK-24927 #close
      
      Change-Id: I03d1a761894bcc2d130ec9b003bbcddc28e25c51
      c00c298a
  30. Apr 08, 2016
    • Alexei Gradinari's avatar
      app_voicemail/IMAP: IMAP access FATAL error: Out of memory · f9dab808
      Alexei Gradinari authored
      Sometimes uw-imap function 'mail_fetchbody' returns huge len
      which then pass to uw-imap function 'rfc822_base64'.
      uw-imap tries to allocate huge memory and abort() on fail.
      
      This patch check the len.
      If the len more than max size (128 Mbytes) log error.
      This patch also set variables len, newlen to avoid uninizialezed len.
      This patch also check pointer returned by rfc822_base64.
      
      ASTERISK-25899 #close
      
      Change-Id: I4a0e7d655f11abef6a5224e2169df6d5c1f1caca
      f9dab808
  31. Jan 04, 2016
    • George Joseph's avatar
      voicemail: Move app_voicemail / res_mwi_external conflict to runtime · 6d18fe15
      George Joseph authored
      The menuselect conflict between app_voicemail and res_mwi_external
      makes it hard to package 1 version of Asterisk.  There no actual
      build dependencies between the 2 so moving this check to runtime
      seems like a better solution.
      
      The ast_vm_register and ast_vm_greeter_register functions in app.c
      were modified to return AST_MODULE_LOAD_DECLINE instead of -1 if there
      is already a voicemail module registered. The modules' load_module
      functions were then modified to return DECLINE instead of -1 to the
      loader.  Since -1 is interpreted by the loader as AST_MODULE_LOAD_FAILURE,
      the modules were incorrectly causing Asterisk to stop so this needed
      to be cleaned up anyway.
      
      Now you can build both and use modules.conf to decide which voicemail
      implementation to load.
      
      The default menuselect options still build app_voicemail and not
      res_mwi_external but if both ARE built, res_mwi_external will load
      first and become the voicemail provider unless modules.conf rules
      prevent it.  This is noted in CHANGES.
      
      Change-Id: I7d98d4e8a3b87b8df9e51c2608f0da6ddfb89247
      6d18fe15
  32. May 13, 2015
  33. 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
  34. Mar 28, 2015
  35. 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
  36. Mar 05, 2015
Loading