Commit Graph

608 Commits

Author SHA1 Message Date
Tilghman Lesher
16f94acd53 Some compilers warn on null format strings; some don't (caught by buildbot)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@160770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-03 21:54:07 +00:00
Tilghman Lesher
1653a9ef65 Ensure that Asterisk builds with --enable-dev-mode, even on the latest gcc
and glibc.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@160207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-02 00:25:16 +00:00
Mark Michelson
b753654cbd If the prompt to reenter a voicemail password timed out, it
resulted in the password not being saved, even if the input matched
what you gave when first prompted to enter a new password. This is
because the return value of ast_readstring was checked, but not checked
properly.

This bug was discovered by Jared Smith during an Asterisk training course.
Thanks for reporting it!



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@156816 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-14 15:18:59 +00:00
Tilghman Lesher
799fe53401 Attempting to expunge a mailbox when the mailstream is NULL will crash Asterisk.
(Closes issue #13829)
Reported by: jaroth
Patch by: me (modified jaroth's patch)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@154066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-03 22:27:10 +00:00
Kevin P. Fleming
add5ff5b05 fix a bunch of potential problems found by gcc 4.3.x, primarily bare strings being passed to printf()-like functions and ignored results from read()/write() and friends
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@153337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-01 18:22:39 +00:00
Tilghman Lesher
fd9de775c5 Quoting in the wrong direction
(Fixes AST-107)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@152463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-28 22:32:34 +00:00
Tilghman Lesher
2d65bd3f1f Some compilers warn, some don't. Fixing.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@148987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-14 19:03:08 +00:00
Tilghman Lesher
f4584aa9ff Ensure that mail headers are 7-bit clean, even when UTF-8 characters are used
in headers like 'Subject' and 'To'.
Closes AST-107.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@148916 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-14 17:41:08 +00:00
Tilghman Lesher
8dad2a85a5 User not notified of temporary greeting, if ODBC storage is in use.
(closes issue #13659)
 Reported by: moliveras
 Patches: 
       20081009__bug13659.diff.txt uploaded by Corydon76 (license 14)
 Tested by: moliveras


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@148257 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-10 16:25:31 +00:00
Tilghman Lesher
276f78ae7d When blank, callerid name and number should display "unknown caller" in voicemail
emails.
(Closes issue #13643)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@147997 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-09 19:38:33 +00:00
Sean Bright
3c576b4262 Make 'imapsecret' an alias to 'imappassword' in voicemail.conf.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@147193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-07 16:48:30 +00:00
Tilghman Lesher
987835bbfe Backport Hebrew language to voicemail.
(closes issue #13155)
 Reported by: greenfieldtech
 Patches: 
       voicemail-hebrew-patch-1.4-SVN.c.patch uploaded by greenfieldtech (license 369)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@144356 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-25 01:44:47 +00:00
Tilghman Lesher
128c387bf2 When callerid is blank, we want to use "unknown caller" in those cases, too.
(closes issue #13486)
 Reported by: tomo1657
 Patches: 
       20080917__bug13486.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@143404 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-17 20:55:47 +00:00
Tilghman Lesher
496b85d5ed Missing merge from 1.2 fixes errant exit on DTMF, only when language is Italian
(cf commit 34242)
(Closes issue #7353)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@142744 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-12 16:38:02 +00:00
Mark Michelson
8ac105b26d Since greetings are not stored in IMAP, we should
not be DISPOSE'ing of them the same way we do with
other messages.

(closes issue #13414)
Reported by: mthomasslo
Patches:
      13414v2.patch uploaded by putnopvut (license 60)
Tested by: mthomasslo



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@141267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-05 16:35:54 +00:00
Mark Michelson
3bf0a6c221 Fix voicemail forwarding when using ODBC storage.
(closes issue #13387)
Reported by: moliveras
Patches:
      13387.patch uploaded by putnopvut (license 60)
Tested by: putnopvut, moliveras



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-03 14:29:15 +00:00
Mark Michelson
df5793b73c After adding the context checking to app_voicemail
for IMAP storage, I left out a crucial place to 
copy the context to the vm_state structure. This
is the correction.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-02 23:47:49 +00:00
Mark Michelson
8fc827e3cd Add context checking when retrieving a vm_state.
This was causing a problem for people who had identically
named mailboxes in separate voicemail contexts.
This commit affects IMAP storage only.

(closes issue #13194)
Reported by: moliveras
Patches:
      13194.patch uploaded by putnopvut (license 60)
Tested by: putnopvut, moliveras



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-29 16:01:07 +00:00
Kevin P. Fleming
24dedd7016 work around a bug in gcc-4.2.3 that incorrectly ignores the casting away of 'const' for pointers when the developer knows it is safe to do so
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@136458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-07 16:11:17 +00:00
Tilghman Lesher
b0e9870535 Memory leak on unload
(closes issue #13231)
 Reported by: eliel
 Patches: 
       app_voicemail.leak.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@135479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-04 16:56:19 +00:00
Mark Michelson
b7aa2fb03c Merging the imap_consistency branch.
The main aim of this branch was to make the IMAP
code function in the same manner as the ODBC code
does, eliminating the need for so many IMAP-specific
code chunks. The focal point of all of this work was
to make the various macros (e.g. RETRIEVE, DISPOSE) 
functionally equivalent.

While doing the above work, I also fixed a few bugs
that I came across in my testing. Among these were

1. Fixed message forwarding. This was completely 
broken when using IMAP.
2. Fixed the inability to save new messages as old
and vice versa.
3. Fixed the "delete" options in voicemail.conf when
using IMAP storage.

Even though a few bugs were fixed and the code is
a lot more consistent, the one thing that was *not*
improved in this branch was performance.

The merge of this to trunk may not come immediately
due to the amount of work it will probably involve.

(closes issue #12764)
Reported by: balsamcn



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@134223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-29 15:54:48 +00:00
Tilghman Lesher
0b2e233479 Detect when sox fails to raise the volume, because sox can't read the file.
(closes issue #12939)
 Reported by: rickbradley
 Patches: 
       20080728__bug12939.diff.txt uploaded by Corydon76 (license 14)
 Tested by: rickbradley


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@134161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-28 21:50:50 +00:00
Tilghman Lesher
8e0165bb17 Remove unnecessary mmap flag
(Closes issue #13161)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@133709 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-25 18:00:33 +00:00
Mark Michelson
7b1c12bcb0 Backport TCP-related timeouts to IMAP voicemail in 1.4
since it should solve bugs people are experiencing. Specifically,
there are times where communication with the IMAP server causes
system calls to block forever. If this should happen when querying
the mailbox so that chan_sip's do_monitor thread can send MWI to
a phone, it means that SIP calls cannot be processed any more.

The timeout options are outlined in doc/imapstorage.txt. Defaults
for the timeouts are sixty seconds.

(closes issue #12987)
Reported by: mthomasslo



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@129158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-08 21:09:10 +00:00
Tilghman Lesher
37d56a983f Check for non-NULL before stripping characters.
(closes issue #12954)
 Reported by: bfsworks
 Patches: 
       20080701__bug12954.diff.txt uploaded by Corydon76 (license 14)
 Tested by: deti


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@128856 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-08 00:01:30 +00:00
Tilghman Lesher
03ba0f7ef0 Stop using deprecated method, as requested by Kevin.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@128812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-07 23:21:52 +00:00
Mark Michelson
2ddc2e2ca0 Add error message to failed open(2) calls inside the copy() function of
app_voicemail. This idea came as part of my work in helping to resolve
issue #12764.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@127244 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-01 23:36:40 +00:00
Tilghman Lesher
b8e3e5c6d5 Occasionally control characters find their way into CallerID. These need to
be stripped prior to placing CallerID in the headers of an email.
(closes issue #12759)
 Reported by: RobH
 Patches: 
       20080602__bug12759__2.diff.txt uploaded by Corydon76 (license 14)
 Tested by: RobH


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@124910 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-24 21:08:52 +00:00
Mark Michelson
83efc923de Fix IMAP forwarding so that messages are sent to the proper mailbox.
(closes issue #12897)
Reported by: jaroth
Patches:
      destination_forward.patch uploaded by jaroth (license 50)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@124112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-19 20:28:41 +00:00
Michiel van Baak
68589940b4 small update to the g() option of app_voicemail to
note that gain changes only work on zap channels right now.

issue #12578 shows it's not clear right now.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118416 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-27 17:17:20 +00:00
Tilghman Lesher
a4732cfb3c When modules are embedded, they take on a different name, without the ".so"
extension.  Specifically check for this name, when we're checking if a module
is loaded.
(Closes issue #12534)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114708 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-28 04:47:39 +00:00
Joshua Colp
da024e5196 Forgot the 1.4 branch for russian language fix.
(closes issue #12404)
Reported by: IgorG
Patches:
      voicemail_ru_hardcoded-v1.patch uploaded by IgorG (license 20)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114032 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-10 15:58:39 +00:00
Jason Parker
9ae694024e Fix a silly infinite loop when choosing an invalid option.
(closes issue #12315)
Reported by: jmls


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@112068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-31 21:48:05 +00:00
Mark Michelson
df37925e23 This code change is made just for clarification. It does exactly
the same thing as before. It just doesn't look as wrong.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@111121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26 19:37:36 +00:00
Mark Michelson
453209fd16 Add a lock to the vm_state structure and use the lock around mail_open calls
to prevent concurrent access of the same mailstream. This, along with trunk's
ability to configure TCP timeouts for IMAP storage will help to prevent
crashes and hangs when using voicemail with IMAP storage.

(closes issue #10487)
Reported by: ewilhelmsen



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@111049 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26 19:22:16 +00:00
Jason Parker
48523e3596 Add a newline on a log
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107712 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 20:47:53 +00:00
Tilghman Lesher
417e8fc754 Warn the user when a temporary greeting exists
(Closes issue #11409)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 16:22:11 +00:00
Tilghman Lesher
56e908b787 Safely use the strncat() function.
(closes issue #11958)
 Reported by: norman
 Patches: 
       20080209__bug11958.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 06:36:33 +00:00
Tilghman Lesher
8bf705f519 If the message file does not exist, just return harmlessly, instead of crashing.
(Closes issue #12108)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@105296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-29 14:34:34 +00:00
Joshua Colp
837d4676dd Bump up the size of the uniqueid variable.
(closes issue #12107)
Reported by: asgaroth


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@105261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-29 13:48:13 +00:00
Russell Bryant
bc56a84c58 Merge changes from team/russell/smdi-1.4
This commit brings in a significant set of changes to the SMDI support in Asterisk.
There were a number of bugs in the current implementation, most notably being that
it was very likely on busy systems to pop off the wrong message from the SMDI message
queue.  So, this set of changes fixes the issues discovered as well as introducing
some new ways to use the SMDI support which are required to avoid the bugs with
grabbing the wrong message off of the queue.

This code introduces a new interface to SMDI, with two dialplan functions.  First,
you get an SMDI message in the dialplan using SMDI_MSG_RETRIEVE() and then you access
details in the message using the SMDI_MSG() function.  A side benefit of this is that
it now supports more than just chan_zap.

For example, with this implementation, you can have some FXO lines being terminated 
on a SIP gateway, but the SMDI link in Asterisk.

Another issue with the current implementation is that it is quite common that the
station ID that comes in on the SMDI link is not necessarily the same as the Asterisk
voicemail box.  There are now additional directives in the smdi.conf configuration
file which let you map SMDI station IDs to Asterisk voicemail boxes.

Yet another issue with the current SMDI support was related to MWI reporting over
the SMDI link.  The current code could only report a MWI change when the change
was made by someone calling into voicemail.  If the change was made by some other
entity (such as with IMAP storage, or with a web interface of some kind), then the
MWI change would never be sent.  The SMDI module can now poll for MWI changes if
configured to do so.

This work was inspired by and primarily done for the University of Pennsylvania.

(also related to issue #9260)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104119 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 00:25:29 +00:00
Tilghman Lesher
5184be27ed If the destination folder is full, don't delete a message when exiting.
(closes issue #12065)
 Reported by: selsky
 Patch by: (myself)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104094 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-25 21:31:47 +00:00
Mark Michelson
638ef8c5d2 Change to the configure logic regarding IMAP. Prior to this commit, if you wished to configure
Asterisk with IMAP support, you would use the --with-imap configure switch in one of the following
two ways:
--with-imap=/some/directory would look in the directory specified for a UW IMAP source installation
--with-imap would assume that you had imap-2004g installed in .. relative to the Asterisk source

With this set of changes the two above options still work the same, but there are two new behaviors, too.
--with-imap=system will assume that you have -libc-client.so where you store your shared objects and will
            attempt to find c-client headers in your include path either in the imap or c-client directory.
If either of the two original methods of specifying the imap option should fail, then the check for --with-imap
=system will be performed in addition. It is only after this "system" check that failure can happen.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103698 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-14 23:30:17 +00:00
Mark Michelson
0d470a0525 Fix build for non-IMAP builds
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103690 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-14 21:03:02 +00:00
Mark Michelson
e70abb4a9e Fix the new message count if delete=yes when using IMAP storage.
(closes issue #11406)
Reported by: jaroth
Patches:
      deleteflag_v2.patch uploaded by jaroth (license 50)
	  Tested by: jaroth



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-14 20:55:48 +00:00
Tilghman Lesher
3e014ecd0b Refuse to load app_voicemail if res_adsi is not loaded (which is a symbol dependency)
(closes issue #11760)
 Reported by: non-poster
 Patches: 
       20080114__bug11760.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76, non-poster, jamesgolovich


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-13 00:26:57 +00:00
Tilghman Lesher
42463c4bb2 Commit fix for being unable to send voicemail from VoiceMailMain
Reported by: William F Acker (via the -users mailing list)
 Patch by: Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-09 06:23:49 +00:00
Tilghman Lesher
c9bb4fc12a Move around some defines to unbreak ODBC storage.
(closes issue #11932)
 Reported by: snuffy


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@102576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-06 00:26:02 +00:00
Tilghman Lesher
5f7afc8678 Fix the VM_DUR variable for forwarded voicemail, and fixed several other bugs
while I'm in the area.
(closes issue #11615)
 Reported by: jamessan
 Patches: 
       20071226__bug11615__2.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76, jamessan


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@101942 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-01 21:54:28 +00:00
Jason Parker
cec60d345d When using ODBC_STORAGE, make sure we put greeting files into the database like we do with the others.
Issue #11795
Reported by: dimas
Patches:
      vmgreet.patch uploaded by dimas (license 88)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@100672 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-28 20:42:43 +00:00