From: Tilghman Lesher Date: Mon, 8 May 2006 23:04:19 +0000 (+0000) Subject: Warn user if the custom format is not one of the options X-Git-Tag: 1.4.0-beta1~1491 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a5e16fe676b61d2a9be2042bc4b26d26e0371c8d;p=thirdparty%2Fasterisk.git Warn user if the custom format is not one of the options git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25772 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index bfa3ba1428..924d1084fb 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -3359,7 +3359,11 @@ static int notify_new_message(struct ast_channel *chan, struct ast_vm_user *vmu, 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 */