diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-09-14 19:49:31 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-09-14 19:49:31 +0000 |
commit | a863d0294d3a9ee3a063ced582c638b62b404bfe (patch) | |
tree | 0dc86de3cfeea2464357f2999210c19bd2fb6f45 /apps/app_voicemail.c | |
parent | 277987b3dfe8a1eb379735ce724af1c7a47f7451 (diff) |
Merged revisions 218361 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r218361 | tilghman | 2009-09-14 14:29:48 -0500 (Mon, 14 Sep 2009) | 11 lines
Recorded merge of revisions 218331 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r218331 | tilghman | 2009-09-14 14:16:35 -0500 (Mon, 14 Sep 2009) | 4 lines
Don't say "Please try again" if we don't give the user another chance to try again.
(issue #15055, SWP-129)
Reported by: jthurman
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@218364 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r-- | apps/app_voicemail.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 14baf9488..6644419b2 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -776,6 +776,7 @@ static char vm_passchanged[80] = "vm-passchanged"; static char vm_reenterpassword[80] = "vm-reenterpassword"; static char vm_mismatch[80] = "vm-mismatch"; static char vm_invalid_password[80] = "vm-invalid-password"; +static char vm_pls_try_again[80] = "vm-pls-try-again"; static struct ast_flags globalflags = {0}; @@ -8374,6 +8375,9 @@ static int vm_newuser(struct ast_channel *chan, struct ast_vm_user *vmu, struct } if (++tries == 3) return -1; + if (cmd != 0) { + cmd = ast_play_and_wait(chan, vm_pls_try_again); + } } if (pwdchange & PWDCHANGE_INTERNAL) vm_change_password(vmu, newpassword); @@ -8471,6 +8475,9 @@ static int vm_options(struct ast_channel *chan, struct ast_vm_user *vmu, struct if (cmd != 0) { ast_log(AST_LOG_NOTICE, "Invalid password for user %s (%s)\n", vms->username, newpassword); cmd = ast_play_and_wait(chan, vm_invalid_password); + if (!cmd) { + cmd = ast_play_and_wait(chan, vm_pls_try_again); + } break; } newpassword2[1] = '\0'; @@ -8488,6 +8495,9 @@ static int vm_options(struct ast_channel *chan, struct ast_vm_user *vmu, struct if (strcmp(newpassword, newpassword2)) { ast_log(AST_LOG_NOTICE, "Password mismatch for user %s (%s != %s)\n", vms->username, newpassword, newpassword2); cmd = ast_play_and_wait(chan, vm_mismatch); + if (!cmd) { + cmd = ast_play_and_wait(chan, vm_pls_try_again); + } break; } if (pwdchange & PWDCHANGE_INTERNAL) @@ -10907,6 +10917,9 @@ static int load_config(int reload) ast_copy_string(vm_reenterpassword, val, sizeof(vm_reenterpassword)); if ((val = ast_variable_retrieve(cfg, "general", "vm-mismatch"))) ast_copy_string(vm_mismatch, val, sizeof(vm_mismatch)); + if ((val = ast_variable_retrieve(cfg, "general", "vm-pls-try-again"))) { + ast_copy_string(vm_pls_try_again, val, sizeof(vm_pls_try_again)); + } /* load configurable audio prompts */ if ((val = ast_variable_retrieve(cfg, "general", "listen-control-forward-key")) && is_valid_dtmf(val)) ast_copy_string(listen_control_forward_key, val, sizeof(listen_control_forward_key)); |