aboutsummaryrefslogtreecommitdiffstats
path: root/main/app.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-09 21:22:42 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-09 21:22:42 +0000
commit71a41a28b1e56af631e357bca8d816a1dac84000 (patch)
treee6fd3676de72e72333e4784a6fb64c38f41c6fb4 /main/app.c
parentd2e5ffcec08e5041776428950ed13590f7fe3551 (diff)
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: http://svn.digium.com/svn/asterisk/trunk@115588 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/app.c')
-rw-r--r--main/app.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/main/app.c b/main/app.c
index 868f44dbd..0cd6ba844 100644
--- a/main/app.c
+++ b/main/app.c
@@ -176,12 +176,12 @@ int ast_app_getdata_full(struct ast_channel *c, char *prompt, char *s, int maxle
}
static int (*ast_has_voicemail_func)(const char *mailbox, const char *folder) = NULL;
-static int (*ast_inboxcount_func)(const char *mailbox, int *newmsgs, int *oldmsgs) = NULL;
+static int (*ast_inboxcount_func)(const char *mailbox, int *urgentmsgs, int *newmsgs, int *oldmsgs) = NULL;
static int (*ast_sayname_func)(struct ast_channel *chan, const char *mailbox, const char *context) = NULL;
static int (*ast_messagecount_func)(const char *context, const char *mailbox, const char *folder) = NULL;
void ast_install_vm_functions(int (*has_voicemail_func)(const char *mailbox, const char *folder),
- int (*inboxcount_func)(const char *mailbox, int *newmsgs, int *oldmsgs),
+ int (*inboxcount_func)(const char *mailbox, int *urgentmsgs, int *newmsgs, int *oldmsgs),
int (*messagecount_func)(const char *context, const char *mailbox, const char *folder),
int (*sayname_func)(struct ast_channel *chan, const char *mailbox, const char *context))
{
@@ -213,15 +213,17 @@ int ast_app_has_voicemail(const char *mailbox, const char *folder)
}
-int ast_app_inboxcount(const char *mailbox, int *newmsgs, int *oldmsgs)
+int ast_app_inboxcount(const char *mailbox, int *urgentmsgs, int *newmsgs, int *oldmsgs)
{
static int warned = 0;
if (newmsgs)
*newmsgs = 0;
if (oldmsgs)
*oldmsgs = 0;
+ if (urgentmsgs)
+ *urgentmsgs = 0;
if (ast_inboxcount_func)
- return ast_inboxcount_func(mailbox, newmsgs, oldmsgs);
+ return ast_inboxcount_func(mailbox, urgentmsgs, newmsgs, oldmsgs);
if (!warned) {
warned++;