aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-08 23:04:19 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-08 23:04:19 +0000
commit1eaf7ae6ca7d7511872824cf6be2454b3a03c297 (patch)
treeb11cb446487a53b3881e31a2c07bb93f01770fdc /apps
parentd9807d12a7f5de43e26e5c7feae1755ab505f23f (diff)
Warn user if the custom format is not one of the options
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@25772 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_voicemail.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index bfa3ba142..924d1084f 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 */