From 3db82d8597d9429d3f7b63431f707c72a37dcc9b Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Wed, 20 Jul 2005 00:25:54 +0000 Subject: add OGG/Vorbis file format support (bug #4296) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6173 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_voicemail.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'apps') 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); -- cgit v1.2.3