summaryrefslogtreecommitdiff
path: root/apps/app_voicemail.c
AgeCommit message (Collapse)Author
2018-03-20Merge "BuildSystem: Remove unused dependency on libltdl."Joshua Colp
2018-03-17BuildSystem: Remove unused dependency on libltdl.Alexander Traud
Asterisk does not need the development package of libltdl, because it does not use any symbol of -lltdl directly. Instead, it uses the runtime package via the shared library -lodbc. On the supported platforms, that shared library declares its dependency on -lltdl correctly, otherwise AST_EXT_LIB_CHECK would have failed. ASTERISK-27745 Change-Id: Icd315809b8e7978203431f3afb66240dd3a040ba
2018-03-16app_voicemail: Fix json blob errorsGeorge Joseph
When app_voicemail calls ast_test_suite_notify with the results of a user keypress, it formats the keypress as '%c'. If the user hung up or some other error occurrs, the result of the keypress is a non printable character. This ultimately causes json_vpack_ex to think it's being passed a non utf-8 string and return an error. * Keypress results passed to ast_test_suite_notify are now checked with isprint() and a '?' is substituted if the check fails. Change-Id: I78ee188916bbac840f3d03f40201b692347ea865
2018-03-12Merge "Replace direct checks of option_debug with DEBUG_ATLEAST macro."Jenkins2
2018-03-07Replace direct checks of option_debug with DEBUG_ATLEAST macro.Corey Farrell
Checking option_debug directly is incorrect as it ignores file/module specific debug settings. This system-wide change replaces nearly all direct checks for option_debug with the DEBUG_ATLEAST macro. Change-Id: Ic342d4799a945dbc40ac085ac142681094a4ebf0
2018-03-07voicemail: Fixed wrong voicemail message countSungtae Kim
Fixed wrong voicemail mailbox reference for Action: VoicemailUsersList. ASTERISK-27703 Change-Id: Ie6578ad80bba2bfaf34b84f0be978f59045ce6cd
2018-01-29app_voicemail: Avoid always true when using pointer address.Alexander Traud
clang 4.0 warned about this. ASTERISK-27635 Change-Id: I213f230607d7fbe97c0f5f2d60da9cbf5a2d8231
2018-01-15loader: Add dependency fields to module structures.Corey Farrell
* Declare 'requires' and 'enhances' text fields on module info structure. * Rename 'nonoptreq' to 'optional_modules'. * Update doxygen comments. Still need to investigate dependencies among modules I cannot compile. Change-Id: I3ad9547a0a6442409ff4e352a6d897bef2cc04bf
2017-12-22Remove as much trailing whitespace as possible.Sean Bright
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
2017-12-22Merge "app_voicemail: Fix file copy error handling."Jenkins2
2017-12-20app_voicemail: Fix file copy error handling.Corey Farrell
Fix error where input/output file descriptors would be closed multiple times. Change-Id: Iba5140b60cb7de79e3d5d92be3c256947aa99da9
2017-12-20Fix Common Typo's.Corey Farrell
Fix instances of: * Retreive * Recieve * other then * different then * Repeated words ("the the", "an an", "and and", etc). * othterwise, teh ASTERISK-24198 #close Change-Id: I3809a9c113b92fd9d0d9f9bac98e9c66dc8b2d31
2017-12-18app_voicemail: Fix memory management issues.Corey Farrell
* 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
2017-12-13Add new AMI action for app_voicemailpchero
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
2017-12-04Add new object for VoicemailUserEntrySungtae Kim
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
2017-10-26app_voicemail.c: Fix compiler warning with IMAP build.Richard Mudgett
ASTERISK-27181 Change-Id: Ic4468b49860bd7f67e922baf4c9e96828c184d17
2017-08-25voicemail: Fix various abuses of mkstempSean Bright
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
2017-08-24app_voicemail: Honor escape digits in "greeting only" modeSean Bright
ASTERISK-21241 #close Reported by: Eelco Brolman Patches: Patch uploaded by Eelco Brolman (License 6442) Change-Id: Icbe39b5c82a49b46cf1d168dc17766f3d84f54fe
2017-08-01Fix compiler warnings on Fedora 26 / GCC 7.Corey Farrell
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
2017-07-21app_voicemail.c: Allow mailbox entry on authentication retry prompt.Richard Mudgett
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
2017-07-07Merge "app_voicemail: Cleanup ODBC connection handling"Joshua Colp
2017-07-05core: Remove 'Data Retrieval API'Sean Bright
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
2017-07-01app_voicemail: Cleanup ODBC connection handlingSean Bright
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
2017-06-22app_voicemail: IMAP connection controlAlexei Gradinari
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
2017-06-16app_voicemail: IMAP logout on reload/unloadAlexei Gradinari
Closing IMAP connection on module reload or unload. ASTERISK-24052 #close Change-Id: I2a40182aa9ef249fa6865d33570430e9ada68525
2017-06-15Merge "app_voicemail.c: Fix compile error when IMAP enabled."George Joseph
2017-06-14app_voicemail.c: Fix compile error when IMAP enabled.Richard Mudgett
Change-Id: I2703f15b4099b4210c68eccf293105d1975c1fc1
2017-06-14app_voicemail: IMAP logout on MWI unsubscribeAlexei Gradinari
Closing IMAP connection on MWI unsubscribe. ASTERISK-24052 #close Change-Id: I4ff964026002b2817b48c20fb4239f0a880228fd
2017-04-25cleanup: Fix fread() and fwrite() error handlingSean Bright
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
2017-04-12modules: change module LOAD_FAILUREs to LOAD_DECLINESGeorge Joseph
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
2017-03-08app_voicemail: Cannot set fromstring on a per-mailbox basisDaniel Journo
* apps/app_voicemail.c fromstring field added to mailbox which will override the global fromstring if set. ASTERISK-24562 #close Change-Id: I5e90e3a1ec2b2d5340b49a0db825e4bbb158b2fe
2017-02-20app_voicemail: vm_authenticate accesses uninitialized memorySean Bright
vm_authenticate doesn't always set the passed ast_vm_user argument, so we initialize to 0 before passing it in. ASTERISK-25893 #close Reported by: Filip Jenicek Change-Id: Ia3cc0128f93d352ed9add8d5c2f0f7232c2cbe4a
2017-02-14Merge "app_voicemail: Allow 'Comedian Mail' branding to be overriden"zuul
2017-02-14Merge "app_voicemail: VoiceMailPlayMsg did not play database stored messages"zuul
2017-02-14app_voicemail: Allow 'Comedian Mail' branding to be overridenSean Bright
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
2017-02-14app_voicemail: VoiceMailPlayMsg did not play database stored messagesrrittgarn
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
2017-02-13cli: Fix various CLI documentation and completion issuesSean Bright
* 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
2017-01-22tests: use datadir for sound filesTzafrir Cohen
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
2016-10-27Merge "Remove ASTERISK_REGISTER_FILE."zuul
2016-10-27Remove ASTERISK_REGISTER_FILE.Corey Farrell
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
2016-10-26app_voicemail: Clear voice mailbox in MailboxExists and MAILBOX_EXISTS.Joshua Colp
When executing the MailboxExists dialplan application and MAILBOX_EXISTS dialplan function the passed in temporary voice mailbox was not cleared, causing it to try to free garbage. ASTERISK-26503 #close Change-Id: Ie21ccfa1b80b9c59318e596f6b8e17da2b5a7cb3
2016-08-05app_voicemail: Add taskprocessor alert level options.Alexei Gradinari
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
2016-07-18Unit tests: Use AST_TEST_DEFINE in conditional code only.Corey Farrell
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
2016-06-20app_voicemail.c: Fix IMAP compile error.Richard Mudgett
Fix compile error introduced by the patch for ASTERISK-26045 Change-Id: I5b02876266f2824f4cec2b54d6ff4db5de5778d3
2016-06-07apps/app_voicemail.c and main/say.c: Add support for Icelandic languageÖrn Arnarson
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
2016-05-26app_voicemail: fix bugs, imap mm_status log change to debugAlexei Gradinari
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
2016-05-03app_voicemail: always copy dynamic struct to avoid race conditionAndrew Nagy
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
2016-04-15Merge "app_voicemail/IMAP: function 'save_to_folder' creates wrong folder"Joshua Colp
2016-04-12app_voicemail: Fix test_voicemail_notify_endl test.Joshua Colp
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
2016-04-11app_voicemail/IMAP: function 'save_to_folder' creates wrong folderAlexei Gradinari
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