diff options
author | automerge <automerge@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-19 19:22:08 +0000 |
---|---|---|
committer | automerge <automerge@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-19 19:22:08 +0000 |
commit | f9433f32734ea26a04f91e77c0450a7a454d87ef (patch) | |
tree | 017d19d09789683e6630c1c403fe57132c4c7ca8 /apps | |
parent | 2d8709079fd8f73286412888f4dddeee3dfcd280 (diff) |
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@55478 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_voicemail.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index c857096ee..993e4df13 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -4711,21 +4711,28 @@ static int vm_newuser(struct ast_channel *chan, struct ast_vm_user *vmu, struct /* If forcename is set, have the user record their name */ if (ast_test_flag(vmu, VM_FORCENAME)) { snprintf(prefile,sizeof(prefile), "%s%s/%s/greet", VM_SPOOL_DIR, vmu->context, vms->username); - cmd = play_record_review(chan,"vm-rec-name",prefile, maxgreet, fmtc, 0, vmu, &duration, NULL, record_gain); - if (cmd < 0 || cmd == 't' || cmd == '#') - return cmd; + if (ast_fileexists(prefile, NULL, NULL) < 1) { + cmd = play_record_review(chan, "vm-rec-name", prefile, maxgreet, fmtc, 0, vmu, &duration, NULL, record_gain); + if (cmd < 0 || cmd == 't' || cmd == '#') + return cmd; + } } /* If forcegreetings is set, have the user record their greetings */ if (ast_test_flag(vmu, VM_FORCEGREET)) { snprintf(prefile,sizeof(prefile), "%s%s/%s/unavail", VM_SPOOL_DIR, vmu->context, vms->username); - cmd = play_record_review(chan,"vm-rec-unv",prefile, maxgreet, fmtc, 0, vmu, &duration, NULL, record_gain); - if (cmd < 0 || cmd == 't' || cmd == '#') - return cmd; + if (ast_fileexists(prefile, NULL, NULL) < 1) { + cmd = play_record_review(chan, "vm-rec-unv", prefile, maxgreet, fmtc, 0, vmu, &duration, NULL, record_gain); + if (cmd < 0 || cmd == 't' || cmd == '#') + return cmd; + } + snprintf(prefile,sizeof(prefile), "%s%s/%s/busy", VM_SPOOL_DIR, vmu->context, vms->username); - cmd = play_record_review(chan,"vm-rec-busy",prefile, maxgreet, fmtc, 0, vmu, &duration, NULL, record_gain); - if (cmd < 0 || cmd == 't' || cmd == '#') - return cmd; + if (ast_fileexists(prefile, NULL, NULL) < 1) { + cmd = play_record_review(chan, "vm-rec-busy", prefile, maxgreet, fmtc, 0, vmu, &duration, NULL, record_gain); + if (cmd < 0 || cmd == 't' || cmd == '#') + return cmd; + } } return cmd; |