Commit Graph

578 Commits

Author SHA1 Message Date
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
Tilghman Lesher
60c9fba58f When we reset the password via an external command, we should also reset the
password stored in the in-memory list, too (otherwise it doesn't really take
effect).
(closes issue #11809)
 Reported by: davetroy
 Patches: 
       fix_externpass.diff uploaded by davetroy (license 384)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@99777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-23 04:31:51 +00:00
Mark Michelson
d186a861cf Adding in appropriate unlocks for the locks I added. Thanks to joetester on IRC
for pointing this out.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-14 20:59:26 +00:00
Mark Michelson
87a55d5882 Let us leave a voicemail for ourself if we have logged into VoiceMailMain and chosen
to leave a message.

(closes issue #11735, reported and patched by jamessan)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 21:57:06 +00:00
Mark Michelson
b5ea488a1d Making some changes designed to not allow for a corrupted mailstream for a vm_state.
1. Add locking to the vm_state retrieval functions so that no linked list corruption occurs.
2. Make sure to always grab the persistent vm_state when mailstream access is necessary.
3. Correct an incorrect return value in the init_mailstream function.

(closes issue #11304, reported by dwhite)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97192 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-08 20:42:07 +00:00
Mark Michelson
54215d94f1 Bunch of coding guidelines cleanup
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 20:21:59 +00:00
Mark Michelson
f4663e4f22 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@94540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 20:11:34 +00:00
Mark Michelson
c30bab877c 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@94538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 19:59:45 +00:00
Mark Michelson
2fa91746e3 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@93291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 19:53:48 +00:00
Mark Michelson
7f7cbe7f69 Prevent another potential fd leak
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-13 20:03:20 +00:00
Mark Michelson
fb077e33cb Prevent a possible fd leak.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-13 19:49:55 +00:00
Mark Michelson
ad820243bd IMAP storage did not honor the maxmsg setting in voicemail.conf, and it also had the possibility
of crashing if a user had more than 256 messages in their voicemail. This patch kills two birds with
one stone by adding maxmsg support and also setting a hard limit on the number of messages at 255 so
that the crashes cannot happen.

(closes issue #11101, reported by Skavin, patched by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@91541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-06 20:25:11 +00:00
Mark Michelson
41661777a4 Reverting extra stuff I didn't mean to commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@91292 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-05 22:57:13 +00:00
Mark Michelson
a1a592f3f0 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@91273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-05 22:35:52 +00:00
Mark Michelson
f1d612adb9 Recording greetings when using IMAP storage was causing zero-length files to be stored.
Since greetings are not retrieved from IMAP anyway, it is pointless to attempt storing them there.

(closes issue #11359, reported by spditner, patched by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89999 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-28 17:30:47 +00:00
Mark Michelson
5efa50746e 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@89580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 15:48:06 +00:00
Tilghman Lesher
e671cb909d 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@89540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-24 06:19:23 +00:00
Mark Michelson
9f5cf47a6f I made this same adjustment in trunk to fix a bug, and it makes sense to do it in 1.4 as
well. If an imapfolder is specified in voicemail.conf, don't ever explicitly connect to 
INBOX since it may not exist.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 16:47:23 +00:00
Mark Michelson
a4c50fdd7b Removing a completely unnecessary quota check from IMAP code.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@87427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-29 21:06:31 +00:00
Mark Michelson
222302c0a2 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@86694 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-22 14:48:46 +00:00
Russell Bryant
f192689840 Remove a pointless lock.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@85896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-16 19:10:01 +00:00
Mark Michelson
deb480f124 A bunch of changes from sprintf to snprintf.
See security advisory AST-2002-022



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@85276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-10 14:26:31 +00:00
Joshua Colp
3151af0015 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@85242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-10 14:14:56 +00:00
Russell Bryant
82a6309168 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@82676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-17 20:16:25 +00:00
Russell Bryant
a67e593e66 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@82644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-17 20:00:32 +00:00
Mark Michelson
39d628adcf Accidentally committed changes to app_voicemail which do NOT need to be in the 1.4 branch yet. reverting...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@82276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-12 14:30:13 +00:00
Mark Michelson
da18cece2c We should only initialize a realtime queue when it is allocated, not every 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@82274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-12 14:24:53 +00:00
Mark Michelson
09fc9c894e Fix a possible crash in IMAP voicemail.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-24 15:51:03 +00:00
Mark Michelson
7c7ec6a1da Ukrainian language voicemail support.
(closes issue #10458, reported and patched by Oleh)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-20 15:34:43 +00:00
Tilghman Lesher
e6768adf1b Missing curly braces. Oops. (Reported by snuffy via IRC)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79998 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-20 02:42:49 +00:00
Tilghman Lesher
d0469e3c42 Don't allocate vmu for messagecount when we could just use the stack instead (closes issue #10490)
Also, remove a useless (and leaky) SQLAllocHandle (closes issue #10480)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-18 14:30:44 +00:00