aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_voicemail.c
AgeCommit message (Collapse)AuthorFilesLines
2007-12-21Something I've been itching to do for a while now. A minor optimization in ↵mmichelson1-18/+4
app_voicemail. Since the dtable in base_encode always gets populated with the same values every time and never changes, make it static and const and only initialize it once. Also, there's no reason to define BASEMAXINLINE twice, so remove the redundant #define. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94593 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-21Lots of coding guidelines cleanup.mmichelson1-30/+28
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94545 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-21Merged revisions 94540 via svnmerge from mmichelson1-3/+32
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r94540 | mmichelson | 2007-12-21 14:11:34 -0600 (Fri, 21 Dec 2007) | 8 lines Better quota support for using IMAP storage voicemail (closes issue #11415, reported by jaroth) (closes issue #11152, reported by selsky) Patch provided by jaroth ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94542 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-21Merged revisions 94538 via svnmerge from mmichelson1-6/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r94538 | mmichelson | 2007-12-21 13:59:45 -0600 (Fri, 21 Dec 2007) | 5 lines The mail_copy c-client function does not expect a full imap mailbox string, just the name of the mailbox. (closes issue #11419, reported and patched by jaroth, with additional patchwork from me) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94539 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-20The changes to header inclusion in trunk broke compilation of app_voicemail ↵mmichelson1-11/+17
when using IMAP storage. The reason is that c-client has its own definitions for LOG_WARNING and LOG_DEBUG, so we need to be sure to include asterisk's definitions last so that we use the proper values in app_voicemail. (closes issue #11437, reported by blitzrage, patch suggested by blitzrage) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94345 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-19Add 'voicemail reload' command.tilghman1-0/+24
Reported by: eliel Patch by: eliel (Closes issue #11365) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94053 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-17Merged revisions 93291 via svnmerge from mmichelson1-2/+0
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r93291 | mmichelson | 2007-12-17 13:53:48 -0600 (Mon, 17 Dec 2007) | 6 lines We need to create the directory for a voicemail user even if they are using IMAP storage since greetings are stored in the filesystem. (closes issue #11388, reported by spditner, patch by me inspired by a patch by spditner) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93293 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-14Resolve a compiler warningmmichelson1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93115 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-14Change places where the name "INBOX" was hardcoded to use the imapfoldermmichelson1-2/+10
setting from voicemail.conf instead. This commit will help to get issue #11415 moving towards commitment. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93094 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-14Convert ast_verbose to ast_verb.tilghman1-15/+9
Reported by: snuffy Patch by: snuffy (Closes issue #11547) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92913 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-13Merged revisions 92807 via svnmerge from mmichelson1-0/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r92807 | mmichelson | 2007-12-13 14:03:20 -0600 (Thu, 13 Dec 2007) | 3 lines Prevent another potential fd leak ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92808 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-13Merged revisions 92803 via svnmerge from mmichelson1-3/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r92803 | mmichelson | 2007-12-13 13:49:55 -0600 (Thu, 13 Dec 2007) | 3 lines Prevent a possible fd leak. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92806 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-13Tag voicemails with UTC time as opposed to local time zonedbailey1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92737 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-10Add a few extra headers in the voicemail users listing inoej1-5/+31
manager 1.1. Update documentation too. (closes issue #11495) Reported by: caio1982 Patches: extra_vm_manager_info1.diff uploaded by caio1982 (license 22) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92140 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-06Handle allocation failure of the heard and deleted arrays of the vm_state.mmichelson1-2/+6
(closes issue #11408, reported and patched by jaroth) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91579 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-05Merged revisions 91292 via svnmerge from mmichelson1-0/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r91292 | mmichelson | 2007-12-05 16:57:13 -0600 (Wed, 05 Dec 2007) | 3 lines Reverting extra stuff I didn't mean to commit ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91293 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-05Merged revisions 91273 via svnmerge from mmichelson1-2/+0
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r91273 | mmichelson | 2007-12-05 16:35:52 -0600 (Wed, 05 Dec 2007) | 11 lines The 'G' option for Dial() did not properly handle the case where only a label was provided. This was due to the fact that the answering channel did not have an extension set, so ast_parseable_goto would fail. This fix eliminates the call to ast_parseable_goto on the answering channel since it is a wasteful call. The answering channel and the calling channel are both directed to the same extension and context, just different priorities, so we can just copy the values from the calling channel to the answering channel and increment the answering channel's priority. (closes issue #11382, reported by jon, patch by me with correction by jon) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91291 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-04Kevin suggested doing the reverse of my last commit, since imap_retrieve_filemmichelson1-2/+2
does not modify the contents of the "mailbox" string. In other words, I'm changing the imap_retrieve_file function to take a const char* as the third argument so that I don't need to cast const char*'s as char*'s to suppress compiler warnings. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90930 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-04Suppress a compiler warning due to discarding a "const" qualifiermmichelson1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90928 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-03Replacing some calls to free() with ast_free().mmichelson1-3/+3
(closes issue #11448, reported and patched by jaroth) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90670 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-28Merge some little changes from team/russell/chan_refcount to help reducerussell1-37/+27
the diff to trunk. This just removes some checks on the return value of alloca(), as behavior is undefined if it runs out of stack space, and we don't check it anywhere else. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89947 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-26Merged revisions 89580 via svnmerge from mmichelson1-1/+16
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r89580 | mmichelson | 2007-11-26 09:48:06 -0600 (Mon, 26 Nov 2007) | 6 lines Revert vmu->email back to an empty string if it was empty when imap_store_file was called. This prevents sending a duplicate e-mail. (closes issue #11204, reported by spditner, patched by me) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89581 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-24Merged revisions 89540 via svnmerge from tilghman1-1/+4
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r89540 | tilghman | 2007-11-24 00:19:23 -0600 (Sat, 24 Nov 2007) | 9 lines Currently, zero-length voicemail messages cause a hangup in VoicemailMain. This change fixes the problem, with a multi-faceted approach. First, we do our best to avoid these messages from being created in the first place, and second, if that fails, we detect when the voicemail message is zero-length and avoid exiting at that point. Reported by: dtyoo Patch by: gkloepfer,tilghman (Closes issue #11083) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89541 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21remove another set of redundant #include "asterisk/options.h"rizzo1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89512 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20move asterisk/paths.h outside asterisk.h and into those filesrizzo1-0/+1
who really need it. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89466 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19include "logger.h" and errno.h from asterisk.h - usage shows that theyrizzo1-2/+0
were included almost everywhere. Remove some of the instances. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89424 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16Start untangling header inclusion in a way that does not affectrizzo1-5/+0
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: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16Adding confirmation playback when forwarding voicemail messages. This will ↵mmichelson1-0/+18
attempt to play the name(s) of the person(s) to whom you are forwarding the message prior to prompting for prepending. If no name is found, the extension is read back verbatim. (closes issue #9046, reported and patched by jaroth) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89327 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-14make the 'name' and 'value' fields in ast_variable const char *rizzo1-3/+3
This prevents modifying the strings in the stored variables, and catched a few instances where this was actually done. Given the differences between trunk and 1.4 (and the fact that this is effectively an API change) it is better to fix 1.4 independently. These are chan_sip.c::sip_register() chan_skinny.c:: near line 2847 config.c:: near line 1774 logger.c::make_components() res_adsi.c:: near line 1049 I may have missed some instances for modules that do not build here. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89268 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08app_voicemail failed to build when compiling with IMAP_STORAGEmmichelson1-3/+2
Now it does not. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89123 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08use %f instead of %lf (the 'l' is ignored anyways).rizzo1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89110 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08improve linked-list macros in two ways:kpfleming1-2/+2
- the *_CURRENT macros no longer need the list head pointer argument - add AST_LIST_MOVE_CURRENT to encapsulate the remove/add operation when moving entries between lists git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89106 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-07If imapfolder has been specified in voicemail.conf, we should not connect to ↵mmichelson1-2/+2
INBOX... ever. It may not exist. (closes issue #11151, reported by selsky, patched by me) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89092 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-29Remove duplicate stdlib.h include.file1-1/+0
(closes issue #11105) Reported by: eliel Patches: app_voicemail.c.patch uploaded by eliel (license 64) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87327 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former ↵qwell1-2/+2
didn't make much sense git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86820 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22Merged revisions 86694 via svnmerge from mmichelson1-2/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r86694 | mmichelson | 2007-10-22 09:48:46 -0500 (Mon, 22 Oct 2007) | 5 lines Account for the fact that sometimes headers may be terminated with \r\n instead of just \n (closes issue #11043, reported by yehavi) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86696 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-19Convert NEW_CLI to AST_CLI.qwell1-2/+2
Closes issue #11039, as suggested by seanbright. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86536 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-16Merged revisions 85896 via svnmerge from russell1-3/+0
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r85896 | russell | 2007-10-16 14:10:01 -0500 (Tue, 16 Oct 2007) | 2 lines Remove a pointless lock. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@85897 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-16Fix IMAP compilation error.mmichelson1-1/+1
(closes issue #10986, reported and patched by snuffy) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@85883 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-10Merged revisions 85276 via svnmerge from mmichelson1-194/+23
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r85276 | mmichelson | 2007-10-10 09:26:31 -0500 (Wed, 10 Oct 2007) | 5 lines A bunch of changes from sprintf to snprintf. See security advisory AST-2002-022 ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@85279 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-10Merged revisions 85242 via svnmerge from file1-0/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r85242 | file | 2007-10-10 11:14:56 -0300 (Wed, 10 Oct 2007) | 6 lines Close voicemail message description file if duration did not meet the minimum, or else we will eventually run out of file descriptors. (closes issue #10918) Reported by: brak2718 Patches: vm1.4.12.1.patch uploaded by brak2718 (license 279) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@85254 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-19More conversions to NEW_CLIqwell1-71/+80
(issue #10724) Patches: chan_zap.c.patch uploaded by moy (license 222) app_queue.c.patch uploaded by eliel (license 64) app_voicemail.c.patch uploaded by eliel (license 64) app_meetme.c.patch uploaded by eliel (license 64) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@83213 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-18(closes issue #10739)qwell1-2/+11
Reported by: ruffle Patches: app_voicemail.c.diff uploaded by ruffle (license 201) 10739-moveheard.diff uploaded by qwell (license 4) Tested by: callguy, ruffle Add an option to disable the automatic moving of "heard" messages to the Old folder. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@82871 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-17Merged revisions 82676 via svnmerge from russell1-2/+0
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r82676 | russell | 2007-09-17 15:16:25 -0500 (Mon, 17 Sep 2007) | 4 lines Put a memset in ast_localtime() instead of a couple places in app_voicemail to prevent the problem everywhere instead of just a couple of places. (related to issue #10746) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@82678 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-17Merged revisions 82644 via svnmerge from russell1-0/+5
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r82644 | russell | 2007-09-17 15:00:32 -0500 (Mon, 17 Sep 2007) | 6 lines Initialize some memory to fix crashes when leaving voicemail. This problem was fixed by running Asterisk under valgrind. (closes issue #10746, reported by arcivanov, patched by me) *** IMPORTANT NOTE: We need to check to see if this same bug exists elsewhere. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@82660 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-16Option maxmessage should be maxsecs per-folder, too (closes issue #10729)tilghman1-4/+6
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@82496 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-08Make Callerid more consistent in IMAP mail headersmmichelson1-10/+19
(closes issue #10056, reported and patched by jaroth, with small modification by me) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81984 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-29This code was in team/murf/bug8684-trunk; it should fix bug 8684 in trunk. I ↵murf1-1/+1
didn't add it to 1.4 yet, because it's not entirely clear to me if this is a bug fix or an enhancement. A lot of files were affected by small changes like ast_variable_new getting an added arg, for the file name the var was defined in; ast_category_new gets added args of filename and lineno; ast_category and ast_variable structures now record file and lineno for each entry; a list of all #include and #execs in a config file (or any of its inclusions are now kept in the ast_config struct; at save time, each entry is put back into its proper file of origin, in order. #include and #exec directives are folded in properly. Headers indicating that the file was generated, are generated also for each included file. Some changes to main/manager.c to take care of file renaming, via the UpdateConfig command. Multiple inclusions of the same file are handled by exploding these into multiple include files, uniquely named. There's probably more, but I can't remember it right now. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81361 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-24Merged revisions 80750 via svnmerge from mmichelson1-2/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r80750 | mmichelson | 2007-08-24 10:51:03 -0500 (Fri, 24 Aug 2007) | 3 lines Fix a possible crash in IMAP voicemail. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@80751 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-20Remove remnants of last commit so trunk builds again.file1-2/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@80046 f38db490-d61c-443f-a65b-d21fe96a405b