aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r--apps/app_voicemail.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 70a27f672..5b2463af5 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -3458,8 +3458,8 @@ static int forward_message(struct ast_channel *chan, char *context, char *dir, i
/* start optimistic */
valid_extensions = 1;
while (s) {
- /* find_user is going to malloc since we have a NULL as first argument */
- if ((receiver = find_user(NULL, context, 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))) {
if (!extensions)
vmtmp = extensions = receiver;
else {