diff options
author | Mark Michelson <mmichelson@digium.com> | 2008-05-09 21:22:42 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2008-05-09 21:22:42 +0000 |
commit | 7daebcd61030cd5efdc68a630c31a71ba2e79442 (patch) | |
tree | e6fd3676de72e72333e4784a6fb64c38f41c6fb4 /channels/chan_iax2.c | |
parent | 59817ce0d84174c84cf49bee28557e2a0d5f45c2 (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: https://origsvn.digium.com/svn/asterisk/trunk@115588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_iax2.c')
-rw-r--r-- | channels/chan_iax2.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 2213648eb..e9e5df3e2 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -6862,7 +6862,7 @@ static int update_registry(struct sockaddr_in *sin, int callno, char *devtype, i iax_ie_append_addr(&ied, IAX_IE_APPARENT_ADDR, &p->addr); if (!ast_strlen_zero(p->mailbox)) { struct ast_event *event; - int new, old; + int new, old, urgent; char *mailbox, *context; context = mailbox = ast_strdupa(p->mailbox); @@ -6881,8 +6881,10 @@ static int update_registry(struct sockaddr_in *sin, int callno, char *devtype, i old = ast_event_get_ie_uint(event, AST_EVENT_IE_OLDMSGS); ast_event_destroy(event); } else /* Fall back on checking the mailbox directly */ - ast_app_inboxcount(p->mailbox, &new, &old); + ast_app_inboxcount(p->mailbox, &urgent, &new, &old); + if (urgent > 255) + urgent = 255; if (new > 255) new = 255; if (old > 255) |