aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_voicemail.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10Close voicemail message description file if duration did not meet the ↵file1-0/+1
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/branches/1.4@85242 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-17Put a memset in ast_localtime() instead of a couple places in app_voicemailrussell1-3/+0
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/branches/1.4@82676 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-17Initialize some memory to fix crashes when leaving voicemail. This problemrussell1-1/+7
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/branches/1.4@82644 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-12Accidentally committed changes to app_voicemail which do NOT need to be in ↵mmichelson1-45/+5
the 1.4 branch yet. reverting... git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@82276 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-12We should only initialize a realtime queue when it is allocated, not every ↵mmichelson1-5/+45
time we access it. This prevents the members ao2_container from being reallocated every time the queue is accessed. I also removed a debug message I had accidentally left in on a previous commit. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@82274 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-24Fix a possible crash in IMAP voicemail.mmichelson1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@80750 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-20Ukrainian language voicemail support.mmichelson1-0/+95
(closes issue #10458, reported and patched by Oleh) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@80044 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-20Missing curly braces. Oops. (Reported by snuffy via IRC)tilghman1-3/+4
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79998 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-18Don't allocate vmu for messagecount when we could just use the stack instead ↵tilghman1-15/+2
(closes issue #10490) Also, remove a useless (and leaky) SQLAllocHandle (closes issue #10480) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79947 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-17Patch allows for more seamless transition from file storage voicemail to ↵mmichelson1-1/+11
ODBC storage voicemail. If a retrieval of a greeting from the database fails, but the file is found on the file system, then we go ahead an insert the greeting into the database. The result of this is that people who switch from file storage to ODBC storage do not need to rerecord their voicemail greetings. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79906 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-16base_encode is not trying to open a log file, so we should not call it a log ↵mmichelson1-1/+1
file in the warning. (related to issue #10452, reported by bcnit) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79690 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-15Fixed an error in the Russian language voicemail intro.mmichelson1-1/+1
(issue #10458, reported and patched by Oleh) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79527 f38db490-d61c-443f-a65b-d21fe96a405b
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