Commit Graph

734 Commits

Author SHA1 Message Date
Tilghman Lesher 5a71f180ad Merged revisions 128812 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r128812 | tilghman | 2008-07-07 18:21:52 -0500 (Mon, 07 Jul 2008) | 2 lines

Stop using deprecated method, as requested by Kevin.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@128830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-07 23:25:39 +00:00
Mark Michelson 4f0f9d27cf Crap
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@128733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-07 20:30:46 +00:00
Mark Michelson 742815875d If imapfolder=foo were set in voicemail.conf, then when calling VoiceMailMain,
app_voicemail would attempt to play a file called vm-foo instead of playing
vm-INBOX to play the "new" sound file. This commit fixes that issue.

This may fix one of the problems reported in issue #12987



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@128731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-07 20:28:33 +00:00
Mark Michelson 04a10e77a0 Get app_voicemail compiling when IMAP storage is used.
Brought up by reporter on issue #12987



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@128690 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-07 17:34:06 +00:00
Tilghman Lesher 267b9d4eb4 Oops
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-02 22:17:37 +00:00
Tilghman Lesher 885d17506b Keep ast_app_inboxcount API compatible with 1.6.0.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-02 21:27:53 +00:00
Tilghman Lesher 3a27a6a9e7 Fix some crashlike bugs because flag could be NULL in play_record_review().
(Closes issue #12892)
Reported by: jaroth
Patch originally by jaroth, fixed by me.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-02 20:52:27 +00:00
Mark Michelson 13a81dd7ae Merged revisions 127244 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r127244 | mmichelson | 2008-07-01 18:36:40 -0500 (Tue, 01 Jul 2008) | 5 lines

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/trunk@127245 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-01 23:38:12 +00:00
Luigi Rizzo f55143f0a6 fix an uninitialized variable
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@126571 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-30 15:44:50 +00:00
Tilghman Lesher c9ac1b8ca5 Don't play "your message has been saved" twice.
(closes issue #12893)
 Reported by: jaroth
 Patches: 
       duplicate_saved.patch uploaded by jaroth (license 50)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-26 17:40:25 +00:00
Tilghman Lesher 7ec25255c5 Merged revisions 124910 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r124910 | tilghman | 2008-06-24 16:08:52 -0500 (Tue, 24 Jun 2008) | 8 lines

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/trunk@124912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-24 21:18:52 +00:00
Mark Michelson 1d2ac41c07 Fix attachment behavior when using IMAP storage for voicemails
1. Filenames had an extra "msg" in the attachment name
2. The attachment was being saved twice

(closes issue #12894)
Reported by: jaroth
Patches:
      imap_attach.patch uploaded by jaroth (license 50)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@124180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-19 22:34:03 +00:00
Michiel van Baak 8e8359465b Older versions of GNU gcc do not allow 'NULL' as sentinel.
They want (char *)NULL as sentinel.
An example is OpenBSD (confirmed on 4.3) that ships with gcc 3.3.4

This commit introduces a contstant SENTINEL which is declared as:
#define SENTINEL ((char *)NULL)

All places I could test compile on my openbsd system are converted.
Update CODING-GUIDELINES to tell about this constant.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@124127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-19 20:48:33 +00:00
Mark Michelson 7852d30fe8 Merged revisions 124112 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r124112 | mmichelson | 2008-06-19 15:28:41 -0500 (Thu, 19 Jun 2008) | 8 lines

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/trunk@124121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-19 20:30:23 +00:00
Mark Michelson a2b4382fd7 Forwarding non-urgent IMAP messages could inadvertently cause the messages
to be marked urgent. This fixes that issue.

(closes issue #12895)
Reported by: jaroth
Patches:
      urgent_forwarding.patch uploaded by jaroth (license 50)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-19 15:55:10 +00:00
Tilghman Lesher 53459f86b2 Expand RQ_INTEGER type out to multiple types, one for each precision
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121367 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-09 22:51:59 +00:00
Tilghman Lesher 9471b87d27 Merge the adaptive realtime branch, which will make adding new required fields
to realtime less painful in the future.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@120789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-05 19:07:27 +00:00
Michiel van Baak 00da438e4c Zap is now DAHDI, mkay
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-27 17:33:21 +00:00
Michiel van Baak 3d4a1cee98 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/trunk@118417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-27 17:21:12 +00:00
Mark Michelson 4ad72ce1cf Get rid of warnings for those silly compilers which warn when freeing
a const pointer



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-23 20:55:02 +00:00
Mark Michelson 7e49fd2f0e Use a deep copy on strings that come from ast_events. Otherwise it is
likely that after the event is freed, we no longer refer to valid memory.

(closes issue #12712)
Reported by: tomo1657
Patches:
      12712.patch uploaded by putnopvut (license 60)
Tested by: tomo1657



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-23 19:57:40 +00:00
Mark Michelson 028016b401 When counting urgent messages when using IMAP storage, take into account that
the urgent messages are not in their own folder but are actually "flagged" messages
in the INBOX.


(closes issue #12659)
Reported by: jaroth
Patches:
      urgentfolder_v2.patch uploaded by jaroth (license 50)
Tested by: jaroth



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-15 15:40:29 +00:00
Mark Michelson a92223a240 Modify externnotify to take the number of urgent voicemails as a final argument instead
of the string "Urgent" 

(closes issue #12660)
Reported by: jaroth
Patches:
      externnotify.patch uploaded by jaroth (license 50)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-15 15:24:29 +00:00
Mark Michelson f10440a35f Prevent crashes from occurring due to a strcmp of a NULL pointer.
(closes issue #12661)
Reported by: jaroth
Patches:
      urgentcompare.patch uploaded by jaroth (license 50)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116590 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-15 15:13:11 +00:00
Jason Parker 8340b21c1d Voicemail "* exit" should not require an exitcontext to be specified.
The behavior in 1.4 was that it would use the current context if an exitcontext existed.

(closes issue #12605)
Reported by: kenjreno
Patches:
      12605-starexit.diff uploaded by qwell (license 4)
Tested by: file


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116407 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-14 20:36:55 +00:00
Mark Michelson 93e84a7d76 Remove a debug line
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115591 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-09 22:36:50 +00:00
Mark Michelson 7daebcd610 Adding support for "urgent" voicemail messages. Messages which are
marked "urgent" are considered to be higher priority than other messages
and so they will be played before any other messages in a user's mailbox.

There are two ways to leave an urgent message. 
1. send the 'U' option to VoiceMail().
2. Set review=yes in voicemail.conf. This will give instructions for 
   a caller to mark a message as urgent after the message has been recorded.

I have tested that this works correctly with file and ODBC storage, and James
Rothenberger (who wrote initial support for this feature) has tested its use
with IMAP storage.

(closes issue #11817)
Reported by: jaroth
	Based on branch http://svn.digium.com/svn/asterisk/team/jrothenberger/asterisk-urgent
Tested by: putnopvut, jaroth



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-09 21:22:42 +00:00
Tilghman Lesher 8b1d52c9a5 Allow a password change to be validated by an external script.
(closes issue #12090)
 Reported by: jaroth
 Patches: 
       vm-check-newpassword.diff.txt uploaded by mvanbaak (license 7)
       20080509__bug12090.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-09 17:28:06 +00:00
Dwayne M. Hubbard 817e1ed55f app_voicemail uses a taskprocessor for mwi notification subscriptions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-03 04:23:18 +00:00
Tilghman Lesher b11854445b Add attributes to various API calls, to help track down bugs (and remove a deprecated function)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-02 02:33:04 +00:00
Tilghman Lesher 527c601d0c Lock around variables retrieved, and copy the values, if they stay persistent,
since another thread could remove them.
(closes issue #12541)
 Reported by: snuffy
 Patches: 
       bug_12156_apps.diff uploaded by snuffy (license 35)
       Several additional changes by me


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-30 19:21:04 +00:00
Mark Michelson 6e45d3c223 Since there is now a globally available function for saying someone's name, a LOT of
functions in app_directory can be removed since the ODBC-specific lookups are accomplished
within app_voicemail. This change greatly reduces the amount of lines in app_directory that
were solely for the purpose of looking up a name when ODBC_STORAGE is specified for voicemail.

This commit also makes the name-saying interruptable via DTMF.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114834 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-29 17:56:13 +00:00
Mark Michelson 3aad03e5f0 Adding a new option 'n' to app_chanspy. This option allows for the name of the spied-on
party to be spoken instead of the channel name or number.

This was accomplished by adding a new function pointer to point to a function in app_voicemail
which retrieves the name file and plays it. This makes for an easy way that applications may play
a user's name should it be necessary. app_directory, in particular, can be simplified greatly by
this change.

This change comes as a suggestion from Switchvox, which already has this feature. AST-23


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-28 22:38:07 +00:00
Tilghman Lesher ff2ca49cd0 Fix breakage caused by #12028. (Closes issue #12535)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-28 04:30:02 +00:00
Mark Michelson 8ce5a0a500 This patch allows for forwarding a message with a "comment" attachment
if using IMAP storage for voicemail. The comment will be recorded and attached
as a second attachment in addition to the original message. This will be invoked
if you choose to prepend a message the way you would with file or ODBC storage


(closes issue #12028)
Reported by: jaroth
Patches:
      forward_with_comment_v2.patch uploaded by jaroth (license 50)
Tested by: jaroth



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-25 18:18:30 +00:00
Mark Michelson 2b2571d011 Fix a memory leak and protect against potential dereferences of a NULL
pointer.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-25 16:25:17 +00:00
Mark Michelson 797adf6bf8 Round 2 of IMAP_STORAGE app_voicemail.c fixes:
This fixes a bug that was thought to be fixed already.

app_voicemail, if using IMAP_STORAGE, has a problem because
the IMAP header files include syslog.h, which define LOG_WARNING
and LOG_DEBUG to be different than what Asterisk uses for those
same macros. This was "fixed" in the past by including all the 
IMAP header files prior to including asterisk.h. This fix worked...
unless you were to try to compile with MALLOC_DEBUG. MALLOC_DEBUG
prepends the inclusion of astmm.h to every file, which means that no
matter what order the includes are in in app_voicemail, the unexpected
values for LOG_WARNING and LOG_DEBUG will be in place.

The action taken for this fix was to define AST_LOG_* macros in addition
to the LOG_* macros already defined. These new macros are used in app_voicemail.c,
logger.h, and astobj.h right now, and their use will be encouraged in the future.

In consideration of those who have written third-party modules which use 
the LOG_* macros, these will NOT be removed from the source, however future use
of these macros is discouraged.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-23 00:58:49 +00:00
Mark Michelson edf0313215 Round 1 of IMAP_STORAGE-related app_voicemail changes
This makes IMAP_STORAGE include the proper headers if you
have specified the "system" option for --with-imap when running
the configure script and your IMAP-related headers exist in 
/usr/include/c-client.

This change is due to a hasty merge of a 1.4 change I made.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114575 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-23 00:40:30 +00:00
Joshua Colp c9338b76ee Don't hardcode ru into the digits filename so that languageprefix can work.
(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/trunk@114027 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-10 14:53:19 +00:00
Tilghman Lesher 137c02a020 Permit message wrap-around during message retrieval.
(closes issue #12254)
 Reported by: andrew
 Patches: 
       bug-12253.diff uploaded by snuffy (license 35)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@113731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-09 16:16:44 +00:00
Mark Michelson a83661d39c This is a "fix" for something that's been bugging the crap out of me for a while.
The variable name "flag" to distinguish between whether a message is being forwarded or
is new is not a helpful name. The newly added doxygen documentation to app_voicemail is
tremendously helpful, but I still just...hate this variable name. I think is_new_message
is more indicative of what its purpose is.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@113207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-07 20:22:06 +00:00
Jason Parker a734470a2b Minor formatting cleanup.
(closes issue #12343)
Reported by: travishein
Patches:
      app_voicemail_code_convention.patch uploaded by travishein (license 385)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112252 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-01 18:27:08 +00:00
Jason Parker 9f1e663935 More voicemail doxygen additions/cleanup.
(issue #12343)
Reported by: travishein
Patches:
      app_voicemail_code_documentation.patch uploaded by travishein (license 385)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-01 18:24:56 +00:00
Jason Parker 4edaf04348 Merged revisions 112068 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r112068 | qwell | 2008-03-31 16:48:05 -0500 (Mon, 31 Mar 2008) | 5 lines

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/trunk@112069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-31 21:48:30 +00:00
Jason Parker ed9e3ef23e Replace magic number size from msgArray array with a define.
(same patch as before, I just split this part out)
(close issue #12326)
Reported by: travishein
Patches:
      app_voicemail_code_documentation.patch uploaded by travishein (license 385)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111774 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-28 19:08:35 +00:00
Jason Parker 1f8cb622bb Add a bit of doxygen documentation for app_voicemail.
(issue #12326)
Reported by: travishein
Patches:
      app_voicemail_code_documentation.patch uploaded by travishein (license 385)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-28 19:06:54 +00:00
Mark Michelson e94d06b83c Merged revisions 111121 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r111121 | mmichelson | 2008-03-26 14:37:36 -0500 (Wed, 26 Mar 2008) | 4 lines

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/trunk@111123 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26 19:39:23 +00:00
Mark Michelson 5278d1d62b Merged revisions 111049 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r111049 | mmichelson | 2008-03-26 14:22:16 -0500 (Wed, 26 Mar 2008) | 9 lines

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/trunk@111067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26 19:26:23 +00:00
Terry Wilson b02bc230af Go through and fix a bunch of places where character strings were being interpreted as format strings. Most of these changes are solely to make compiling with -Wsecurity and -Wformat=2 happy, and were not
actual problems, per se.  I also added format attributes to any printf wrapper functions I found that didn't have them.  -Wsecurity and -Wmissing-format-attribute added to --enable-dev-mode.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 15:43:34 +00:00
Russell Bryant dfe03485a6 Remove an unnecessary thread attribute instance
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-16 17:55:53 +00:00