static char mailcmd[160]; /* Configurable mail cmd */
static char vmfmts[80];
+static int vmminmessage;
static int vmmaxmessage;
static int maxgreet;
static int skipms;
} else
close(fd);
}
+ if (end - start < vmminmessage) {
+ ast_filedelete(fn, NULL);
+ goto leave_vm_out;
+ }
stringp = fmt;
strsep(&stringp, "|");
/* Send e-mail if applicable */
}
} else
ast_log(LOG_WARNING, "No format for saving voicemail?\n");
+leave_vm_out:
free_user(vmu);
} else {
ast_log(LOG_WARNING, "No entry in voicemail config file for '%s'\n", ext);
ast_log(LOG_WARNING, "Invalid max message time length\n");
}
}
+
+ vmminmessage = 0;
+ if ((s = ast_variable_retrieve(cfg, "general", "minmessage"))) {
+ if (sscanf(s, "%d", &x) == 1) {
+ vmminmessage = x;
+ } else {
+ ast_log(LOG_WARNING, "Invalid min message time length\n");
+ }
+ }
fmt = ast_variable_retrieve(cfg, "general", "format");
if (!fmt)
fmt = "wav";
attach=yes
; Maximum length of a voicemail message
;maxmessage=180
+; Minimum length of a voicemail message
+;minmessage=3
; Maximum length of greetings
;maxgreet=60
; How many miliseconds to skip forward/back when rew/ff in message playback