summaryrefslogtreecommitdiff
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2005-12-03 20:20:51 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2005-12-03 20:20:51 +0000
commit357c38d177fba610afecd4dbb86166c56c96d6ff (patch)
tree8c68f2e4118e4fe36cb3b5665a5c227ccc0f7aa9 /apps/app_voicemail.c
parent870f98f02de56e35b87f511544a6cda3d4d8fe69 (diff)
Merging from 1.2, bug 5925 - app_voicemail should check for the callerid it sets for unknown
Also, remove unnecessary res checks (initialized to 0; never set) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7313 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r--apps/app_voicemail.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 1bc88ce2f..85ea1c8ff 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -3674,7 +3674,7 @@ static int play_message_callerid(struct ast_channel *chan, struct vm_state *vms,
/* Strip off caller ID number from name */
ast_log(LOG_DEBUG, "VM-CID: composite caller ID received: %s, context: %s\n", cid, context);
ast_callerid_parse(cid, &name, &callerid);
- if ((!res)&&(!ast_strlen_zero(callerid))){
+ if ((!ast_strlen_zero(callerid)) && strcmp(callerid, "Unknown")) {
/* Check for internal contexts and only */
/* say extension when the call didn't come from an internal context in the list */
for (i = 0 ; i < MAX_NUM_CID_CONTEXTS ; i++){
@@ -3714,9 +3714,8 @@ static int play_message_callerid(struct ast_channel *chan, struct vm_state *vms,
} else {
/* Number unknown */
ast_log(LOG_DEBUG, "VM-CID: From an unknown number\n");
- if (!res)
- /* BB: Say "from an unknown caller" as one phrase - it is already recorded by "the voice" anyhow */
- res = wait_file2(chan, vms, "vm-unknown-caller");
+ /* Say "from an unknown caller" as one phrase - it is already recorded by "the voice" anyhow */
+ res = wait_file2(chan, vms, "vm-unknown-caller");
}
return res;
}
@@ -5535,7 +5534,7 @@ static int vm_exec(struct ast_channel *chan, void *data)
if (ast_strlen_zero(tmp)) {
LOCAL_USER_REMOVE(u);
return 0;
- }
+ }
argv[0] = ast_strdupa(tmp);
}