diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2008-10-09 21:37:23 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2008-10-09 21:37:23 +0000 |
commit | f5d5eb5e19282177f875c5670dd04ca99823a171 (patch) | |
tree | f543e9e0621f0f91851b3a80186986917cb10651 /apps | |
parent | 9a56bae67a7ef76912e8e4f2bdc1555cff79f0f5 (diff) |
Fudges for wav16, just like wav49
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_minivm.c | 5 | ||||
-rw-r--r-- | apps/app_voicemail.c | 20 |
2 files changed, 20 insertions, 5 deletions
diff --git a/apps/app_minivm.c b/apps/app_minivm.c index c151068df..b900f2f1b 100644 --- a/apps/app_minivm.c +++ b/apps/app_minivm.c @@ -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); - if (!strcmp(format, "wav49")) + if (!strcmp(format, "wav49")) { format = "WAV"; + } else if (!strcmp(format, "wav16")) { + format = "Wav"; + } /* If we have a gain option, process it now with sox */ diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 9f2c335e8..87b10b166 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -1755,8 +1755,11 @@ static int imap_store_file(char *dir, char *mailboxuser, char *mailboxcontext, i tempcopy = 1; } - if (!strcmp(fmt, "wav49")) + if (!strcmp(fmt, "wav49")) { fmt = "WAV"; + } else if (!strcmp(fmt, "wav16")) { + fmt = "Wav"; + } 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 @@ -2753,8 +2756,11 @@ static int retrieve_file(char *dir, int msgnum) c = strchr(fmt, '|'); if (c) *c = '\0'; - if (!strcasecmp(fmt, "wav49")) + if (!strcasecmp(fmt, "wav49")) { strcpy(fmt, "WAV"); + } else if (!strcasecmp(fmt, "wav16")) { + strcpy(fmt, "Wav"); + } snprintf(msgnums, sizeof(msgnums),"%d", msgnum); if (msgnum > -1) 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, '|'); if (c) *c = '\0'; - if (!strcasecmp(fmt, "wav49")) + if (!strcasecmp(fmt, "wav49")) { strcpy(fmt, "WAV"); + } else if (!strcasecmp(fmt, "wav16")) { + strcpy(fmt, "Wav"); + } snprintf(msgnums, sizeof(msgnums),"%d", msgnum); if (msgnum > -1) 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); return(0); } - if (!strcmp(format, "wav49")) + if (!strcmp(format, "wav49")) { 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)); /* Make a temporary file instead of piping directly to sendmail, in case the mail command hangs */ |