[asterisk-commits] trunk r25772 - /trunk/apps/app_voicemail.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon May 8 16:04:20 MST 2006


Author: tilghman
Date: Mon May  8 18:04:19 2006
New Revision: 25772

URL: http://svn.digium.com/view/asterisk?rev=25772&view=rev
Log:
Warn user if the custom format is not one of the options

Modified:
    trunk/apps/app_voicemail.c

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?rev=25772&r1=25771&r2=25772&view=diff
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Mon May  8 18:04:19 2006
@@ -3359,7 +3359,11 @@
 	snprintf(ext_context, sizeof(ext_context), "%s@%s", vmu->mailbox, vmu->context);
 
 	if (!ast_strlen_zero(vmu->attachfmt)) {
-		fmt = vmu->attachfmt;
+		if (strstr(fmt, vmu->attachfmt)) {
+			fmt = vmu->attachfmt;
+		} else {
+			ast_log(LOG_WARNING, "Attachment format '%s' is not one of the recorded formats '%s'.  Falling back to default format for '%s@%s'.\n", vmu->attachfmt, fmt, vmu->mailbox, vmu->context);
+		}
 	}
 
 	/* Attach only the first format */



More information about the asterisk-commits mailing list