Merged revisions 55435 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r55435 | tilghman | 2007-02-19 12:11:48 -0600 (Mon, 19 Feb 2007) | 10 lines Merged revisions 55434 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r55434 | tilghman | 2007-02-19 12:09:09 -0600 (Mon, 19 Feb 2007) | 2 lines forcename and forcegreetings options should check to see if the recording already exists ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@55436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
19ee30dc1c
commit
fb626350c6
1 changed files with 16 additions and 9 deletions
|
@ -5820,22 +5820,29 @@ 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 forcename is set, have the user record their name */
|
||||||
if (ast_test_flag(vmu, VM_FORCENAME)) {
|
if (ast_test_flag(vmu, VM_FORCENAME)) {
|
||||||
snprintf(prefile,sizeof(prefile), "%s%s/%s/greet", VM_SPOOL_DIR, vmu->context, vms->username);
|
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, NULL);
|
if (ast_fileexists(prefile, NULL, NULL) < 1) {
|
||||||
|
cmd = play_record_review(chan, "vm-rec-name", prefile, maxgreet, fmtc, 0, vmu, &duration, NULL, record_gain, NULL);
|
||||||
if (cmd < 0 || cmd == 't' || cmd == '#')
|
if (cmd < 0 || cmd == 't' || cmd == '#')
|
||||||
return cmd;
|
return cmd;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* If forcegreetings is set, have the user record their greetings */
|
/* If forcegreetings is set, have the user record their greetings */
|
||||||
if (ast_test_flag(vmu, VM_FORCEGREET)) {
|
if (ast_test_flag(vmu, VM_FORCEGREET)) {
|
||||||
snprintf(prefile,sizeof(prefile), "%s%s/%s/unavail", VM_SPOOL_DIR, vmu->context, vms->username);
|
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, NULL);
|
if (ast_fileexists(prefile, NULL, NULL) < 1) {
|
||||||
|
cmd = play_record_review(chan, "vm-rec-unv", prefile, maxgreet, fmtc, 0, vmu, &duration, NULL, record_gain, NULL);
|
||||||
if (cmd < 0 || cmd == 't' || cmd == '#')
|
if (cmd < 0 || cmd == 't' || cmd == '#')
|
||||||
return cmd;
|
return cmd;
|
||||||
|
}
|
||||||
|
|
||||||
snprintf(prefile,sizeof(prefile), "%s%s/%s/busy", VM_SPOOL_DIR, vmu->context, vms->username);
|
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, NULL);
|
if (ast_fileexists(prefile, NULL, NULL) < 1) {
|
||||||
|
cmd = play_record_review(chan, "vm-rec-busy", prefile, maxgreet, fmtc, 0, vmu, &duration, NULL, record_gain, NULL);
|
||||||
if (cmd < 0 || cmd == 't' || cmd == '#')
|
if (cmd < 0 || cmd == 't' || cmd == '#')
|
||||||
return cmd;
|
return cmd;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return cmd;
|
return cmd;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue