[Asterisk-cvs] asterisk/apps app_voicemail.c,1.232,1.233
kpfleming at lists.digium.com
kpfleming at lists.digium.com
Tue Jul 19 20:18:33 CDT 2005
Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv19882/apps
Modified Files:
app_voicemail.c
Log Message:
add OGG/Vorbis file format support (bug #4296)
Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.232
retrieving revision 1.233
diff -u -d -r1.232 -r1.233
--- app_voicemail.c 15 Jul 2005 23:00:46 -0000 1.232
+++ app_voicemail.c 20 Jul 2005 00:25:54 -0000 1.233
@@ -1665,8 +1665,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);
More information about the svn-commits
mailing list