mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-14 08:31:02 +00:00
Fudges for wav16, just like wav49
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -917,8 +917,11 @@ static int sendmail(struct minivm_template *template, struct minivm_account *vmu
|
|||||||
|
|
||||||
ast_debug(3, "-_-_- Sending mail to %s@%s - Using template %s\n", vmu->username, vmu->domain, template->name);
|
ast_debug(3, "-_-_- Sending mail to %s@%s - Using template %s\n", vmu->username, vmu->domain, template->name);
|
||||||
|
|
||||||
if (!strcmp(format, "wav49"))
|
if (!strcmp(format, "wav49")) {
|
||||||
format = "WAV";
|
format = "WAV";
|
||||||
|
} else if (!strcmp(format, "wav16")) {
|
||||||
|
format = "Wav";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* If we have a gain option, process it now with sox */
|
/* If we have a gain option, process it now with sox */
|
||||||
|
@@ -1755,8 +1755,11 @@ static int imap_store_file(char *dir, char *mailboxuser, char *mailboxcontext, i
|
|||||||
tempcopy = 1;
|
tempcopy = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strcmp(fmt, "wav49"))
|
if (!strcmp(fmt, "wav49")) {
|
||||||
fmt = "WAV";
|
fmt = "WAV";
|
||||||
|
} else if (!strcmp(fmt, "wav16")) {
|
||||||
|
fmt = "Wav";
|
||||||
|
}
|
||||||
ast_debug(3, "Storing file '%s', format '%s'\n", fn, fmt);
|
ast_debug(3, "Storing file '%s', format '%s'\n", fn, fmt);
|
||||||
|
|
||||||
/* Make a temporary file instead of piping directly to sendmail, in case the mail
|
/* Make a temporary file instead of piping directly to sendmail, in case the mail
|
||||||
@@ -2753,8 +2756,11 @@ static int retrieve_file(char *dir, int msgnum)
|
|||||||
c = strchr(fmt, '|');
|
c = strchr(fmt, '|');
|
||||||
if (c)
|
if (c)
|
||||||
*c = '\0';
|
*c = '\0';
|
||||||
if (!strcasecmp(fmt, "wav49"))
|
if (!strcasecmp(fmt, "wav49")) {
|
||||||
strcpy(fmt, "WAV");
|
strcpy(fmt, "WAV");
|
||||||
|
} else if (!strcasecmp(fmt, "wav16")) {
|
||||||
|
strcpy(fmt, "Wav");
|
||||||
|
}
|
||||||
snprintf(msgnums, sizeof(msgnums),"%d", msgnum);
|
snprintf(msgnums, sizeof(msgnums),"%d", msgnum);
|
||||||
if (msgnum > -1)
|
if (msgnum > -1)
|
||||||
make_file(fn, sizeof(fn), dir, msgnum);
|
make_file(fn, sizeof(fn), dir, msgnum);
|
||||||
@@ -3167,8 +3173,11 @@ static int store_file(char *dir, char *mailboxuser, char *mailboxcontext, int ms
|
|||||||
c = strchr(fmt, '|');
|
c = strchr(fmt, '|');
|
||||||
if (c)
|
if (c)
|
||||||
*c = '\0';
|
*c = '\0';
|
||||||
if (!strcasecmp(fmt, "wav49"))
|
if (!strcasecmp(fmt, "wav49")) {
|
||||||
strcpy(fmt, "WAV");
|
strcpy(fmt, "WAV");
|
||||||
|
} else if (!strcasecmp(fmt, "wav16")) {
|
||||||
|
strcpy(fmt, "Wav");
|
||||||
|
}
|
||||||
snprintf(msgnums, sizeof(msgnums),"%d", msgnum);
|
snprintf(msgnums, sizeof(msgnums),"%d", msgnum);
|
||||||
if (msgnum > -1)
|
if (msgnum > -1)
|
||||||
make_file(fn, sizeof(fn), dir, msgnum);
|
make_file(fn, sizeof(fn), dir, msgnum);
|
||||||
@@ -3989,8 +3998,11 @@ static int sendmail(char *srcemail, struct ast_vm_user *vmu, int msgnum, char *c
|
|||||||
ast_log(AST_LOG_WARNING, "E-mail address missing for mailbox [%s]. E-mail will not be sent.\n", vmu->mailbox);
|
ast_log(AST_LOG_WARNING, "E-mail address missing for mailbox [%s]. E-mail will not be sent.\n", vmu->mailbox);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
if (!strcmp(format, "wav49"))
|
if (!strcmp(format, "wav49")) {
|
||||||
format = "WAV";
|
format = "WAV";
|
||||||
|
} else if (!strcmp(format, "wav16")) {
|
||||||
|
format = "Wav";
|
||||||
|
}
|
||||||
ast_debug(3, "Attaching file '%s', format '%s', uservm is '%d', global is %d\n", attach, format, attach_user_voicemail, ast_test_flag((&globalflags), VM_ATTACH));
|
ast_debug(3, "Attaching file '%s', format '%s', uservm is '%d', global is %d\n", attach, format, attach_user_voicemail, ast_test_flag((&globalflags), VM_ATTACH));
|
||||||
/* Make a temporary file instead of piping directly to sendmail, in case the mail
|
/* Make a temporary file instead of piping directly to sendmail, in case the mail
|
||||||
command hangs */
|
command hangs */
|
||||||
|
@@ -1201,10 +1201,13 @@ static int read_agent_config(int reload)
|
|||||||
recordagentcalls = ast_true(v->value);
|
recordagentcalls = ast_true(v->value);
|
||||||
} else if (!strcasecmp(v->name, "recordformat")) {
|
} else if (!strcasecmp(v->name, "recordformat")) {
|
||||||
ast_copy_string(recordformat, v->value, sizeof(recordformat));
|
ast_copy_string(recordformat, v->value, sizeof(recordformat));
|
||||||
if (!strcasecmp(v->value, "wav49"))
|
if (!strcasecmp(v->value, "wav49")) {
|
||||||
strcpy(recordformatext, "WAV");
|
strcpy(recordformatext, "WAV");
|
||||||
else
|
} else if (!strcasecmp(v->value, "wav16")) {
|
||||||
|
strcpy(recordformatext, "Wav");
|
||||||
|
} else {
|
||||||
ast_copy_string(recordformatext, v->value, sizeof(recordformatext));
|
ast_copy_string(recordformatext, v->value, sizeof(recordformatext));
|
||||||
|
}
|
||||||
} else if (!strcasecmp(v->name, "urlprefix")) {
|
} else if (!strcasecmp(v->name, "urlprefix")) {
|
||||||
ast_copy_string(urlprefix, v->value, sizeof(urlprefix));
|
ast_copy_string(urlprefix, v->value, sizeof(urlprefix));
|
||||||
if (urlprefix[strlen(urlprefix) - 1] != '/')
|
if (urlprefix[strlen(urlprefix) - 1] != '/')
|
||||||
|
@@ -248,6 +248,8 @@ static char *build_filename(const char *filename, const char *ext)
|
|||||||
|
|
||||||
if (!strcmp(ext, "wav49"))
|
if (!strcmp(ext, "wav49"))
|
||||||
ext = "WAV";
|
ext = "WAV";
|
||||||
|
if (!strcmp(ext, "wav16"))
|
||||||
|
ext = "Wav";
|
||||||
|
|
||||||
if (filename[0] == '/')
|
if (filename[0] == '/')
|
||||||
asprintf(&fn, "%s.%s", filename, ext);
|
asprintf(&fn, "%s.%s", filename, ext);
|
||||||
|
@@ -324,7 +324,7 @@ int ast_monitor_stop(struct ast_channel *chan, int need_lock)
|
|||||||
if (chan->monitor->joinfiles && !ast_strlen_zero(chan->monitor->filename_base)) {
|
if (chan->monitor->joinfiles && !ast_strlen_zero(chan->monitor->filename_base)) {
|
||||||
char tmp[1024];
|
char tmp[1024];
|
||||||
char tmp2[1024];
|
char tmp2[1024];
|
||||||
const char *format = !strcasecmp(chan->monitor->format,"wav49") ? "WAV" : chan->monitor->format;
|
const char *format = !strcasecmp(chan->monitor->format,"wav49") ? "WAV" : !strcasecmp(chan->monitor->format, "wav16") ? "Wav" : chan->monitor->format;
|
||||||
char *name = chan->monitor->filename_base;
|
char *name = chan->monitor->filename_base;
|
||||||
int directory = strchr(name, '/') ? 1 : 0;
|
int directory = strchr(name, '/') ? 1 : 0;
|
||||||
const char *dir = directory ? "" : ast_config_AST_MONITOR_DIR;
|
const char *dir = directory ? "" : ast_config_AST_MONITOR_DIR;
|
||||||
|
Reference in New Issue
Block a user