Index: apps/app_voicemail.c =================================================================== RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v retrieving revision 1.215 diff -u -r1.215 app_voicemail.c --- apps/app_voicemail.c 17 May 2005 17:19:53 -0000 1.215 +++ apps/app_voicemail.c 20 May 2005 12:59:36 -0000 @@ -1609,8 +1609,13 @@ 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);