aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-07-20 00:25:54 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-07-20 00:25:54 +0000
commitc8ececdd93db8f3e8c94f86e63e8bc78d59cb5ee (patch)
treeafb1124fc4c4860c4b1c941988dd09de3458cd18 /apps/app_voicemail.c
parentd028de8bf96690ef82dfdac418049d3f052e5bd3 (diff)
add OGG/Vorbis file format support (bug #4296)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6173 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_voicemail.c')
-rwxr-xr-xapps/app_voicemail.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index e5a52f06d..c64fef8b4 100755
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -1665,8 +1665,13 @@ static int sendmail(char *srcemail, struct ast_vm_user *vmu, int msgnum, char *c
dur, msgnum + 1, mailbox, (cidname ? cidname : (cidnum ? cidnum : "an unknown caller")), date);
}
if (attach_user_voicemail) {
+ /* Eww. We want formats to tell us their own MIME type */
+ char *ctype = "audio/x-";
+ if (!strcasecmp(format, "ogg"))
+ ctype = "application/";
+
fprintf(p, "--%s\n", bound);
- fprintf(p, "Content-Type: audio/x-%s; name=\"msg%04d.%s\"\n", format, msgnum, format);
+ fprintf(p, "Content-Type: %s%s; name=\"msg%04d.%s\"\n", ctype, format, msgnum, format);
fprintf(p, "Content-Transfer-Encoding: base64\n");
fprintf(p, "Content-Description: Voicemail sound attachment.\n");
fprintf(p, "Content-Disposition: attachment; filename=\"msg%04d.%s\"\n\n", msgnum, format);