diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-12-03 19:55:05 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-12-03 19:55:05 +0000 |
commit | 1982e280c74bfc4ec747723457b6722aeb8a3a51 (patch) | |
tree | e0c48f1603b148e669c54d822e8856a1199dbd51 | |
parent | 7580402fbacde8ca3ead5a49e324544658254a86 (diff) |
Bug 5925: check for "Unknown", as that's what app_voicemail puts into the field for Unknown callerid
Also, remove useless res checks (initialized to 0; never set)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@7310 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | apps/app_voicemail.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index b6cf5d56b..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; } |