[Asterisk-cvs] asterisk/apps app_voicemail.c,1.138,1.139
markster at lists.digium.com
markster at lists.digium.com
Thu Sep 2 00:54:22 CDT 2004
Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv9971/apps
Modified Files:
app_voicemail.c
Log Message:
Improve voicemail verbosity (bug #2351)
Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -d -r1.138 -r1.139
--- app_voicemail.c 16 Aug 2004 04:05:43 -0000 1.138
+++ app_voicemail.c 2 Sep 2004 04:57:37 -0000 1.139
@@ -1250,6 +1250,8 @@
if (totalsilence > maxsilence) {
/* Ended happily with silence */
+ if (option_verbose > 2)
+ ast_verbose( VERBOSE_PREFIX_3 "Recording automatically stopped after a silence of %d seconds\n", totalsilence/1000);
ast_frfree(f);
gotsilence = 1;
outmsg=2;
@@ -1468,6 +1470,8 @@
if (totalsilence > maxsilence) {
/* Ended happily with silence */
+ if (option_verbose > 2)
+ ast_verbose( VERBOSE_PREFIX_3 "Recording automatically stopped after a silence of %d seconds\n", totalsilence/1000);
ast_frfree(f);
gotsilence = 1;
outmsg=2;
@@ -1902,7 +1906,10 @@
close(fd);
}
if (duration < vmminmessage) {
+ if (option_verbose > 2)
+ ast_verbose( VERBOSE_PREFIX_3 "Recording was %d seconds long but needs to be at least %d - abandoning\n", duration, vmminmessage);
vm_delete(fn);
+ /* XXX We should really give a prompt too short/option start again, with leave_vm_out called only after a timeout XXX */
goto leave_vm_out;
}
/* Are there to be more recipients of this message? */
@@ -4286,6 +4293,8 @@
if ((s = ast_variable_retrieve(cfg, "general", "minmessage"))) {
if (sscanf(s, "%d", &x) == 1) {
vmminmessage = x;
+ if (maxsilence <= vmminmessage)
+ ast_log(LOG_WARNING, "maxsilence should be less than minmessage or you may get empty messages\n");
} else {
ast_log(LOG_WARNING, "Invalid min message time length\n");
}
More information about the svn-commits
mailing list