aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_voicemail.c
AgeCommit message (Collapse)AuthorFilesLines
2007-08-09Improved a bit of logic regarding comma-separated mailboxes in ↵mmichelson1-5/+11
has_voicemail. Also added some braces to some compound if statements since unbraced if statements scare me in general. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78907 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-09Removing some extra debug code I left in my last commitmmichelson1-7/+0
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78860 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-09Quite a few changes regarding IMAP storage.mmichelson1-102/+160
1. instead of using inboxcount as the core message counting function, we use messagecount instead. This makes it possible to count messages in folders besides just INBOX and Old. 2. inboxcount and hasvoicemail now use messagecount as their means of determining return values. 3. Added a copy_message function for IMAP storage. Unfortunately I don't have the means to test it, but it seems like a pretty straightforward function. 4. Removed a #ifndef IMAP_STORAGE and matching #endif from leave_voicemail for a couple of reasons. One, we want to support copying mail to multiple IMAP boxes, and two, IMAP was broken because a STORE macro had been moved into this section of code. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78859 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-09add a comment to indicate that inboxcount for ODBC_STORAGE needs to be fixed ↵russell1-0/+1
to support multiple mailboxes git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78778 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-09Fix subscriptions to multiple mailboxes for ODBC_STORAGE. Also, leave arussell1-10/+11
comment for this to be fixed for IMAP_STORAGE, as well. I left IMAP alone since I know MarkM was working on this code right now for another reason. This is broken even worse in trunk, but for a different reason. The fact that the mailbox option supported multiple mailboxes is completely not obvious from the code in the channel drivers. Anyway, I will fix that in another commit ... git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78749 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-08Fixed some compiler warnings so that compiling with dev-mode and IMAP ↵mmichelson1-2/+4
storage would not have any errors. This section of code may get changed again shortly since my change uncovers a rather silly bit of logic. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78620 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-07The logic behind inboxcount's return value was reversed in has_voicemail and ↵mmichelson1-4/+4
message_count. (closes issue #10401, reported by st1710, patched by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78450 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-07Reconnection doesn't happen automatically when a DB goes down (fixes issue ↵tilghman1-178/+72
#9389) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78415 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-03(closes issue #10194)russell1-0/+7
Reported by: blitzrage Patches: bug0010194 uploaded by vovochka Tested by: blitzrage Fix a problem when you call Voicemail() with multiple mailboxes specified and ODBC_STORAGE is in use. The audio part of the message was only given to the first mailbox specified. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78101 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-01Voicemail with ODBC_STORAGE defined does not compile cleanly (missing def)tilghman1-0/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@77886 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-01Add some fixes for building on Solaris.file1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@77869 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23It was our stated intention for 1.4 that files created in app_voicemail shouldtilghman1-0/+7
depend upon the umask. Unfortunately, mkstemp() creates files with mode 0600, regardless of the umask. This corrects that deficiency. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@76708 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-18Merged revisions 75748 via svnmerge from tilghman1-1/+8
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r75748 | tilghman | 2007-07-18 15:31:36 -0500 (Wed, 18 Jul 2007) | 2 lines Store prior to copy (closes issue #10193) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@75749 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-18Backport GCC 4.2 fixes. Without these Asterisk won't build under devmode ↵file1-6/+3
using GCC 4.2. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@75712 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-10Forwarding a message with IMAP storage was storing the message in the ↵mmichelson1-1/+14
sender's box instead of the forwarded mailbox. (closes issue #10138, reported and patched by jaroth) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@74476 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-10Merged revisions 74316 via svnmerge from qwell1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r74316 | qwell | 2007-07-10 10:37:54 -0500 (Tue, 10 Jul 2007) | 4 lines Fix a small typo in description in of Voicemail() application. Issue 10170, patch by casper. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@74317 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-09Fixed a logic error in leave_voicemail. Pass the mailbox instead of the ↵mmichelson1-1/+1
context to inbox_count when the context is "default." (closes issue #10135, reported by yannj, repaired by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@74047 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-06Fixing a rare case which causes voicemail to crash when compiled with IMAP ↵mmichelson1-2/+19
storage. inboxcount has the possibility of finding an "interactive" vm_state when no persistent "non-interactive" vm_state exists for that mailbox. If this should happen when someone attempts to leave a message, it results in a crash. This patch, along with my commit in revision 72670 fix issue 10053, reported by jaroth. closes issue #10053 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@73727 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-27Fix another problem in voicemail with missing symbols.qwell1-4/+4
Issue 10074, patch by kryptolus, extended to include #if 0'd blocks (just in case) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@72182 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-26Removing a pointless line. This variable was already set earlier and between ↵mmichelson1-1/+0
then and this line, there is no way that the values on the right side of the assignment could have changed. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@71953 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-26A few changes, the ultimate goal of which is to keep better track of the ↵mmichelson1-23/+26
number of messages that a mailbox currently has. A description of the changes: 1. Changed the "updated" field of the vm_state struct to act more as a binary semaphore than a counting semaphore, since its current implementation made the inboxcount function not work properly. This change falls in line with a change made by UPenn with their IMAP setup and helps to sync our changes with theirs. 2. Eliminated some redundant calls to get_vm_state_by_mailbox inside leave_voicemail 3. Use the play_folder variable to keep track of the number of old and new messages in a mailbox as the messages are deleted 4. Added an increment to the number of new messages that was not there previously in the leave_voicemail function git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@71877 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-26Fixing bug where the authuser was mistakenly pulled from the mailbox string ↵mmichelson1-2/+2
instead of the IMAP user. (closes issue 10054, reported and patched by jaroth) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@71796 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-26Merged revisions 71750 via svnmerge from tilghman1-0/+5
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r71750 | tilghman | 2007-06-26 07:25:58 -0500 (Tue, 26 Jun 2007) | 2 lines Issue 10062 - Trying to move a message without selecting one first results in memory corruption ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@71751 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-21Merged revisions 70898 via svnmerge from file1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r70898 | file | 2007-06-21 17:37:55 -0400 (Thu, 21 Jun 2007) | 2 lines Don't explode if the gain option is specified without a value. (issue #9274 reported by mfarver) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@70899 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-21When volgain is used don't leave a temporary file behind.mmichelson1-12/+16
(Closes Issue 8514, Reported and patched by ulogic, code reviewed by Jason Parker) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@70808 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-21Fix building with ODBC storage enabled. (issue #10025 reported by denisgalvao)file1-3/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@70677 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-18To prevent 92138749238754 more reports of "I have unixodbc installed, butrussell1-0/+1
still can't build *_odbc.so!", check for ltdl directly, instead of just listing it as another library to include in the unixodbc check in the configure script. This also makes ltdl show up as a dependency in menuselect so people know what to go install. (related to issue #9989, patch by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@69702 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-14use ast_localtime() in every place localtime_r() was being usedkpfleming1-3/+3
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@69392 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-13Contains a patch for fixing an encoding problem when using Outlook to view ↵mmichelson1-4/+4
voicemail emails and attachments. This fix has also been tested on Thunderbird, Evolution, Pine, and Mutt. (Issue 9336, reported by marwick, patched by mutterc) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@69181 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-07Fix incorrect French syntax of "old messages".qwell1-3/+3
Request for feedback was sent to asterisk-dev mailing list, with little response. Issue 9118, patch by junky. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@68326 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-07Merged revisions 68204 via svnmerge from qwell1-8/+19
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r68204 | qwell | 2007-06-07 15:02:50 -0500 (Thu, 07 Jun 2007) | 4 lines Don't try to save voicemail greetings unless the user presses '1' to accept/save. Issue 9904, patch by me. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@68211 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-07Submitting a fix for Issue 8016. Added a check to make sure that greetings ↵mmichelson1-2/+5
get stored properly. (Issue 8016, reported by edhorton, patched by alamantia with modification by me. Thanks to Jason Parker for the advice on this). git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@68198 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-06Fix for Issue 9810. There was a segfault under a specific set of circumstances:mmichelson1-5/+7
1. VoiceMailMain was configured in the dialplan with an extension as its argument 2. A message was left for this mailbox 3. Tried to call VoiceMailMain but hung up before entering password. This was fixed by checking that a pointer was non-null prior to trying to dereference it. (Issue 9810, reported by xmarksthespot, patched by Corydon76 with modifications by me). git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@67804 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-05Fix for bug number 9786, wherein voicemails saved to IMAP storage using ↵mmichelson1-1/+18
extensions other than gsm were unable to be played over the phone. (Issue 9786, reporter: xmarksthespot, Patched by xmarksthe spot with revisions by me, reviewed by Russell Bryant). git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@67424 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-01Removing extraneous debugging lines from revision 66897. Sorry :)mmichelson1-4/+0
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@66917 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-01Submitting a fix for voicemail with IMAP storage. Attachments with format ↵mmichelson1-12/+6
specified as gsm were duplicated (i.e. two attachments) were left. Thank you very much to xmarksthespot for submitting the patch that fixed this. (Issues 9787 and 8873, Reported by xmarksthespot and jerjer, patched by xmarksthespot) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@66897 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-30Fixed seg-faults when recording greetings in voicemail with IMAP enabled. ↵mmichelson1-0/+32
(Issue No. 9735, reported by xmarksthespot, patched by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@66671 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-22List res_smdi as a dependency for app_voicemail and chan_zaprussell1-0/+1
(Thanks to mnicholson for pointing it out) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@65501 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-17Merged revisions 64758 via svnmerge from qwell1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r64758 | qwell | 2007-05-17 11:52:38 -0500 (Thu, 17 May 2007) | 4 lines If we have a negative current message, we shouldn't go back even further... Issue 9727. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@64761 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-17Fix authuser support. (issue #9740 reported by xmarksthespot)file1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@64720 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-08Merged revisions 63359 via svnmerge from tilghman1-14/+17
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r63359 | tilghman | 2007-05-08 01:20:16 -0500 (Tue, 08 May 2007) | 2 lines Issue 9527 - upon entering a folder, no message is selected (curmsg == -1), so deleting causes memory corruption (beyond bounds) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@63360 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-01Bug 9590 - Memory leaks around find_user() (found by rayjay, different fixes ↵tilghman1-2/+9
by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@62545 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-20Fix the UpdateConfig manager action to properly treat "variables" and "objects"russell1-3/+3
differently (a=b versus a=>b). (issue #9568, reported by pari, patch by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@61690 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-13Eliminate a compiler warning with ODBC_STORAGE enabled so that it will buildrussell1-1/+1
under dev-mode. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@61645 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-09This is a big improvement over the current CDR fixes. It may still need ↵murf1-6/+6
refinement, but this won't have as many folks bothered. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@60989 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-05Merged revisions 60267 via svnmerge from qwell1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r60267 | qwell | 2007-04-05 11:09:41 -0500 (Thu, 05 Apr 2007) | 5 lines Just because we can't find the voicemail configuration file, doesn't mean that the module failed to load. The user could be using realtime. Issue #9473 ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@60268 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-02Merged revisions 59723 via svnmerge from file1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r59723 | file | 2007-04-02 14:55:25 -0400 (Mon, 02 Apr 2007) | 2 lines Increase the maximum size for a string of mailboxes to 1024. (issue #9270 reported by rtucker) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@59724 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-27Merged revisions 59283 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r59283 | tilghman | 2007-03-27 18:36:49 -0500 (Tue, 27 Mar 2007) | 2 lines Oops ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@59284 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-27Merged revisions 59280 via svnmerge from tilghman1-5/+5
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r59280 | tilghman | 2007-03-27 18:31:20 -0500 (Tue, 27 Mar 2007) | 2 lines Fix a few remaining bad mmap(2) return values ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@59281 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-26Somehow the code for building the email for voicemail got out of sync. Thisrussell1-7/+7
change makes a few tweaks to get 1.4 in sync with trunk. (issue #9301) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@59217 f38db490-d61c-443f-a65b-d21fe96a405b