diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-09 21:22:42 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-09 21:22:42 +0000 |
commit | 71a41a28b1e56af631e357bca8d816a1dac84000 (patch) | |
tree | e6fd3676de72e72333e4784a6fb64c38f41c6fb4 /main/manager.c | |
parent | d2e5ffcec08e5041776428950ed13590f7fe3551 (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/manager.c')
-rw-r--r-- | main/manager.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/main/manager.c b/main/manager.c index 97e72dd0d..665b3e1fb 100644 --- a/main/manager.c +++ b/main/manager.c @@ -2336,29 +2336,31 @@ static char mandescr_mailboxcount[] = "Variables: (Names marked with * are required)\n" " *Mailbox: Full mailbox ID <mailbox>@<vm-context>\n" " ActionID: Optional ActionID for message matching.\n" -"Returns number of new and old messages.\n" +"Returns number of urgent, new and old messages.\n" " Message: Mailbox Message Count\n" " Mailbox: <mailboxid>\n" +" UrgentMessages: <count>\n" " NewMessages: <count>\n" " OldMessages: <count>\n" "\n"; static int action_mailboxcount(struct mansession *s, const struct message *m) { const char *mailbox = astman_get_header(m, "Mailbox"); - int newmsgs = 0, oldmsgs = 0; + int newmsgs = 0, oldmsgs = 0, urgentmsgs = 0;; if (ast_strlen_zero(mailbox)) { astman_send_error(s, m, "Mailbox not specified"); return 0; } - ast_app_inboxcount(mailbox, &newmsgs, &oldmsgs); + ast_app_inboxcount(mailbox, &urgentmsgs, &newmsgs, &oldmsgs); astman_start_ack(s, m); astman_append(s, "Message: Mailbox Message Count\r\n" "Mailbox: %s\r\n" + "UrgMessages: %d\r\n" "NewMessages: %d\r\n" "OldMessages: %d\r\n" "\r\n", - mailbox, newmsgs, oldmsgs); + mailbox, urgentmsgs, newmsgs, oldmsgs); return 0; } |