mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 02:26:23 +00:00
Merged revisions 48596 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r48596 | file | 2006-12-19 18:04:30 -0500 (Tue, 19 Dec 2006) | 2 lines Pass 'vms' pointer to record_and_review so it is then passed to the IMAP store file function. (issue #8614 reported by punknow) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -358,7 +358,7 @@ static int advanced_options(struct ast_channel *chan, struct ast_vm_user *vmu, s
|
|||||||
static int dialout(struct ast_channel *chan, struct ast_vm_user *vmu, char *num, char *outgoing_context);
|
static int dialout(struct ast_channel *chan, struct ast_vm_user *vmu, char *num, char *outgoing_context);
|
||||||
static int play_record_review(struct ast_channel *chan, char *playfile, char *recordfile, int maxtime,
|
static int play_record_review(struct ast_channel *chan, char *playfile, char *recordfile, int maxtime,
|
||||||
char *fmt, int outsidecaller, struct ast_vm_user *vmu, int *duration, const char *unlockdir,
|
char *fmt, int outsidecaller, struct ast_vm_user *vmu, int *duration, const char *unlockdir,
|
||||||
signed char record_gain);
|
signed char record_gain, struct vm_state *vms);
|
||||||
static int vm_tempgreeting(struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms, char *fmtc, signed char record_gain);
|
static int vm_tempgreeting(struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms, char *fmtc, signed char record_gain);
|
||||||
static int vm_play_folder_name(struct ast_channel *chan, char *mbox);
|
static int vm_play_folder_name(struct ast_channel *chan, char *mbox);
|
||||||
static int notify_new_message(struct ast_channel *chan, struct ast_vm_user *vmu, int msgnum, long duration, char *fmt, char *cidnum, char *cidname);
|
static int notify_new_message(struct ast_channel *chan, struct ast_vm_user *vmu, int msgnum, long duration, char *fmt, char *cidnum, char *cidname);
|
||||||
@@ -3085,7 +3085,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
|
|||||||
category ? category : "");
|
category ? category : "");
|
||||||
} else
|
} else
|
||||||
ast_log(LOG_WARNING, "Error opening text file for output\n");
|
ast_log(LOG_WARNING, "Error opening text file for output\n");
|
||||||
res = play_record_review(chan, NULL, tmptxtfile, vmmaxmessage, fmt, 1, vmu, &duration, NULL, options->record_gain);
|
res = play_record_review(chan, NULL, tmptxtfile, vmmaxmessage, fmt, 1, vmu, &duration, NULL, options->record_gain, vms);
|
||||||
|
|
||||||
if (txt) {
|
if (txt) {
|
||||||
if (duration < vmminmessage) {
|
if (duration < vmminmessage) {
|
||||||
@@ -3935,7 +3935,6 @@ static int forward_message(struct ast_channel *chan, char *context, struct vm_st
|
|||||||
char *temp;
|
char *temp;
|
||||||
char todir[256];
|
char todir[256];
|
||||||
int todircount=0;
|
int todircount=0;
|
||||||
int duration;
|
|
||||||
#endif
|
#endif
|
||||||
char username[70]="";
|
char username[70]="";
|
||||||
int res = 0, cmd = 0;
|
int res = 0, cmd = 0;
|
||||||
@@ -5767,7 +5766,7 @@ 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);
|
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;
|
||||||
}
|
}
|
||||||
@@ -5775,11 +5774,11 @@ static int vm_newuser(struct ast_channel *chan, struct ast_vm_user *vmu, struct
|
|||||||
/* 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);
|
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);
|
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;
|
||||||
}
|
}
|
||||||
@@ -5813,15 +5812,15 @@ static int vm_options(struct ast_channel *chan, struct ast_vm_user *vmu, struct
|
|||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case '1':
|
case '1':
|
||||||
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);
|
cmd = play_record_review(chan,"vm-rec-unv",prefile, maxgreet, fmtc, 0, vmu, &duration, NULL, record_gain, NULL);
|
||||||
break;
|
break;
|
||||||
case '2':
|
case '2':
|
||||||
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);
|
cmd = play_record_review(chan,"vm-rec-busy",prefile, maxgreet, fmtc, 0, vmu, &duration, NULL, record_gain, NULL);
|
||||||
break;
|
break;
|
||||||
case '3':
|
case '3':
|
||||||
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);
|
cmd = play_record_review(chan,"vm-rec-name",prefile, maxgreet, fmtc, 0, vmu, &duration, NULL, record_gain, NULL);
|
||||||
break;
|
break;
|
||||||
case '4':
|
case '4':
|
||||||
cmd = vm_tempgreeting(chan, vmu, vms, fmtc, record_gain);
|
cmd = vm_tempgreeting(chan, vmu, vms, fmtc, record_gain);
|
||||||
@@ -5909,12 +5908,12 @@ static int vm_tempgreeting(struct ast_channel *chan, struct ast_vm_user *vmu, st
|
|||||||
retries = 0;
|
retries = 0;
|
||||||
RETRIEVE(prefile, -1);
|
RETRIEVE(prefile, -1);
|
||||||
if (ast_fileexists(prefile, NULL, NULL) <= 0) {
|
if (ast_fileexists(prefile, NULL, NULL) <= 0) {
|
||||||
play_record_review(chan, "vm-rec-temp", prefile, maxgreet, fmtc, 0, vmu, &duration, NULL, record_gain);
|
play_record_review(chan, "vm-rec-temp", prefile, maxgreet, fmtc, 0, vmu, &duration, NULL, record_gain, NULL);
|
||||||
cmd = 't';
|
cmd = 't';
|
||||||
} else {
|
} else {
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case '1':
|
case '1':
|
||||||
cmd = play_record_review(chan, "vm-rec-temp", prefile, maxgreet, fmtc, 0, vmu, &duration, NULL, record_gain);
|
cmd = play_record_review(chan, "vm-rec-temp", prefile, maxgreet, fmtc, 0, vmu, &duration, NULL, record_gain, NULL);
|
||||||
break;
|
break;
|
||||||
case '2':
|
case '2':
|
||||||
DELETE(prefile, -1, prefile);
|
DELETE(prefile, -1, prefile);
|
||||||
@@ -7972,7 +7971,7 @@ static int advanced_options(struct ast_channel *chan, struct ast_vm_user *vmu, s
|
|||||||
|
|
||||||
static int play_record_review(struct ast_channel *chan, char *playfile, char *recordfile, int maxtime, char *fmt,
|
static int play_record_review(struct ast_channel *chan, char *playfile, char *recordfile, int maxtime, char *fmt,
|
||||||
int outsidecaller, struct ast_vm_user *vmu, int *duration, const char *unlockdir,
|
int outsidecaller, struct ast_vm_user *vmu, int *duration, const char *unlockdir,
|
||||||
signed char record_gain)
|
signed char record_gain, struct vm_state *vms)
|
||||||
{
|
{
|
||||||
/* Record message & let caller review or re-record it, or set options if applicable */
|
/* Record message & let caller review or re-record it, or set options if applicable */
|
||||||
int res = 0;
|
int res = 0;
|
||||||
@@ -8007,7 +8006,7 @@ static int play_record_review(struct ast_channel *chan, char *playfile, char *re
|
|||||||
if (option_verbose > 2)
|
if (option_verbose > 2)
|
||||||
ast_verbose(VERBOSE_PREFIX_3 "Saving message as is\n");
|
ast_verbose(VERBOSE_PREFIX_3 "Saving message as is\n");
|
||||||
ast_stream_and_wait(chan, "vm-msgsaved", "");
|
ast_stream_and_wait(chan, "vm-msgsaved", "");
|
||||||
STORE(recordfile, vmu->mailbox, vmu->context, -1, chan, vmu, fmt, duration, vms);
|
STORE(recordfile, vmu->mailbox, vmu->context, -1, chan, vmu, fmt, *duration, vms);
|
||||||
DISPOSE(recordfile, -1);
|
DISPOSE(recordfile, -1);
|
||||||
cmd = 't';
|
cmd = 't';
|
||||||
return res;
|
return res;
|
||||||
|
Reference in New Issue
Block a user