From: Mark Michelson Date: Thu, 10 Jan 2008 21:57:06 +0000 (+0000) Subject: Let us leave a voicemail for ourself if we have logged into VoiceMailMain and chosen X-Git-Tag: 1.4.18~12^2~73 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=87a55d5882be20f640c6e0356049389171343e5b;p=thirdparty%2Fasterisk.git 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 --- diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 7b8b0dd23f..8ba4b5eaf6 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -4070,8 +4070,8 @@ static int forward_message(struct ast_channel *chan, char *context, struct vm_st /* start optimistic */ valid_extensions = 1; while (s) { - /* Don't forward to ourselves. find_user is going to malloc since we have a NULL as first argument */ - if (strcmp(s,sender->mailbox) && (receiver = find_user(NULL, context, s))) { + /* Don't forward to ourselves but allow leaving a message for ourselves (flag == 1). find_user is going to malloc since we have a NULL as first argument */ + if ((flag == 1 || strcmp(s,sender->mailbox)) && (receiver = find_user(NULL, context, s))) { AST_LIST_INSERT_HEAD(&extensions, receiver, list); found++; } else {