[asterisk-commits] mmichelson: trunk r96934 - in /trunk: apps/ doc/tex/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jan 7 15:04:10 CST 2008
Author: mmichelson
Date: Mon Jan 7 15:04:09 2008
New Revision: 96934
URL: http://svn.digium.com/view/asterisk?view=rev&rev=96934
Log:
Adding user-configurable TCP timeout settings to IMAP voicemail. This could
go a long way towards preventing unexplainable hangs experienced by people. In the
case of MWI hangs, this also will mean that the SIP port isn't blocked anymore.
(closes issue #11665, reported by yehavi)
Modified:
trunk/apps/app_voicemail.c
trunk/doc/tex/imapstorage.tex
Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=96934&r1=96933&r2=96934
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Mon Jan 7 15:04:09 2008
@@ -8213,6 +8213,31 @@
ast_copy_string(greetingfolder, imapfolder, sizeof(greetingfolder));
}
+ /* Handle the timeouts */
+ if ((val = ast_variable_retrieve(cfg, "general", "imapreadtimeout"))) {
+ mail_parameters(NIL, SET_READTIMEOUT, (void *) (atol(val)));
+ } else {
+ mail_parameters(NIL, SET_READTIMEOUT, (void *) 60);
+ }
+
+ if ((val = ast_variable_retrieve(cfg, "general", "imapwritetimeout"))) {
+ mail_parameters(NIL, SET_WRITETIMEOUT, (void *) (atol(val)));
+ } else {
+ mail_parameters(NIL, SET_WRITETIMEOUT, (void *) 60);
+ }
+
+ if ((val = ast_variable_retrieve(cfg, "general", "imapopentimeout"))) {
+ mail_parameters(NIL, SET_OPENTIMEOUT, (void *) (atol(val)));
+ } else {
+ mail_parameters(NIL, SET_OPENTIMEOUT, (void *) 60);
+ }
+
+ if ((val = ast_variable_retrieve(cfg, "general", "imapclosetimeout"))) {
+ mail_parameters(NIL, SET_CLOSETIMEOUT, (void *) (atol(val)));
+ } else {
+ mail_parameters(NIL, SET_CLOSETIMEOUT, (void *) 60);
+ }
+
#endif
/* External voicemail notify application */
if ((val = ast_variable_retrieve(cfg, "general", "externnotify"))) {
Modified: trunk/doc/tex/imapstorage.tex
URL: http://svn.digium.com/view/asterisk/trunk/doc/tex/imapstorage.tex?view=diff&rev=96934&r1=96933&r2=96934
==============================================================================
--- trunk/doc/tex/imapstorage.tex (original)
+++ trunk/doc/tex/imapstorage.tex Mon Jan 7 15:04:09 2008
@@ -80,6 +80,10 @@
expungeonhangup=<yes or no>
authuser=<username>
authpassword=<password>
+opentimeout=<TCP open timeout in seconds>
+closetimeout=<TCP close timeout in seconds>
+readtimeout=<TCP read timeout in seconds>
+writetimeout=<TCP write timeout in seconds>
\end{verbatim}
\end{astlisting}
More information about the asterisk-commits
mailing list